|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.spaceroots.mantissa.linalg.Matrix
org.spaceroots.mantissa.linalg.GeneralMatrix
This class represents matrices of the most general type.
This class is the basic implementation of matrices to use when nothing special is known about the structure of the matrix.
| Field Summary |
| Fields inherited from class org.spaceroots.mantissa.linalg.Matrix |
columns, data, rows |
| Constructor Summary | |
GeneralMatrix(int rows,
int columns)
Simple constructor. |
|
GeneralMatrix(int rows,
int columns,
double[] data)
Simple constructor. |
|
GeneralMatrix(Matrix m)
Copy constructor. |
|
| Method Summary | |
Matrix |
duplicate()
Polymorphic copy operator. |
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(Matrix m)
Add a matrix to the instance. |
void |
selfSub(Matrix m)
Substract a matrix from the instance. |
| Methods inherited from class org.spaceroots.mantissa.linalg.Matrix |
add, getColumns, getElement, 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 |
public GeneralMatrix(int rows,
int columns)
rows - number of rows of the matrixcolumns - number of columns of the matrix
public GeneralMatrix(int rows,
int columns,
double[] data)
rows - number of rows of the matrixcolumns - number of columns of the matrixdata - table of the matrix elements (stored row after row)public GeneralMatrix(Matrix m)
m - 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 selfAdd(Matrix m)
m - matrix to add
IllegalArgumentException - if there is a dimension mismatchpublic void selfSub(Matrix m)
m - matrix to substract
IllegalArgumentException - if there is a dimension mismatchprotected org.spaceroots.mantissa.linalg.NonNullRange getRangeForRow(int i)
Matrix
getRangeForRow in class Matrixi - index of the row
Matrix.getRangeForColumn(int)protected org.spaceroots.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 | |||||||||