Dec 062017
 
C++ Source for numerical algorithms.
File MTH-CPP.ZIP from The Programmer’s Corner in
Category C++ Source Code
C++ Source for numerical algorithms.
File Name File Size Zip Size Zip Type
ADMSBSHF.CPP 3729 1291 deflated
CRNKNICL.CPP 3609 1231 deflated
LIN-SHOT.CPP 4608 1417 deflated
LIN_F-D1.CPP 3642 1252 deflated
LIN_F-D2.CPP 3642 1252 deflated
NLINSHOT.CPP 5257 1548 deflated
POISSON.CPP 7289 1895 deflated
README.DOC 1248 633 deflated
RK4-SDE.CPP 4593 1538 deflated

Download File MTH-CPP.ZIP Here

Contents of the README.DOC file



These numerical algorithms are from the book "NUMERICAL ANALYSIS",

4th edition, by Richard L. Burden and J. Douglas Faires. The examples provided

are also exercises from the book.

In order to reuse these classes, some modification to the source codes

are needed. It would be better to put the classes in a separate header file,

then include it in the source file. Although it looks strange to use the

class UserEquation as the base class and then derive the new class from it,

this is really the best way to reuse the code than the other way around.

The constructor of UserEquation has got to be well provided before using these

classes so that when it is inherited, things won't go out of control. In order to

take care of various problems, pointers to functions are used so that different

functions can be handled quite easily. Some problems may not have the exact

solutions available, this will need a little more work by writing another member

function or erasing the comparison parts to take care of the condition. The

constructor does everything in these classes so that when complex problems are

to be solved, several classes can be used without too much modification.




 December 6, 2017  Add comments

Leave a Reply