Simple C++ Numerical Toolkit (SCPPNT)

Bradley A. Hanson

Release: 0.000908 (September 9, 2000)

SCPPNT contains modifications of some portions of the Template Numerical Toolkit (TNT). The major changes that were made to TNT are:

  1. Row, column, and diagonal iterators were added to the matrix class, and are used in algorithms involving matrices. Some tests I have done indicate that using iterators can result in increased performance relative to using subscripting.
  2. Assignment operators (+=, -=, *=, /=) were added to matrix and vector classes, and are used in algorithms involving matrices and vectors. The use of assignment operators can help eliminate the creation of temporary matrix and vector objects in computations.
  3. Errors result in an exception being thrown rather than the program being aborted.

The matrix and vector classes in SCPPNT have an interface that is compatible with TNT. Therefore, these classes can be used with TNT.

I have successfully compiled programs using SCPPNT with the CodeWarrior 5.3 compiler on Mac OS and Windows NT, the gcc 2.95.2 compiler on Linux, and the free Borland 5.5 compiler on Windows 95/NT. There may be some problems in using SCPPNT with compilers that are less compliant with the C++ standard.

I consider the current release a beta version (indicated by the first digit of release number being a zero). The public interface to classes and functions may change.

Currently the only documentation for SCPPNT is provided as comments in the source files. A major addition that SCPPNT provides is additional matrix iterators. See the function matmult(const Matrix&<T> &A, const Matrix&<T> &B) in cmat.h for an example of the use of row and column iterators in matrix algorithms.

Please contact me if you have any questions or comments about this software

SCPPNT contains the following source files:

Download - Zip archive containing SCPPNT source files and this HTML file. The files are stored with DOS line breaks (they are DOS text files).

Release notes:
Release 0.000908 (September 8, 2000)

    Replace assert in lu.h with exceptions from scppnt_error.h.
    [lu.h]
    
    Constructor from string is not created if SCPPNT_NO_IO is
    defined. [cmat.h, vec.h]
    
    If SCPPNT_DIR_PREFIX is defined then SCPPNT included files
    have a directory prefix such as '#include scppnt/vec.h'.
    [any SCPPNT file that includes another SCPPNT file]
    
    Changed name of file 'subscrpt.h' to 'subscript.h'.
    [subscript.h]
    
    Added versions of TNT files cholesky.h, trisolve.h and qr.h
    that use iterators rather than subscripting. [cholesky.h,
    trisolve.h, qr.h]
    
    Added versions of TNT files transv.h and triang.h. 
    [transv.h, triang.h]
    
    Changed constructors of vectors and matrices that had
    a pointer argument to be template members taking
    an iterator argument. [vec.h, cmat.h]
    
    Added matalg.h which contains functions that can apply
    function objects to rows or columns of matrices. [matalg.h]
    
    Added statfunc.h which contains function object implementing
    some simple statistical functions which can be used
    with the functions in matalg.h. [statfunc.h]
    
    Added scppnt.h which contains some #defines that
    can be used to control the compilation of SCPPNT.
    [scppnt.h]
    
    Revised several functions in cmat.h to use iterators
    and assignment operators included in SCPPNT. [cmat.h]

Software by Brad Hanson

Brad Hanson's Home Page

URL of this page: http://www.b-a-h.com/software/cpp/scppnt.html

Last updated: September 8, 2000