Virtual Matrices

In the virtual memory version, the virtual matrix clsass is derived from the virtual vector. Thus, before the VMatrix is constructed, the constructor for a vdoub is called. The members of vdoub are private to the VMatrix class, so they are available to the member functions of VMatrix. The matrix class stores its elements in a virtual vector in row major order. That is, the rows of the matrix are stored sequentially in the vector. Access and storage of the matrix elements is achieved through vdoub::operator[].

A full set of functions is created for the matrix class. Assignment of matrices and elements is developed. Functions are also created for

  1. manipulating the matrix name,
  2. for displaying matrix information,
  3. for arithmetic operations,
  4. for data io,
  5. for matrix functions,
  6. for recursive calculations,
  7. and nested function calls.
Much of this is accomplished using a stack of virtual matrices which will be discussed in more detail later. For now, it is sufficient to say that the matrix stack is a derived class of VMatrix, but many of the public functions of the stack class are used in VMatrix. Thus the two classes form something of a symbiosis rather than a strict hierarchy. The stack base is called Dispatch, and all other stack matrices are unaccessible to other functions.



Subsections