public class OpenMapRealMatrix extends AbstractRealMatrix implements SparseRealMatrix, java.io.Serializable
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
OpenMapRealMatrix |
add(OpenMapRealMatrix m)
Compute the sum of this and
m . |
OpenMapRealMatrix |
add(RealMatrix m)
Compute the sum of this 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 in the matrix.
|
double |
getEntry(int row,
int column)
Returns the entry in the specified row and column.
|
int |
getRowDimension()
Returns the number of rows in the matrix.
|
OpenMapRealMatrix |
multiply(OpenMapRealMatrix m)
Returns the result of postmultiplying this 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)
Compute this minus
m . |
OpenMapRealMatrix |
subtract(RealMatrix m)
Compute this minus m.
|
copySubMatrix, copySubMatrix, equals, getColumn, getColumnMatrix, getColumnVector, getData, getDeterminant, getFrobeniusNorm, getNorm, getRow, getRowMatrix, getRowVector, getSubMatrix, getSubMatrix, getTrace, hashCode, inverse, isSingular, isSquare, luDecompose, operate, operate, preMultiply, preMultiply, preMultiply, scalarAdd, scalarMultiply, setColumn, setColumnMatrix, setColumnVector, setRow, setRowMatrix, setRowVector, setSubMatrix, solve, solve, toString, transpose, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInRowOrder, walkInRowOrder, walkInRowOrder, walkInRowOrder
copySubMatrix, copySubMatrix, getColumn, getColumnMatrix, getColumnVector, getData, getDeterminant, getFrobeniusNorm, getNorm, getRow, getRowMatrix, getRowVector, getSubMatrix, getSubMatrix, getTrace, inverse, isSingular, operate, operate, preMultiply, preMultiply, preMultiply, scalarAdd, scalarMultiply, setColumn, setColumnMatrix, setColumnVector, setRow, setRowMatrix, setRowVector, setSubMatrix, solve, solve, transpose, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInRowOrder, walkInRowOrder, walkInRowOrder, walkInRowOrder
public OpenMapRealMatrix(int rowDimension, int columnDimension)
rowDimension
- number of rows of the matrixcolumnDimension
- number of columns of the matrixpublic OpenMapRealMatrix(OpenMapRealMatrix matrix)
matrix
- matrix to copypublic OpenMapRealMatrix copy()
copy
in interface RealMatrix
copy
in class AbstractRealMatrix
public OpenMapRealMatrix createMatrix(int rowDimension, int columnDimension) throws java.lang.IllegalArgumentException
createMatrix
in interface RealMatrix
createMatrix
in class AbstractRealMatrix
rowDimension
- the number of rows in the new matrixcolumnDimension
- the number of columns in the new matrixjava.lang.IllegalArgumentException
- if row or column dimension is not positivepublic int getColumnDimension()
getColumnDimension
in interface AnyMatrix
getColumnDimension
in class AbstractRealMatrix
public OpenMapRealMatrix add(RealMatrix m) throws java.lang.IllegalArgumentException
add
in interface RealMatrix
add
in class AbstractRealMatrix
m
- matrix to be addedjava.lang.IllegalArgumentException
- if m is not the same size as thispublic OpenMapRealMatrix add(OpenMapRealMatrix m) throws java.lang.IllegalArgumentException
m
.m
- matrix to be addedjava.lang.IllegalArgumentException
- if m is not the same size as thispublic OpenMapRealMatrix subtract(RealMatrix m) throws java.lang.IllegalArgumentException
subtract
in interface RealMatrix
subtract
in class AbstractRealMatrix
m
- matrix to be subtractedjava.lang.IllegalArgumentException
- if m is not the same size as thispublic OpenMapRealMatrix subtract(OpenMapRealMatrix m) throws java.lang.IllegalArgumentException
m
.m
- matrix to be subtractedjava.lang.IllegalArgumentException
- if m is not the same size as thispublic RealMatrix multiply(RealMatrix m) throws java.lang.IllegalArgumentException
multiply
in interface RealMatrix
multiply
in class AbstractRealMatrix
m
- matrix to postmultiply byjava.lang.IllegalArgumentException
- if columnDimension(this) != rowDimension(m)public OpenMapRealMatrix multiply(OpenMapRealMatrix m) throws java.lang.IllegalArgumentException
m
- matrix to postmultiply byjava.lang.IllegalArgumentException
- if columnDimension(this) != rowDimension(m)public double getEntry(int row, int column) throws MatrixIndexException
Row and column indices start at 0 and must satisfy
0 <= row < rowDimension
0 <= column < columnDimension
MatrixIndexException
is thrown.getEntry
in interface RealMatrix
getEntry
in class AbstractRealMatrix
row
- row location of entry to be fetchedcolumn
- column location of entry to be fetchedMatrixIndexException
- if the row or column index is not validpublic int getRowDimension()
getRowDimension
in interface AnyMatrix
getRowDimension
in class AbstractRealMatrix
public void setEntry(int row, int column, double value) throws MatrixIndexException
Row and column indices start at 0 and must satisfy
0 <= row < rowDimension
0 <= column < columnDimension
MatrixIndexException
is thrown.setEntry
in interface RealMatrix
setEntry
in class AbstractRealMatrix
row
- row location of entry to be setcolumn
- column location of entry to be setvalue
- matrix entry to be set in row,columnMatrixIndexException
- if the row or column index is not validpublic void addToEntry(int row, int column, double increment) throws MatrixIndexException
Row and column indices start at 0 and must satisfy
0 <= row < rowDimension
0 <= column < columnDimension
MatrixIndexException
is thrown.addToEntry
in interface RealMatrix
addToEntry
in class AbstractRealMatrix
row
- row location of entry to be setcolumn
- column location of entry to be setincrement
- value to add to the current matrix entry in row,columnMatrixIndexException
- if the row or column index is not validpublic void multiplyEntry(int row, int column, double factor) throws MatrixIndexException
Row and column indices start at 0 and must satisfy
0 <= row < rowDimension
0 <= column < columnDimension
MatrixIndexException
is thrown.multiplyEntry
in interface RealMatrix
multiplyEntry
in class AbstractRealMatrix
row
- row location of entry to be setcolumn
- column location of entry to be setfactor
- multiplication factor for the current matrix entry in row,columnMatrixIndexException
- if the row or column index is not valid"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"