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, viewPart
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
all, 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, viewPart
getAttribute, getMetaStorage, hasAttribute, removeAttribute, setAttribute
isArrayBased, isDense, isDistributed, isNumeric
destroy
public DelegatingNamedVector()
public double get(String idx)
get
in interface NamedVector
idx
- Element string index.public NamedVector set(String idx, double val)
set
in interface NamedVector
idx
- Element string index.val
- Element value.public Set<String> getKeys()
getKeys
in interface NamedVector
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class DelegatingVector
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class DelegatingVector
IOException
ClassNotFoundException
GridGain In-Memory Computing Platform : ver. 8.9.19 Release Date : April 10 2025