public class GeneralSquareMatrix extends SquareMatrix
| Constructor and Description |
|---|
GeneralSquareMatrix(GeneralSquareMatrix s)
Copy constructor.
|
GeneralSquareMatrix(int order)
Simple constructor.
|
GeneralSquareMatrix(int order,
double[] data)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Matrix |
duplicate()
Polymorphic copy operator.
|
double |
getDeterminant(double epsilon)
Get the determinant of the matrix.
|
protected org.spaceroots.mantissa.linalg.NonNullRange |
getRangeForColumn(int j)
Set a range to the non null part covered by a column.
|
protected org.spaceroots.mantissa.linalg.NonNullRange |
getRangeForRow(int i)
Set a range to the non null part covered by a row.
|
void |
selfAdd(SquareMatrix s)
Add a matrix to the instance.
|
void |
selfSub(SquareMatrix s)
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.
|
getInverse, solveadd, getColumns, getElement, getRows, getTranspose, mul, mul, selfMul, sub, toStringpublic GeneralSquareMatrix(int order)
order - order of the matrixpublic GeneralSquareMatrix(int order,
double[] data)
order - order of the matrixdata - table of the matrix elements (stored row after row)public GeneralSquareMatrix(GeneralSquareMatrix s)
s - square matrix to copypublic Matrix duplicate()
MatrixObject.clone()
method, except that it has public access, it doesn't throw any
specific exception and it returns a Matrix.public void setElement(int i,
int j,
double value)
MatrixsetElement 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(SquareMatrix s)
s - square matrix to addjava.lang.IllegalArgumentException - if there is a dimension mismatchpublic void selfSub(SquareMatrix s)
s - square matrix to substractjava.lang.IllegalArgumentException - if there is a dimension mismatchpublic double getDeterminant(double epsilon)
SquareMatrixgetDeterminant 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
SquareMatrixsolve in class SquareMatrixb - second term of the equationepsilon - threshold on matrix elements below which the
matrix is considered singularSingularMatrixException - if the matrix is singularprotected org.spaceroots.mantissa.linalg.NonNullRange getRangeForRow(int i)
MatrixgetRangeForRow in class Matrixi - index of the rowMatrix.getRangeForColumn(int)protected org.spaceroots.mantissa.linalg.NonNullRange getRangeForColumn(int j)
MatrixgetRangeForColumn in class Matrixj - index of the columnMatrix.getRangeForRow(int)Copyright © 2001-2007 Luc Maisonobe. All Rights Reserved.