public class OpenMapRealMatrix extends AbstractRealMatrix implements SparseRealMatrix, 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 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.
|
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
isTransposable, operateTranspose
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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
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.public OpenMapRealMatrix copy()
copy
in interface RealMatrix
copy
in class AbstractRealMatrix
public OpenMapRealMatrix createMatrix(int rowDimension, int columnDimension)
createMatrix
in interface RealMatrix
createMatrix
in class AbstractRealMatrix
rowDimension
- the number of rows in the new matrixcolumnDimension
- the number of columns in the new matrixpublic int getColumnDimension()
getColumnDimension
in interface AnyMatrix
getColumnDimension
in class AbstractRealMatrix
public 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 RealMatrix
subtract
in class AbstractRealMatrix
m
- matrix to be subtractedpublic 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 RealMatrix
multiply
in class AbstractRealMatrix
m
- matrix to postmultiply bypublic 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 RealMatrix
getEntry
in class AbstractRealMatrix
row
- Row location of entry to be fetched.column
- Column location of entry to be fetched.(row, column)
.public int getRowDimension()
getRowDimension
in interface AnyMatrix
getRowDimension
in class AbstractRealMatrix
public void setEntry(int row, int column, double value)
setEntry
in interface RealMatrix
setEntry
in class AbstractRealMatrix
row
- 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 RealMatrix
addToEntry
in class AbstractRealMatrix
row
- 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 RealMatrix
multiplyEntry
in class AbstractRealMatrix
row
- Row location of entry to be set.column
- Column location of entry to be set.factor
- Multiplication factor for the matrix entry.Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.