public class FunctionMatrixStorage extends Object implements MatrixStorage
| Constructor and Description |
|---|
FunctionMatrixStorage() |
FunctionMatrixStorage(int rows,
int cols,
IntIntToDoubleFunction getFunc) |
FunctionMatrixStorage(int rows,
int cols,
IntIntToDoubleFunction getFunc,
IntIntDoubleToVoidFunction setFunc) |
| Modifier and Type | Method and Description |
|---|---|
int |
accessMode() |
int |
columnSize() |
boolean |
equals(Object o) |
double |
get(int x,
int y) |
IntIntToDoubleFunction |
getFunction() |
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).
|
boolean |
isRandomAccess()
Checks if this implementation is optimized for random access.
|
boolean |
isSequentialAccess()
Checks if this implementation should be considered to be iterable in index order in an efficient way.
|
void |
readExternal(ObjectInput in) |
int |
rowSize() |
void |
set(int x,
int y,
double v) |
IntIntDoubleToVoidFunction |
setFunction() |
int |
storageMode() |
void |
writeExternal(ObjectOutput out) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdatadestroypublic FunctionMatrixStorage()
public FunctionMatrixStorage(int rows,
int cols,
IntIntToDoubleFunction getFunc,
IntIntDoubleToVoidFunction setFunc)
rows - Amount of rows in the matrix.cols - Amount of columns in the matrix.getFunc - Function that returns value corresponding to given row and column index.setFunc - Set function. If null - this will be a read-only matrix.public FunctionMatrixStorage(int rows,
int cols,
IntIntToDoubleFunction getFunc)
rows - Amount of rows in the matrix.cols - Amount of columns in the matrix.getFunc - Function that returns value corresponding to given row and column index.public double get(int x,
int y)
get in interface MatrixStoragex - Matrix row index.y - Matrix column index.public void set(int x,
int y,
double v)
set in interface MatrixStoragex - Matrix row index.y - Matrix column index.v - Value to set at given row and column.public IntIntToDoubleFunction getFunction()
public IntIntDoubleToVoidFunction setFunction()
public int columnSize()
columnSize in interface MatrixStoragepublic int rowSize()
rowSize in interface MatrixStoragepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic boolean isSequentialAccess()
isSequentialAccess in interface StorageOpsMetricspublic boolean isDense()
isDense in interface StorageOpsMetricspublic boolean isRandomAccess()
isRandomAccess in interface StorageOpsMetricspublic boolean isDistributed()
isDistributed in interface StorageOpsMetricspublic boolean isArrayBased()
isArrayBased in interface StorageOpsMetricspublic int storageMode()
storageMode in interface MatrixStorageStorageConstantspublic int accessMode()
accessMode in interface MatrixStorageStorageConstants
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018