|
|||||||||
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.GeneralMatrix
public class 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.
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 | |
---|---|
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 sim.util.mantissa.linalg.NonNullRange |
getRangeForColumn(int j)
Set a range to the non null part covered by a column. |
protected sim.util.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 sim.util.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 matrixpublic 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 copyMethod Detail |
---|
public Matrix duplicate()
Matrix
Object.clone()
method, except that it has public access, it doesn't throw any
specific exception and it returns a Matrix.
duplicate
in class Matrix
Object.clone()
public void selfAdd(Matrix m)
m
- matrix to add
java.lang.IllegalArgumentException
- if there is a dimension mismatchpublic void selfSub(Matrix m)
m
- matrix to substract
java.lang.IllegalArgumentException
- if there is a dimension mismatchprotected sim.util.mantissa.linalg.NonNullRange getRangeForRow(int i)
Matrix
getRangeForRow
in class Matrix
i
- index of the row
Matrix.getRangeForColumn(int)
protected sim.util.mantissa.linalg.NonNullRange getRangeForColumn(int j)
Matrix
getRangeForColumn
in class Matrix
j
- index of the column
Matrix.getRangeForRow(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |