public abstract class SquareMatrix extends Matrix
This class is the base class of all square matrix
implementations. It extends the Matrix class with methods
specific to square matrices.
| Modifier | Constructor and Description |
|---|---|
protected |
SquareMatrix(int order)
Simple constructor.
|
protected |
SquareMatrix(int order,
double[] data)
Simple constructor.
|
protected |
SquareMatrix(SquareMatrix m)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract double |
getDeterminant(double epsilon)
Get the determinant of the matrix.
|
SquareMatrix |
getInverse(double epsilon)
Invert the instance.
|
abstract Matrix |
solve(Matrix b,
double epsilon)
Solve the A.X = B equation.
|
SquareMatrix |
solve(SquareMatrix b,
double epsilon)
Solve the A.X = B equation.
|
add, duplicate, getColumns, getElement, getRangeForColumn, getRangeForRow, getRows, getTranspose, mul, mul, selfMul, setElement, sub, toStringprotected SquareMatrix(int order)
order - order of the matrixprotected SquareMatrix(int order,
double[] data)
order - order of the matrixdata - table of the matrix elements (stored row after row)protected SquareMatrix(SquareMatrix m)
m - matrix to copypublic abstract double getDeterminant(double epsilon)
epsilon - threshold on matrix elements below which the
matrix is considered singular (this is used by the derived
classes that use a factorization to compute the determinant)public SquareMatrix getInverse(double epsilon) throws SingularMatrixException
epsilon - threshold on matrix elements below which the
matrix is considered singularSingularMatrixException - if the matrix is singularpublic abstract Matrix solve(Matrix b, double epsilon) throws SingularMatrixException
b - second term of the equationepsilon - threshold on matrix elements below which the
matrix is considered singularSingularMatrixException - if the matrix is singularpublic SquareMatrix solve(SquareMatrix b, double epsilon) throws SingularMatrixException
b - second term of the equationepsilon - threshold on matrix elements below which the
matrix is considered singularSingularMatrixException - if the matrix is singularCopyright © 2001-2007 Luc Maisonobe. All Rights Reserved.