public class DelegatingNamedVector extends DelegatingVector implements NamedVector
NamedVector functionality using embedded map that maps string index on real integer index.Vector.Element| Constructor and Description |
|---|
DelegatingNamedVector()
Constructs a new instance of delegating named vector.
|
DelegatingNamedVector(Vector vector,
Map<String,Integer> map)
Constructs a new instance of delegating named vector.
|
| Modifier and Type | Method and Description |
|---|---|
double |
get(String idx)
Returns element with specified string index.
|
Set<String> |
getKeys()
Returns list of string indexes used in this vector.
|
void |
readExternal(ObjectInput in) |
NamedVector |
set(String idx,
double val)
Sets element with specified string index and value.
|
void |
writeExternal(ObjectOutput out) |
all, allSpliterator, assign, assign, assign, assign, compute, copy, copyOfRange, cross, destroy, divide, dot, equals, foldMap, foldMap, get, getDistanceSquared, getElement, getLengthSquared, getMetaStorage, getRaw, getRawX, getStorage, getVector, getX, guid, hashCode, increment, incrementX, isArrayBased, isDense, isDistributed, isNumeric, kNorm, like, likeMatrix, logNormalize, logNormalize, map, map, map, maxElement, maxValue, minElement, minus, minValue, nonZeroElements, nonZeroes, nonZeroSpliterator, normalize, normalize, plus, plus, set, setRaw, setRawX, setX, size, sort, sum, times, times, toMatrix, toMatrixPlusOne, viewPartclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitall, allSpliterator, asArray, assign, assign, assign, assign, compute, copy, copyOfRange, cross, divide, dot, foldMap, foldMap, get, getDistanceSquared, getElement, getLengthSquared, getRaw, getRawX, getStorage, getX, guid, increment, incrementX, kNorm, labeled, like, likeMatrix, logNormalize, logNormalize, map, map, map, maxElement, maxValue, minElement, minus, minValue, nonZeroElements, nonZeroes, nonZeroSpliterator, normalize, normalize, plus, plus, set, setRaw, setRawX, setX, size, sort, sum, times, times, toMatrix, toMatrixPlusOne, viewPartgetAttribute, getMetaStorage, hasAttribute, removeAttribute, setAttributeisArrayBased, isDense, isDistributed, isNumericdestroypublic DelegatingNamedVector()
public double get(String idx)
get in interface NamedVectoridx - Element string index.public NamedVector set(String idx, double val)
set in interface NamedVectoridx - Element string index.val - Element value.public Set<String> getKeys()
getKeys in interface NamedVectorpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class DelegatingVectorIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class DelegatingVectorIOExceptionClassNotFoundException
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024