The matrix and vector classes support three different numeric types. These are integer (for speed), double (for accuracy) and complex.
The square matrix classes introduce the following methods:
luDecompose
)
Decomposes a matrix M into a lower triangular matrix L and an upper triangular matrix U, such that M=LU.
choleskyDecompose
)
Similar to LU decomposition but with the addition property that U=LT. The matrix must be symmetric and positive definite for this to work correctly.
singularValueDecompose
)
Decomposes a matrix M into an orthogonal matrix U, a diagonal matrix S and an orthogonal matrix V, such that M=USVT.
inverse
)
Computes the inverse of a matrix using LU decomposition (M-1=U-1L-1).
Where ever possible, the abstract matrix/vector API should be used in preference to a particular matrix/vector implementation API.
That is, use code like AbstractDoubleVector vec = new DoubleVector(dim);
.
This philosophy is similar to that of the Java Collections Framework.