public class CacheMatrix<K,V> extends AbstractMatrix
Matrix.Element| Constructor and Description |
|---|
CacheMatrix() |
CacheMatrix(int rows,
int cols,
IgniteCache<K,V> cache,
MatrixKeyMapper<K> keyMapper,
ValueMapper<V> valMapper)
Creates new matrix over existing cache.
|
| Modifier and Type | Method and Description |
|---|---|
Matrix |
assign(double val)
Assigns given value to all elements of this matrix.
|
Matrix |
copy()
Clones this matrix.
|
Matrix |
divide(double d)
Return the same matrix with updates values (broken contract).
|
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.
|
Matrix |
map(IgniteDoubleFunction<Double> fun)
Maps all values in this matrix through a given function.
|
double |
maxValue()
Gets the maximum value in this matrix.
|
double |
minValue()
Gets the minimum value in this matrix.
|
Matrix |
plus(double x)
Return the same matrix with updates values (broken contract).
|
double |
sum()
Gets sum of all elements in the matrix.
|
Matrix |
times(double x)
Return the same matrix with updates values (broken contract).
|
allSpliterator, assign, assign, assign, assignColumn, assignRow, columnSize, compute, density, destroy, determinant, equals, foldColumns, foldMap, foldRows, get, getCol, getElement, getMaxAmountOfColumns, getMetaStorage, getRow, getStorage, getX, guid, hashCode, inverse, isArrayBased, isDense, isDistributed, isRandomAccess, isSequentialAccess, likeIdentity, map, maxAbsRowSumNorm, maxElement, minElement, minus, nonZeroElements, nonZeroSpliterator, plus, readExternal, rowSize, set, setColumn, setRow, setStorage, setX, storageGet, storageSet, swapColumns, swapRows, times, times, toString, transpose, viewColumn, viewDiagonal, viewPart, viewPart, viewRow, writeExternalclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAttribute, hasAttribute, removeAttribute, setAttributepublic CacheMatrix()
public CacheMatrix(int rows,
int cols,
IgniteCache<K,V> cache,
MatrixKeyMapper<K> keyMapper,
ValueMapper<V> valMapper)
rows - Amount of rows in matrix.cols - Amount of columns in matrix.cache - Ignite cache.keyMapper - MatrixKeyMapper to validate cache key.valMapper - ValueMapper to obtain value for given cache key.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 Matrix like(int rows, int cols)
NOTE: new matrix will have the same flavor as the this matrix but a different ID.
rows - Number of rows for new matrix.cols - Number of columns for new matrix.public Vector likeVector(int crd)
crd - Cardinality of the vector.public Matrix divide(double d)
divide in interface Matrixdivide in class AbstractMatrixd - Value to divide to.public Matrix plus(double x)
plus in interface Matrixplus in class AbstractMatrixx - Value to add.public Matrix times(double x)
times in interface Matrixtimes in class AbstractMatrixx - Value to multiply to.public Matrix assign(double val)
assign in interface Matrixassign in class AbstractMatrixval - Value to assign to all elements.public Matrix map(IgniteDoubleFunction<Double> fun)
map in interface Matrixmap in class AbstractMatrixfun - Mapping function.public double sum()
sum in interface Matrixsum in class AbstractMatrixpublic double maxValue()
maxValue in interface MatrixmaxValue in class AbstractMatrixpublic double minValue()
minValue in interface MatrixminValue in class AbstractMatrix
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018