|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsim.util.mantissa.linalg.Matrix
sim.util.mantissa.linalg.SquareMatrix
public abstract class SquareMatrix
This class factor all services common to square matrices of linear algebra.
This class is the base class of all square matrix
implementations. It extends the Matrix
class with methods
specific to square matrices.
This file is from the "Mantissa" Java software package found at http://www.spaceroots.org/software/mantissa/index.html. The license is included at the end of the source file.
Field Summary |
---|
Fields inherited from class sim.util.mantissa.linalg.Matrix |
---|
columns, data, rows |
Constructor Summary | |
---|---|
protected |
SquareMatrix(int order)
Simple constructor. |
protected |
SquareMatrix(int order,
double[] data)
Simple constructor. |
protected |
SquareMatrix(SquareMatrix m)
Copy constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class sim.util.mantissa.linalg.Matrix |
---|
add, duplicate, getColumns, getElement, getRangeForColumn, getRangeForRow, getRows, getTranspose, mul, mul, selfMul, setElement, sub, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected 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 copyMethod Detail |
---|
public 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 singular
SingularMatrixException
- 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 singular
SingularMatrixException
- 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 singular
SingularMatrixException
- if the matrix is singular
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |