|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ejml.data.Matrix64F
public abstract class Matrix64F
An abstract class for all 64 bit floating point rectangular matrices.
| Field Summary | |
|---|---|
int |
numCols
Number of columns in the matrix. |
int |
numRows
Number of rows in the matrix. |
| Constructor Summary | |
|---|---|
Matrix64F()
|
|
| Method Summary | ||
|---|---|---|
abstract
|
copy()
|
|
abstract double |
get(int row,
int col)
Returns the value of value of the specified matrix element. |
|
int |
getNumCols()
Returns the number of columns in this matrix. |
|
abstract int |
getNumElements()
Returns the number of elements in this matrix, which is the number of rows times the number of columns. |
|
int |
getNumRows()
Returns the number of rows in this matrix. |
|
MatrixIterator |
iterator(boolean rowMajor,
int minRow,
int minCol,
int maxRow,
int maxCol)
Creates a new iterator for traversing through a submatrix inside this matrix. |
|
abstract void |
print()
|
|
void |
reshape(int numRows,
int numCols)
Equivalent to invoking reshape(numRows,numCols,false); |
|
abstract void |
reshape(int numRows,
int numCols,
boolean saveValues)
Changes the number of rows and columns in the matrix, allowing its size to grow or shrink. |
|
abstract void |
set(int row,
int col,
double val)
Sets the value of the specified matrix element. |
|
void |
set(Matrix64F A)
Assigns the value of 'this' matrix to be the same as 'A'. |
|
abstract double |
unsafe_get(int row,
int col)
Same as get(int, int) but does not perform bounds check on input parameters. |
|
abstract void |
unsafe_set(int row,
int col,
double val)
Same as set(int, int, double) but does not perform bounds check on input parameters. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int numRows
public int numCols
| Constructor Detail |
|---|
public Matrix64F()
| Method Detail |
|---|
public abstract void reshape(int numRows,
int numCols,
boolean saveValues)
Changes the number of rows and columns in the matrix, allowing its size to grow or shrink. If the saveValues flag is set to true, then the previous values will be maintained, but reassigned to new elements in a row-major ordering. If saveValues is false values will only be maintained when the requested size is less than or equal to the internal array size. The primary use for this function is to encourage data reuse and avoid unnecessarily declaring and initialization of new memory.
Examples:
[ 1 2 ; 3 4 ] -> reshape( 2 , 3 , true ) = [ 1 2 3 ; 4 0 0 ]
[ 1 2 ; 3 4 ] -> reshape( 1 , 2 , true ) = [ 1 2 ]
[ 1 2 ; 3 4 ] -> reshape( 1 , 2 , false ) = [ 1 2 ]
[ 1 2 ; 3 4 ] -> reshape( 2 , 3 , false ) = [ 0 0 0 ; 0 0 0 ]
numRows - The new number of rows in the matrix.numCols - The new number of columns in the matrix.saveValues - If true then the value of each element will be save using a row-major reordering. Typically this should be false.
public void reshape(int numRows,
int numCols)
numRows - The new number of rows in the matrix.numCols - The new number of columns in the matrix.
public abstract double get(int row,
int col)
row - Matrix element's row index..col - Matrix element's column index.
public abstract double unsafe_get(int row,
int col)
get(int, int) but does not perform bounds check on input parameters. This results in about a 25%
speed increase but potentially sacrifices stability and makes it more difficult to track down simple errors.
It is not recommended that this function be used, except in highly optimized code where the bounds are
implicitly being checked.
row - Matrix element's row index..col - Matrix element's column index.
public abstract void set(int row,
int col,
double val)
row - Matrix element's row index..col - Matrix element's column index.val - The element's new value.
public abstract void unsafe_set(int row,
int col,
double val)
set(int, int, double) but does not perform bounds check on input parameters. This results in about a 25%
speed increase but potentially sacrifices stability and makes it more difficult to track down simple errors.
It is not recommended that this function be used, except in highly optimized code where the bounds are
implicitly being checked.
row - Matrix element's row index..col - Matrix element's column index.val - The element's new value.
public MatrixIterator iterator(boolean rowMajor,
int minRow,
int minCol,
int maxRow,
int maxCol)
rowMajor - true means it will traverse through the submatrix by row first, false by columns.minRow - first row it will start at.minCol - first column it will start at.maxRow - last row it will stop at.maxCol - last column it will stop at.
public int getNumRows()
public int getNumCols()
public abstract int getNumElements()
public void set(Matrix64F A)
A - The matrix whose value is to be copied into 'this'.public abstract <T extends Matrix64F> T copy()
public abstract void print()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||