public class FunctionVectorStorage extends Object implements VectorStorage
| Constructor and Description |
|---|
FunctionVectorStorage() |
FunctionVectorStorage(int size,
IgniteFunction<Integer,Double> getFunc)
Creates read-only storage.
|
FunctionVectorStorage(int size,
IgniteFunction<Integer,Double> getFunc,
IntDoubleToVoidFunction setFunc)
Creates read-only or read-write storage.
|
| Modifier and Type | Method and Description |
|---|---|
double |
get(int i) |
IgniteFunction<Integer,Double> |
getFunction() |
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) |
IntDoubleToVoidFunction |
setFunction() |
int |
size() |
void |
writeExternal(ObjectOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdatadestroypublic FunctionVectorStorage()
public FunctionVectorStorage(int size,
IgniteFunction<Integer,Double> getFunc,
IntDoubleToVoidFunction setFunc)
size - Cardinality of this vector storage.getFunc - Get function.setFunc - Optional set function (null for read-only storage).public FunctionVectorStorage(int size,
IgniteFunction<Integer,Double> getFunc)
size - Cardinality of this vector storage.getFunc - Get function.public IgniteFunction<Integer,Double> getFunction()
public IntDoubleToVoidFunction setFunction()
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 StorageOpsMetrics
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018