public class SparseDistributedMatrixStorage extends CacheUtils implements MatrixStorage, StorageConstants, DistributedStorage<RowColMatrixKey>
MatrixStorage implementation for SparseDistributedMatrix.CacheUtils.CacheEntry<K,V>COLUMN_STORAGE_MODE, RANDOM_ACCESS_MODE, ROW_STORAGE_MODE, SEQUENTIAL_ACCESS_MODE, UNKNOWN_STORAGE_MODE| Constructor and Description |
|---|
SparseDistributedMatrixStorage() |
SparseDistributedMatrixStorage(int rows,
int cols,
int stoMode,
int acsMode) |
| Modifier and Type | Method and Description |
|---|---|
int |
accessMode() |
IgniteCache<RowColMatrixKey,Map<Integer,Double>> |
cache() |
String |
cacheName() |
int |
columnSize() |
void |
destroy()
Delete all data from cache.
|
boolean |
equals(Object obj) |
double |
get(int x,
int y) |
Set<RowColMatrixKey> |
getAllKeys()
Build a keyset for this storage.
|
RowColMatrixKey |
getCacheKey(int idx)
Build cache key for row/column.
|
UUID |
getUUID() |
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) |
int |
storageMode() |
void |
writeExternal(ObjectOutput out) |
bcast, bcast, bcast, bcast, distributedFold, fold, fold, foreach, getClusterGroupForGivenKey, ignite, map, max, min, reduce, reduce, sparseMap, sparseMapForVector, sparseMax, sparseMin, sparseSum, sum, update, updateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdataassertAccessMode, assertStorageModepublic SparseDistributedMatrixStorage()
public SparseDistributedMatrixStorage(int rows,
int cols,
int stoMode,
int acsMode)
rows - Amount of rows in the matrix.cols - Amount of columns in the matrix.stoMode - Row or column based storage mode.acsMode - Random or sequential access mode.public IgniteCache<RowColMatrixKey,Map<Integer,Double>> cache()
public int accessMode()
accessMode in interface MatrixStorageStorageConstantspublic 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 RowColMatrixKey getCacheKey(int idx)
public int columnSize()
columnSize in interface MatrixStoragepublic int rowSize()
rowSize in interface MatrixStoragepublic int storageMode()
storageMode in interface MatrixStorageStorageConstantspublic 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 void destroy()
destroy in interface Destroyablepublic UUID getUUID()
public Set<RowColMatrixKey> getAllKeys()
getAllKeys in interface DistributedStorage<RowColMatrixKey>public String cacheName()
cacheName in interface DistributedStorage<RowColMatrixKey>
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018