public class DiagonalMatrix extends SquareMatrix
| Constructor and Description |
|---|
DiagonalMatrix(DiagonalMatrix d)
Copy constructor.
|
DiagonalMatrix(int order)
Simple constructor.
|
DiagonalMatrix(int order,
double value)
Simple constructor.
|
DiagonalMatrix(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.
|
SquareMatrix |
getInverse(double epsilon)
Invert the instance.
|
org.spaceroots.mantissa.linalg.NonNullRange |
getRangeForColumn(int j)
Set a range to the non null part covered by a column.
|
org.spaceroots.mantissa.linalg.NonNullRange |
getRangeForRow(int i)
Set a range to the non null part covered by a row.
|
void |
setElement(int i,
int j,
double value)
Set a matrix element.
|
Matrix |
solve(Matrix b,
double epsilon)
Solve the A.X = B equation.
|
solveadd, getColumns, getElement, getRows, getTranspose, mul, mul, selfMul, sub, toStringpublic DiagonalMatrix(int order)
order - order of the matrixpublic DiagonalMatrix(int order,
double value)
order - order of the matrixvalue - value for the diagonal elementspublic DiagonalMatrix(int order,
double[] data)
order - order of the matrixdata - table of the matrix elements (stored row after row)public DiagonalMatrix(DiagonalMatrix d)
d - diagonal 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 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 SquareMatrix getInverse(double epsilon) throws SingularMatrixException
SquareMatrixgetInverse in class SquareMatrixepsilon - threshold on matrix elements below which the
matrix is considered singularSingularMatrixException - if the matrix is singularpublic 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 singularpublic org.spaceroots.mantissa.linalg.NonNullRange getRangeForRow(int i)
MatrixgetRangeForRow in class Matrixi - index of the rowMatrix.getRangeForColumn(int)public 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.