|
||||||||||
| 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
sim.util.mantissa.linalg.LowerTriangularMatrix
This class implements lower triangular matrices of linear algebra.
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 | |
LowerTriangularMatrix(int order)
Simple constructor. |
|
LowerTriangularMatrix(int order,
double[] data)
Simple constructor. |
|
LowerTriangularMatrix(LowerTriangularMatrix l)
Copy constructor. |
|
| Method Summary | |
Matrix |
duplicate()
Polymorphic copy operator. |
double |
getDeterminant(double epsilon)
Get the determinant of the matrix. |
sim.util.mantissa.linalg.NonNullRange |
getRangeForColumn(int j)
Set a range to the non null part covered by a column. |
sim.util.mantissa.linalg.NonNullRange |
getRangeForRow(int i)
Set a range to the non null part covered by a row. |
void |
selfAdd(LowerTriangularMatrix l)
Add a matrix to the instance. |
void |
selfSub(LowerTriangularMatrix l)
Substract a matrix from the instance. |
void |
setElement(int i,
int j,
double value)
Set a matrix element. |
Matrix |
solve(Matrix b,
double epsilon)
Solve the A.X = B equation. |
| Methods inherited from class sim.util.mantissa.linalg.SquareMatrix |
getInverse, solve |
| Methods inherited from class sim.util.mantissa.linalg.Matrix |
add, getColumns, getElement, getRows, getTranspose, mul, mul, selfMul, sub, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LowerTriangularMatrix(int order)
order - order of the matrix
public LowerTriangularMatrix(int order,
double[] data)
order - order of the matrixdata - table of the matrix elements (stored row after row)public LowerTriangularMatrix(LowerTriangularMatrix l)
l - lower triangular matrix to copy| Method Detail |
public Matrix duplicate()
MatrixObject.clone()
method, except that it has public access, it doesn't throw any
specific exception and it returns a Matrix.
duplicate in class MatrixObject.clone()
public void setElement(int i,
int j,
double value)
Matrix
setElement in class Matrixi - row index, from 0 to rows - 1j - column index, from 0 to cols - 1value - value of the elementMatrix.getElement(int, int)public void selfAdd(LowerTriangularMatrix l)
l - lower triangular matrix to add
java.lang.IllegalArgumentException - if there is a dimension mismatchpublic void selfSub(LowerTriangularMatrix l)
l - lower triangular matrix to substract
java.lang.IllegalArgumentException - if there is a dimension mismatchpublic double getDeterminant(double epsilon)
SquareMatrix
getDeterminant in class SquareMatrixepsilon - 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 Matrix solve(Matrix b,
double epsilon)
throws SingularMatrixException
SquareMatrix
solve in class SquareMatrixb - second term of the equationepsilon - threshold on matrix elements below which the
matrix is considered singular
SingularMatrixException - if the matrix is singularpublic sim.util.mantissa.linalg.NonNullRange getRangeForRow(int i)
Matrix
getRangeForRow in class Matrixi - index of the row
Matrix.getRangeForColumn(int)public sim.util.mantissa.linalg.NonNullRange getRangeForColumn(int j)
Matrix
getRangeForColumn in class Matrixj - index of the column
Matrix.getRangeForRow(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||