public class SparseDistributedMatrix extends AbstractMatrix implements StorageConstants
Unlike CacheMatrix that is based on existing cache, this implementation creates distributed
cache internally and doesn't rely on pre-existing cache.
You also need to call AbstractMatrix.destroy() to remove the underlying cache when you no longer need this
matrix.
This class is not intended for fast calculations (for example, matrix multiplication). If better performance
is needed, SparseBlockDistributedMatrix should be used instead.
Currently fold supports only commutative operations.
Matrix.ElementCOLUMN_STORAGE_MODE, RANDOM_ACCESS_MODE, ROW_STORAGE_MODE, SEQUENTIAL_ACCESS_MODE, UNKNOWN_STORAGE_MODE| Constructor and Description |
|---|
SparseDistributedMatrix() |
SparseDistributedMatrix(double[][] data) |
SparseDistributedMatrix(int rows,
int cols) |
SparseDistributedMatrix(int rows,
int cols,
int stoMode,
int acsMode) |
| 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).
|
UUID |
getUUID() |
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).
|
Matrix |
times(Matrix mtx)
Creates new matrix that is the product of multiplying this matrix and the argument matrix.
|
Vector |
times(Vector vec)
Creates new matrix that is the product of multiplying this matrix and the argument vector.
|
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, toString, transpose, viewColumn, viewDiagonal, viewPart, viewPart, viewRow, writeExternalclone, finalize, getClass, notify, notifyAll, wait, wait, waitassertAccessMode, assertStorageModegetAttribute, hasAttribute, removeAttribute, setAttributepublic SparseDistributedMatrix()
public SparseDistributedMatrix(int rows,
int cols,
int stoMode,
int acsMode)
rows - Amount of rows in the matrix.cols - Amount of columns in the matrix.stoMode - Matrix storage mode.acsMode - Matrix elements access mode.public SparseDistributedMatrix(double[][] data)
data - Data to fill the matrixpublic SparseDistributedMatrix(int rows,
int cols)
rows - Amount of rows in the matrix.cols - Amount of columns in the matrix.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.public Matrix times(Matrix mtx)
times in interface Matrixtimes in class AbstractMatrixmtx - Argument matrix.public Vector times(Vector vec)
times in interface Matrixtimes in class AbstractMatrixvec - Argument vector.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 AbstractMatrixpublic 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.
public Vector likeVector(int crd)
likeVector in interface Matrixcrd - Cardinality of the vector.public UUID getUUID()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018