public interface MatrixSparse extends ReshapeMatrix
| Modifier and Type | Method and Description |
|---|---|
int |
getNonZeroLength()
Returns the number of non-zero elements.
|
boolean |
isAssigned(int row,
int col)
Is the specified element explicitly assigned a value
|
void |
printNonZero()
Prints to standard out the non-zero elements only.
|
void |
remove(int row,
int col)
If the specified element is non-zero it is removed from the structure
|
void |
reshape(int numRows,
int numCols)
Changes the number of rows and columns in the matrix.
|
void |
reshape(int numRows,
int numCols,
int arrayLength)
Reshapes the matrix so that it can store a matrix with the specified dimensions and the number of
non-zero elements.
|
void |
shrinkArrays()
Reduces the size of internal data structures to their minimal size.
|
void |
zero()
Sets all elements to zero by removing the sparse graph
|
copy, createLike, getNumCols, getNumRows, getType, print, print, setvoid printNonZero()
void reshape(int numRows,
int numCols,
int arrayLength)
numRows - number of rowsnumCols - number of columnsarrayLength - Array length for storing non-zero elements.void reshape(int numRows,
int numCols)
reshape(int, int, int), but the storage for non-zero elements is
not changedreshape in interface ReshapeMatrixnumRows - number of rowsnumCols - number of columnsvoid shrinkArrays()
void remove(int row,
int col)
row - the rowcol - the columnboolean isAssigned(int row,
int col)
row - the rowcol - the columnvoid zero()
int getNonZeroLength()