public class DenseMatrixStorage extends Object implements MatrixStorage
MatrixStorage
implementation.Constructor and Description |
---|
DenseMatrixStorage() |
DenseMatrixStorage(double[][] data) |
DenseMatrixStorage(double[][] data,
int stoMode) |
DenseMatrixStorage(double[] data,
int rows) |
DenseMatrixStorage(double[] data,
int rows,
int stoMode) |
DenseMatrixStorage(int rows,
int cols) |
DenseMatrixStorage(int rows,
int cols,
int stoMode) |
Modifier and Type | Method and Description |
---|---|
int |
accessMode() |
int |
columnSize() |
double[] |
data()
Gets underlying data, if
StorageOpsMetrics.isArrayBased() returns false this method return
copy of data. |
boolean |
equals(Object o) |
double |
get(int x,
int y) |
int |
hashCode() |
boolean |
isArrayBased()
Checks if implementation is based on Java arrays.
|
boolean |
isDense()
Checks if this implementation should be considered dense so that it explicitly
represents every value.
|
boolean |
isDistributed()
Checks whether implementation is JVM-local or distributed (multi-JVM).
|
void |
readExternal(ObjectInput in) |
int |
rowSize() |
void |
set(int x,
int y,
double v) |
int |
storageMode() |
void |
writeExternal(ObjectOutput out) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isNumeric
destroy
public DenseMatrixStorage()
public DenseMatrixStorage(int rows, int cols)
rows
- Amount of rows in the matrix.cols
- Amount of columns in the matrix.public DenseMatrixStorage(int rows, int cols, int stoMode)
public DenseMatrixStorage(double[][] data, int stoMode)
data
- Backing data array.public DenseMatrixStorage(double[][] data)
data
- Backing data array.public DenseMatrixStorage(double[] data, int rows, int stoMode)
data
- Backing data array.public DenseMatrixStorage(double[] data, int rows)
data
- Backing data array.public double get(int x, int y)
get
in interface MatrixStorage
x
- Matrix row index.y
- Matrix column index.public boolean isDense()
isDense
in interface StorageOpsMetrics
public boolean isDistributed()
isDistributed
in interface StorageOpsMetrics
public void set(int x, int y, double v)
set
in interface MatrixStorage
x
- Matrix row index.y
- Matrix column index.v
- Value to set at given row and column.public int columnSize()
columnSize
in interface MatrixStorage
public int rowSize()
rowSize
in interface MatrixStorage
public boolean isArrayBased()
isArrayBased
in interface StorageOpsMetrics
public double[] data()
StorageOpsMetrics.isArrayBased()
returns false
this method return
copy of data. The data must be adapted for Blas
.data
in interface MatrixStorage
StorageOpsMetrics.isArrayBased()
public int storageMode()
storageMode
in interface MatrixStorage
StorageConstants
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public int accessMode()
accessMode
in interface MatrixStorage
StorageConstants
GridGain In-Memory Computing Platform : ver. 8.9.19 Release Date : April 10 2025