|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math.linear.RealLinearOperator
org.apache.commons.math.linear.AbstractRealMatrix
org.apache.commons.math.linear.OpenMapRealMatrix
public class OpenMapRealMatrix
Sparse matrix implementation based on an open addressed map.
| Constructor Summary | |
|---|---|
OpenMapRealMatrix(int rowDimension,
int columnDimension)
Build a sparse matrix with the supplied row and column dimensions. |
|
OpenMapRealMatrix(OpenMapRealMatrix matrix)
Build a matrix by copying another one. |
|
| Method Summary | |
|---|---|
OpenMapRealMatrix |
add(OpenMapRealMatrix m)
Compute the sum of this matrix and m. |
void |
addToEntry(int row,
int column,
double increment)
Change an entry in the specified row and column. |
OpenMapRealMatrix |
copy()
Returns a (deep) copy of this. |
OpenMapRealMatrix |
createMatrix(int rowDimension,
int columnDimension)
Create a new RealMatrix of the same type as the instance with the supplied row and column dimensions. |
int |
getColumnDimension()
Returns the number of columns of this matrix. |
double |
getEntry(int row,
int column)
Get the entry in the specified row and column. |
int |
getRowDimension()
Returns the number of rows of this matrix. |
OpenMapRealMatrix |
multiply(OpenMapRealMatrix m)
Postmultiply this matrix by m. |
RealMatrix |
multiply(RealMatrix m)
Returns the result of postmultiplying this by m. |
void |
multiplyEntry(int row,
int column,
double factor)
Change an entry in the specified row and column. |
void |
setEntry(int row,
int column,
double value)
Set the entry in the specified row and column. |
OpenMapRealMatrix |
subtract(OpenMapRealMatrix m)
Subtract m from this matrix. |
OpenMapRealMatrix |
subtract(RealMatrix m)
Compute this minus m. |
| Methods inherited from class org.apache.commons.math.linear.AbstractRealMatrix |
|---|
add, copySubMatrix, copySubMatrix, equals, getColumn, getColumnMatrix, getColumnVector, getData, getFrobeniusNorm, getNorm, getRow, getRowMatrix, getRowVector, getSubMatrix, getSubMatrix, getTrace, hashCode, isSquare, operate, operate, power, preMultiply, preMultiply, preMultiply, scalarAdd, scalarMultiply, setColumn, setColumnMatrix, setColumnVector, setRow, setRowMatrix, setRowVector, setSubMatrix, toString, transpose, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInRowOrder, walkInRowOrder, walkInRowOrder, walkInRowOrder |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.commons.math.linear.RealMatrix |
|---|
add, copySubMatrix, copySubMatrix, getColumn, getColumnMatrix, getColumnVector, getData, getFrobeniusNorm, getNorm, getRow, getRowMatrix, getRowVector, getSubMatrix, getSubMatrix, getTrace, operate, operate, power, preMultiply, preMultiply, preMultiply, scalarAdd, scalarMultiply, setColumn, setColumnMatrix, setColumnVector, setRow, setRowMatrix, setRowVector, setSubMatrix, transpose, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInRowOrder, walkInRowOrder, walkInRowOrder, walkInRowOrder |
| Methods inherited from interface org.apache.commons.math.linear.AnyMatrix |
|---|
isSquare |
| Constructor Detail |
|---|
public OpenMapRealMatrix(int rowDimension,
int columnDimension)
rowDimension - Number of rows of the matrix.columnDimension - Number of columns of the matrix.public OpenMapRealMatrix(OpenMapRealMatrix matrix)
matrix - matrix to copy.| Method Detail |
|---|
public OpenMapRealMatrix copy()
copy in interface RealMatrixcopy in class AbstractRealMatrix
public OpenMapRealMatrix createMatrix(int rowDimension,
int columnDimension)
createMatrix in interface RealMatrixcreateMatrix in class AbstractRealMatrixrowDimension - the number of rows in the new matrixcolumnDimension - the number of columns in the new matrix
public int getColumnDimension()
getColumnDimension in interface AnyMatrixgetColumnDimension in class AbstractRealMatrixpublic OpenMapRealMatrix add(OpenMapRealMatrix m)
m.
m - Matrix to be added.
this + m.
DimensionMismatchException - if m is not the same size as this matrix.public OpenMapRealMatrix subtract(RealMatrix m)
subtract in interface RealMatrixsubtract in class AbstractRealMatrixm - matrix to be subtracted
public OpenMapRealMatrix subtract(OpenMapRealMatrix m)
m from this matrix.
m - Matrix to be subtracted.
this - m.
DimensionMismatchException - if m is not the same size as this matrix.public RealMatrix multiply(RealMatrix m)
multiply in interface RealMatrixmultiply in class AbstractRealMatrixm - matrix to postmultiply by
public OpenMapRealMatrix multiply(OpenMapRealMatrix m)
m.
m - Matrix to postmultiply by.
this * m.
MatrixDimensionMismatchException - if the number of rows of m differ from the number of columns
of this matrix.
public double getEntry(int row,
int column)
getEntry in interface RealMatrixgetEntry in class AbstractRealMatrixrow - Row location of entry to be fetched.column - Column location of entry to be fetched.
(row, column).public int getRowDimension()
getRowDimension in interface AnyMatrixgetRowDimension in class AbstractRealMatrix
public void setEntry(int row,
int column,
double value)
setEntry in interface RealMatrixsetEntry in class AbstractRealMatrixrow - Row location of entry to be set.column - Column location of entry to be set.value - matrix entry to be set.
public void addToEntry(int row,
int column,
double increment)
addToEntry in interface RealMatrixaddToEntry in class AbstractRealMatrixrow - Row location of entry to be set.column - Column location of entry to be set.increment - value to add to the matrix entry.
public void multiplyEntry(int row,
int column,
double factor)
multiplyEntry in interface RealMatrixmultiplyEntry in class AbstractRealMatrixrow - Row location of entry to be set.column - Column location of entry to be set.factor - Multiplication factor for the matrix entry.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||