Contents of the README.DOC file
YAMP - Yet Another Matrix Program v1.5
Author: Mark Von Tress, Ph.D.
The programs contained in the archive are an upgrade of C++
matrix algebra package. The package supports recursive matrix
functions. Two memory models are available: in RAM and out of
RAM. In ram matrices are limited to 64k in size. External
Matrices are stored in a virtual memory file that can be stored
in a RAM disk, and is limited to 32 megs. Virtual matrices can
be larger than 640K. There is a tradeoff between speed and
The in ram memory model works in all but the tiny memory model.
The virtual memory model compile under the large and huge memory
models of Turbo C++ v1.0, 2.0, 3.0, and 3.1. Microsoft C/C++
v7.0 compatability has been added. The documentation is written
in LaTex, so you will have to find an installation of LaTex
somewhere to print the document as a book. The text should be
readable in ASCII format if you ignore the TEX control
sequences. They begin with a backslash, '\'. Typical sequences
to ignore are \verb, \index, \cite,
\begin, \end. Also ignore the \ in \$.
This upgrade of YAMP provides several new functions, and
an improvement or two:
- an in ram version that works for all but the tiny memory
- User code for the in-ram and virtual memory model is identical.
- Important: I removed the initialization to 0 of virtual matrices, so
programs written in YAMP 1.0 must be adapted if they use
the assumption that a matrix starts as a zero matrix. This
increases the speed considerably.
- A copy constructor that allows statements like
"VMatrix V = Inv(Tran(X)*X);" to work as expected. Version 1.0
had a problem with this because it did not have a copy
- Many new functions: determinant, cholesky
decomposition, QR decomposition, singular valued
decomposition, generalized inverse, a nearly fast
fourier transform (and inverse), vec, vecdiag,
diag, shape, sum, sum of squares, cumulative
summation, max, min, and elemetary row and column
- SGREP has been removed, since the functions above have
- The header virt.h has been docuemented so that it can be
used as a quick reference.
About the only other thing I can think of needing in a matrix package
is a graphics object. I'm still working on it and hope to finish
it by this Spring or Summer. This is still one of my after hours
hobby type projects, so I can't promise much.
This is an improved version of version 1.1
- A graphic object for X-Y plots. This requires Borland
graphics interface files.
- A 15 to 20 percent speed improvement using a deep-copy
trick on the stack. The stack now stores references
to the vectors in virtual matrices instead of copying
- An Index function for generating index matrices.
- Important, The virtual matrix copy constructor
performs garbage collection by calling cleanstack().
This means functions that use copy constructors
should also call Inclevel() before using
the copy constructor.
- Some bugs were fixed in the string operators '+'.
The names in Mexp, Mlog, Mabs, etc were fixed.
The make files work now for building a Borland
library. I also got sloppy and left out some
- Added a statistical distribution function module.
It has the 4 main families of continuous distributions
used in applied statistics. The module also has
- Bug Fix: Scalar subtraction, M-a, was corrected. It
produced a-M since I just cut and pasted the M-a
routine above it. See Virtram.cpp or virtdsk.cpp
for the fix. You should also check for this in any
earlier versions of YAMP. It was in version 1.0 through
- Added division of a scalar by a matrix a/M.
- Fixed Index so it counts downward correctly
- Fixed a memory leak in the disk version copy
constructor. The hdr in the vdoub constructor
needed to be purged in the copy constructor, then
recreated by SetupVectors. This was not a problem
in the ram version.
- Added Microsoft V7.0 compatability to all but the
graphics module. A new graphics module is being
developed for MSC.
- Minor speed improvements using the define NO_CHECKING.
The range check in m(i,j), and Garbage() are skipped
at compile time if NO_CHECKING is defined. Garbage() is
still called, but the checks are not executed. Use
this option in finished code.
The files are:
docu.texThe main tex file for constructing the
intro.texThe introduction and terms of ownership
string.texAn explanation of the string object.
vmm.tex An explanation of the virtual memory
vdoub.texAn explanation of the vector of virtual
vmatrix.texAn explanation of the VMatrix object.
stack.texAn explanation of the stack.
functs.texAn explanation of the matrix functions.
dist.tex An explanation of the distribution functions.
graph.tex An explanation of the GMatrix object.
conc.tex conclusions chapter
yamp.texHow to use the .cpp and .h files
app1.texAppendix A: the test suite file
app2.tex Appendix B: the regression test suite
app3.tex Appendix C: GMatrix test suite
Correlogram and Periodogram.
history.tex Revision history
docuind.texThe index file.
catchv.datsome data for the test suite.
test.cppthe test suite
testreg.cpp the regression test suite.
testgraf.cpp the graph test suite
xyp.cpp another graphics test suite.
virt.cppcode for the virtual matrix objects
virtram.cpp code for in ram memory model
virtdisk.cpp code for virtual memory model
virtop.cppmatrix operations code.
virtgraf.cpp Graphics matrix.
dist.h header for distribution module
dist.cpp distribution module
disttest.cpp test menu for distribution module
to_lib.mak Make file for a library file
maketest.mak Make file the test suite
loade.bat batch file for copying headers to ram disk
DOS commands for combining the appropriate tex files are
copy intro.tex+string.tex+vmm.tex+vdoub.tex+vmatrix.tex+functs.tex vmat1.doc
copy vmat1.doc+dist.tex+graph.tex+conc.tex+yamp.tex+app1.tex vmat2.doc
copy vmat2.doc+app2.tex+app3.tex+history.tex vmat.doc
Distribution: I only plan to distribute this code over
networks. I also hope to tap other sources of distribution.
It is in the public domain, so it may be copied freely. I
have obtained a copyright as legal evidence of my
authorship. I do not plan to enforce it otherwise.
It cost me about $20US to mail this code on the continent.
(printing a manual, preparing the diskette, envelopes,
postage, and my time.). For those of you who do not have
access to LaTex, if you want a printed copy of the
documentation and a diskette containing the source code,
please send $20US to the address below. I will also keep a
record of people who contact me about the code.
My address for the next year or so is
Mark Von Tress, Ph.D.
P.O. Box 171173
Arlington Tx 76003
DISCLAIMER: THIS PROGRAM IS PROVIDED AS IS, WITHOUT ANY
WARRANTY, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
TO FITNESS FOR A PARTICULAR PURPOSE. THE AUTHOR DISCLAIMS
ALL LIABILITY FOR DIRECT OR CONSEQUENTIAL DAMAGES RESULTING
FROM USE OF THIS PROGRAM.