Vector and Matrix Classes Source Code
Vector and Matrix Classes

Christopher Siefert and Virginia Torczon

Our C++ Vector and Matrix classes, built from the Template Numerical Toolkit (TNT), implement vectors and matrices in a fashion suitable for numerical computation in C++. The Template Numerical Toolkit was originally created by Roldan Pozo, who is a research scientist in the Mathematical and Computational Sciences Division of the Information Technology Laboratory at the National Institute of Standards and Technology (NIST).

Our version was modified by Christopher Siefert to add increased functionality. New features include a function to compute the Euclidean norm of a vector (based on the Basic Linear Algebra Subprogram (BLAS) dnrm2), as well as alternative methods for accessing matrix data. Another practical modification made to TNT included the elimination of the use of namespaces.


We thank the National Science Foundation for support received under Grant No. CCR-9734044. In addition, Chris received support from the College of William & Mary under a Batten Scholarship during the summer of 1999, when this extension to TNT was developed.

Vector and Matrix Classes Source Code

The bracketed links below are to C++ files. Other links lead to descriptions of the files. If you wish to save the files below rather than view them, click on the link with the SHIFT key depressed. With a Netscape browser, this will bring up a "Save As" dialog box.


Compressed File (for the two class files)

You may download all of the files listed below in compressed form here. To extract files with gnu zip and tar facilities after downloading, use gtar zxvf Vectors.tgz.
[Vectors.tgz]

Class Files

Vector Class [vec.h]
Matrix Class [cppmat.h]