2.3 Class Groups of the Linear Algebra Module
The classes of the Linear Algebra Module can be divided into the following class groups:
*Math Vector Classes (See Section 2.3.1)
*Sparse Matrix Classes (See Section 2.3.2)
*Factorization Classes (See Section 2.3.3)
*Symmetric Eigenvalue Decomposition Classes (See Section 2.3.4)
*Nonsymmetric Eigenvalue Decomposition Classes (See Section 2.3.5)
*Least Squares Factorization Classes (See Section 2.3.6)
*Decomposition Classes (See Section 2.3.7)
2.3.1 Math Vector Classes
The Linear Algebra Module uses the vector classes from the Essential Math Module. See RWMathVec<T> in the SourcePro C++ API Reference Guide. The Math Vector Classes are contained in Table 1.
Table 1 – The Math Vector Classes 
Class Name
Description
A templatized vector class.
2.3.2 Sparse Matrix Classes
The Linear Algebra Module classes represent a variety of matrix types, including: general, dense symmetric, skew symmetric, Hermitian, banded, symmetric banded, Hermitian banded, upper-triangular, lower-triangular, and tridiagonal. These classes are contained in Table 2.
Table 2 – The Sparse Matrix Classes 
Class Name
Type
Header Files
A banded matrix. A banded matrix is nonzero only near the diagonal.
rw/lapack/bandmat.h
A Hermitian banded matrix. A Hermitian banded matrix is Hermitian, and nonzero only near the diagonal.
rw/lapack/hbndmat.h
A Hermitian dense matrix. A Hermitian matrix is defined by the requirement that Aij = conj(Aji).
rw/lapack/hermmat.h
A lower triangular matrix. A lower triangular matrix is 0 above the diagonal.
rw/lapack/ltrimat.h
A skew symmetric matrix.
rw/lapack/skewmat.h
A symmetric band matrix. A symmetric banded matrix is symmetric, and nonzero only near the diagonal.
rw/lapack/sbndmat.h
A symmetric matrix. A symmetric matrix is defined by the requirement that Aij = Aji, so a symmetric matrix is equal to its transpose.
rw/lapack/symmat.h
A tridiagonal matrix. A tridiagonal matrix is nonzero only on the diagonal, the subdiagonal, and the superdiagonal.
rw/lapack/trdgmat.h
An upper triangular matrix. An upper triangular matrix is 0 below the diagonal.
rw/lapack/utrimat.h
2.3.3 Factorization Classes
Factorization objects provide an alternate representation of a system of equations which can be used for solving the system, computing determinants, estimating a condition number, or computing an inverse. Factorizations are provided for the following types of systems: general dense, positive definite symmetric, general symmetric, positive definite Hermitian, general Hermitian, banded, positive definite banded, tridiagonal, and positive definite tridiagonal. The Factorization Classes are contained in Table 3.
Table 3 – The Factorization Classes 
Class Name
Type
Header File
Encapsulates factorizations of banded systems.
rw/lapack/bandfct.h
Encapsulates factorizations of positive definite banded systems.
rw/lapack/pdbdfct.h
Encapsulates factorizations of positive definite systems.
rw/lapack/pdfct.h
Encapsulates factorizations of positive definite tridiagonal systems.
rw/lapack/pdtdfct.h
Encapsulates factorizations of general Hermitian systems.
rw/lapack/hermfct.h
Encapsulates factorizations of general symmetric systems.
rw/lapack/symfct.h
Encapsulates factorizations of tridiagonal systems.
rw/lapack/trdgfct.h
2.3.4 Symmetric Eigenvalue Decomposition Classes
The Linear Algebra Module provides a number of objects for solving symmetric eigenvalue problems. The Symmetric Eigenvalue Decomposition Classes are contained in Table 4.
Table 4 – The Symmetric Eigenvalue Decomposition Classes 
Class Name
Type
Header File
Encapsulates the eigenvalues and eigenvectors of a symmetric matrix, a Hermitian in the complex case.
rw/lapack/symeig.hrw/lapack/hermeig.h
An abstract base class for the symmetric eigenvalue servers.
rw/lapack/seigsrv.h
An abstract base class for the Hermitian eigenvalue servers.
rw/lapack/heigsrv.h
Servers for the positive definite QR method of computing eigenvalues. These servers apply only to matrices that you know are positive definite.
rw/lapack/seigsrv.hrw/lapack/heigsrv.h
Servers for the QR method of computing eigenvalues.
rw/lapack/seigsrv.hrw/lapack/heigsrv.h
Symmetric eigenvalue server classes, which allow the computation of only the eigenvalues in a given range and (optionally) their corresponding eigenvectors.
rw/lapack/seigsrv.h
rw/lapack/heigsrv.h
Servers for the root-free QR method of computing eigenvalues. This method computes all the eigenvalues and no eigenvectors.
rw/lapack/seigsrv.h
rw/lapack/heigsrv.h
Symmetric eigenvalue server classes and the Hermitian eigenvalue server class, respectively, allow the computation of a subset of the eigenvalues and (optionally) their corresponding eigenvectors.
rw/lapack/seigsrv.hrw/lapack/heigsrv.h
A tridiagonal decomposition of a symmetric matrix A: A=Q’TQ where Q is orthogonal and T is tridiagonal and real.
rw/lapack/td.h
2.3.5 Nonsymmetric Eigenvalue Decomposition Classes
Just as in the symmetric case, the Linear Algebra Module provides a number of decompositions and servers in a carefully layered interface. In particular, you can construct and use the Schur and Hessenberg decompositions as easily as the more standard eigenvalue decomposition. The Nonsymmetric Eigenvalue Decomposition Classes are contained in Table 5.
Table 5 – The Nonsymmetric Eigenvalue Decomposition Classes 
Class Name
Type
Header Files
Encapsulates the eigenvalues and eigenvectors of a nonsymmetric matrix.
rw/lapack/eig.h
Abstract base classes for the nonsymmetric eigenvalue servers.
rw/lapack/eigsrv.h
Encapsulates Hessenberg decomposition eigenvalue servers, which are used to construct eigenvalue decomposition objects.
rw/lapack/eigsrv.h
Encapsulates a Hessenberg decomposition as well as an optional balance transformation.
rw/lapack/hess.h
Encapsulates a Schur decomposition as well as an optional balance transformation.
rw/lapack/schur.h
Encapsulates Schur decomposition eigenvalue servers which construct eigenvalue decomposition objects from Schur decompositions.
rw/lapack/eigsrv.h
2.3.6 Least Squares Factorization Classes
The Least Squares Factorization Classes allow you to find the best solution to an over-determined or under-determined system of equations. These classes are contained in Table 6.
Table 6 – The Least Squares Factorization Classes 
Class Name
Type
Header File
Encapsulates a factorization object using a Ch factorization.
rw/lapack/lsch.h
Encapsulates a factorization object using a QR factorization.
rw/lapack/lsqr.h
Encapsulates a factorization object using a SV factorization.
rw/lapack/lssv.h
2.3.7 Decomposition Classes
The Decomposition Classes allow construction and manipulation of QR, complete orthogonal, and singular value decompositions. These classes are contained in Table 7:
Table 7 – The Decomposition Classes 
Class Name
Type
Header File
A permutation and balance transformation performed on a nonsymmetric matrix before computing its eigenvalues.
rw/lapack/bal.h
Encapsulates two transformations: a permutation and balance transformation performed on a nonsymmetric matrix before computing its eigenvalues.
rw/lapack/bal.h
A symmetric tridiagonal decomposition of a symmetric banded matrix A: A=QTQ’ where Q is orthogonal and T is real tridiagonal symmetric.
rw/lapack/td.h
Encapsulates a complete orthogonal decomposition.
rw/lapack/co.h
The symmetric tridiagonal decomposition of a dense symmetric matrix A, where:A: A=QTQ’ and Q is orthogonal and T is real tridiagonal symmetric.
rw/lapack/td.h
Computes the QR decomposition of a matrix using LAPACK function xgeqpf or xgeqrf.
rw/lapack/qrcalc.h
Computes the QR decomposition of a matrix using LAPACK function xgeqp3.
rw/lapack/qrcalcp3.h
Used to construct and work with QR decompositions or to solve linear least squares problems.
rw/lapack/qr.h
A QR decomposition server used to construct instances of the QR decomposition classes,
rw/lapack/qr.h
Computes the singular value decomposition of a matrix.
rw/lapack/svdcalc.h
Computes the singular value decomposition of a matrix using divide-and-conquer.
rw/lapack/svddccalc.h
Used to construct and work with singular value decompositions.
rw/lapack/sv.h
Used to construct instances of the singular value decomposition class.
rw/lapack/sv.h