public class SparseMatrix extends AbstractMatrix implements StorageConstants
SparseVector as rows.Matrix.ElementCOLUMN_STORAGE_MODE, RANDOM_ACCESS_MODE, ROW_STORAGE_MODE, SEQUENTIAL_ACCESS_MODE, UNKNOWN_STORAGE_MODE| Constructor and Description |
|---|
SparseMatrix() |
SparseMatrix(int rows,
int cols)
Construct new
SparseMatrix. |
| Modifier and Type | Method and Description |
|---|---|
void |
compute(int row,
int col,
IgniteTriFunction<Integer,Integer,Double,Double> f)
Replace matrix entry with value oldVal at (row, col) with result of computing f(row, col, oldVal).
|
Matrix |
copy()
Clones this matrix.
|
it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap<it.unimi.dsi.fastutil.ints.IntSet> |
indexesMap() |
Matrix |
like(int rows,
int cols)
Creates new empty matrix of the same underlying class but of different size.
|
Vector |
likeVector(int crd)
Creates new empty vector of compatible properties (similar or the same flavor) to this matrix.
|
int |
nonZeroElements()
Gets number of non-zero elements in this matrix.
|
allSpliterator, assign, assign, assign, assign, assignColumn, assignRow, columnSize, density, destroy, determinant, divide, equals, foldColumns, foldMap, foldRows, get, getCol, getElement, getMetaStorage, getRow, getStorage, getX, guid, hashCode, inverse, isArrayBased, isDense, isDistributed, likeIdentity, map, map, maxElement, maxValue, minElement, minus, minValue, nonZeroSpliterator, plus, plus, readExternal, rowSize, set, setColumn, setRow, setStorage, setX, storageGet, storageSet, sum, swapColumns, swapRows, times, times, times, toString, transpose, viewColumn, viewDiagonal, viewRow, writeExternalclone, finalize, getClass, notify, notifyAll, wait, wait, waitassertAccessMode, assertStorageModegetAttribute, hasAttribute, removeAttribute, setAttributepublic SparseMatrix()
public SparseMatrix(int rows,
int cols)
SparseMatrix.
By default storage sets in row optimized mode and in random access mode.public Matrix like(int rows, int cols)
NOTE: new matrix will have the same flavor as the this matrix but a different ID.
public Vector likeVector(int crd)
likeVector in interface Matrixcrd - Cardinality of the vector.public int nonZeroElements()
nonZeroElements in interface MatrixnonZeroElements in class AbstractMatrixpublic it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap<it.unimi.dsi.fastutil.ints.IntSet> indexesMap()
public Matrix copy()
NOTE: new matrix will have the same flavor as the this matrix but a different ID.
copy in interface Matrixcopy in class AbstractMatrixpublic void compute(int row,
int col,
IgniteTriFunction<Integer,Integer,Double,Double> f)
compute in interface Matrixcompute in class AbstractMatrixrow - Row.col - Column.f - Function used for replacing.
GridGain In-Memory Computing Platform : ver. 8.9.26 Release Date : October 16 2025