An example is given in example.cpp. This gives a simple linear regression example using five different algorithms. The correct output is given in example.txt. The program carries out a rough check that no memory is left allocated on the heap when it terminates. See the section on testing for a comment on the reliability of this check and the use of the DO_FREE_CHECK option.
I include a variety of make files. To compile the example use a command like
gmake example -f gnu.mak (Gnu G++) gmake example -f cc.mak (AT&T, HPUX, Sun) nmake example.exe -f ms_nt.mak (Microsoft Visual C++ 2.0) nmake example.exe -f ms.mak (Microsoft Visual C++ 1.51) make -f bc.mak example.exe (Borland C++ 4.5, 5) make -f bc32.mak example.exe (Borland C++ 4.5, 5, 32 bit) wmake example.exe -f watcom.mak (Watcom C++ 10A) wmake example.exe -f watco_nt.mak (Watcom C++ 10A, for win NT)To compile all the example and test files use a command like
gmake -f gnu.mak (Gnu G++)
Other example files are nl_ex.cpp and garch.cpp for demonstrating the non-linear fitting routines, sl_ex for demonstrating the solve function and test_exc for demonstrating the exceptions.