Matv is a simple C++ matrix class. It is simple in the sense that it is not a template matrix class. It only allows a program to have one type of matrix: float, double, or complex. The class is specifically designed to make matrix algebra easier: Matrix Betahat = Inv(Tran(X)*X)*Tran(X)*Y; solves the least squares normal equations when the matrices X and Y have been appropriately defined.
Matv was developed under DOS, so it aims at being small and fast. However, it works well in 32 bit environements such as UNIX and Windows 95. Matrices are dense, as opposed to sparse. Under DOS, a matrix can only be as large as 64K. Matrices may be of virtually any size in a 32 bit, or DOS extended, environement. Special care was taken to make sure that moving around large matrices was as fast as possible. I recently used it to create a 2,000,000x2 matrix of floats in Windows 95, and the thing did not even burp.
Matv has been tested in most PC compilers, and began with the first release of C++ from Borland. I have made sure to keep it current. The next version will fix some problems I have found with BC 5. It has been tested with Symantic, Watcom, Microsoft, and Borland C++ compilers. I have also done some limited testing with djgpp. Since I have aimed at general compatability with most major PC compilers, I have had to avoid some of the more advanced features of C++ such as exceptions, RTTI, and templates. These features did not exist when I started MATV, so it would take a major redesign to include them.
Since I am a statistician with an interest in linear models, Matv is oriented to statistical applications, rather that more traditional mathematical numerical analysis applications. I got interested in C++ because I did not have PROC MATRIX or PROC IML of SAS available to me in my work place. I tried to capture as much as I could the functionality of PROC MATRIX. This is not to say that it is not useful for other applications.
I also wrote and distribute Matv so that it will be valuable to students using matrix algebra. I would have liked to have some really inexpensive but very effective matirx code while I was writing my dissertation. Someone helped me in this regard, and I am passing on his generousity to a larger audience.
Most of the features of Matv are fairly standard. There are also several features that are advanced. Many of the advanced algorithms were translations from FORTRAN or other C/C++ sources. I have tried not to cross the line of copy right violation, but I suspect my toe crossed it a little here and there. All of the code has been made to fit into the structure of Matv, so anything that was translated was not copied verbatim. I have tested the code against SAS where possible, and have recieved reasonable agreement from the routines for several years. In those cases where SAS does not provide a direct comparison, tests for internal consistence were used to validate the output. I have not kept a written record of the validation, but I would not put out code that I have not used for several years with satisfaction of its correctness.
Note that the Zip file contains only source code. If you are Compuserve member, you can get the code in the science/math forum. Last updated 5/10/02