public class DenseMatrix extends AbstractMatrix implements OrderedMatrix
double[][]
array. It is only suitable for data sets where
local, non-distributed execution is satisfactory and on-heap JVM storage is enough
to keep the entire data set.Matrix.Element
Constructor and Description |
---|
DenseMatrix() |
DenseMatrix(double[][] mtx) |
DenseMatrix(double[][] mtx,
int acsMode) |
DenseMatrix(double[] mtx,
int rows)
Build new matrix from flat raw array.
|
DenseMatrix(double[] mtx,
int rows,
int acsMode) |
DenseMatrix(int rows,
int cols) |
DenseMatrix(int rows,
int cols,
int acsMode) |
Modifier and Type | Method and Description |
---|---|
int |
accessMode()
Get access mode.
|
Matrix |
copy()
Clones this matrix.
|
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.
|
allSpliterator, assign, assign, assign, assign, assignColumn, assignRow, columnSize, compute, 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, nonZeroElements, nonZeroSpliterator, plus, plus, readExternal, rowSize, set, setColumn, setRow, setStorage, setX, storageGet, storageSet, sum, swapColumns, swapRows, times, times, times, toString, transpose, viewColumn, viewDiagonal, viewRow, writeExternal
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttribute, hasAttribute, removeAttribute, setAttribute
public DenseMatrix()
public DenseMatrix(int rows, int cols)
rows
- Amount of rows in matrix.cols
- Amount of columns in matrix.public DenseMatrix(int rows, int cols, int acsMode)
rows
- Amount of rows in matrix.cols
- Amount of columns in matrix.acsMode
- Storage order (row or column-based).public DenseMatrix(double[][] mtx, int acsMode)
mtx
- Backing data array.acsMode
- Access mode.public DenseMatrix(double[][] mtx)
mtx
- Backing data array.public DenseMatrix(double[] mtx, int rows, int acsMode)
mtx
- Backing data array.acsMode
- Access mode.public DenseMatrix(double[] mtx, int rows)
public Matrix copy()
NOTE: new matrix will have the same flavor as the this matrix but a different ID.
copy
in interface Matrix
copy
in class AbstractMatrix
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 Matrix
crd
- Cardinality of the vector.public int accessMode()
accessMode
in interface OrderedMatrix
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024