public class SparseVectorStorage extends Object implements VectorStorage, StorageConstants
COLUMN_STORAGE_MODE, RANDOM_ACCESS_MODE, ROW_STORAGE_MODE, SEQUENTIAL_ACCESS_MODE, UNKNOWN_STORAGE_MODE| Constructor and Description |
|---|
SparseVectorStorage() |
SparseVectorStorage(int size,
int acsMode) |
SparseVectorStorage(Map<Integer,Double> map,
boolean cp) |
| Modifier and Type | Method and Description |
|---|---|
double[] |
data()
Gets underlying array if
StorageOpsMetrics.isArrayBased() returns true. |
boolean |
equals(Object o) |
double |
get(int i) |
int |
getAccessMode() |
int |
hashCode() |
it.unimi.dsi.fastutil.ints.IntSet |
indexes() |
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) |
void |
set(int i,
double v) |
int |
size() |
void |
writeExternal(ObjectOutput out) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdestroyassertAccessMode, assertStorageModepublic SparseVectorStorage()
public SparseVectorStorage(int size,
int acsMode)
size - Vector size.acsMode - Access mode.public int getAccessMode()
public int size()
size in interface VectorStoragepublic double get(int i)
get in interface VectorStoragei - Vector element index.public void set(int i,
double v)
set in interface VectorStoragei - Vector element index.v - Value to set at given index.public 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 double[] data()
StorageOpsMetrics.isArrayBased() returns true.
Returns null if in other cases.data in interface VectorStorageStorageOpsMetrics.isArrayBased()public it.unimi.dsi.fastutil.ints.IntSet indexes()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019