KeyType - The type of the keys (indices) into the infinite dimensional vector.public interface InfiniteVector<KeyType> extends VectorSpace<InfiniteVector<KeyType>,InfiniteVector.Entry<KeyType>>, ScalarMap<KeyType>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
InfiniteVector.Entry<KeyType>
Entry for a InfiniteVector
|
static interface |
InfiniteVector.KeyValueConsumer<KeyType>
Defines the functionality for a consumer of vector entries, which are an
index and a value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
compact()
Removes the zero elements from the vector.
|
void |
forEachEntry(InfiniteVector.KeyValueConsumer<? super KeyType> consumer)
Applies the given function to each active entry in this vector.
|
void |
forEachNonZero(InfiniteVector.KeyValueConsumer<? super KeyType> consumer)
Applies the given function to each non-zero entry in this vector.
|
angle, cosine, dot, dotProduct, euclideanDistance, euclideanDistanceSquared, getMaxValue, getMinValue, isUnitVector, isUnitVector, norm, norm1, norm2, norm2Squared, normInfinity, sum, unitVector, unitVectorEqualsclone, dotTimes, dotTimesEquals, equals, equals, isZero, isZero, minus, minusEquals, negative, negativeEquals, plus, plusEquals, scale, scaledMinus, scaledMinusEquals, scaledPlus, scaledPlusEquals, scaleEquals, zeroasMap, decrement, decrement, decrementAll, decrementAll, entrySet, get, getMaxValue, getMinValue, increment, increment, incrementAll, incrementAll, set, setAll, setAllclear, containsKey, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, isEmpty, keySet, sizevoid compact()
void forEachEntry(InfiniteVector.KeyValueConsumer<? super KeyType> consumer)
consumer - The consumer for the entries. It is called for each active entry in
the vector, in order by increasing index.void forEachNonZero(InfiniteVector.KeyValueConsumer<? super KeyType> consumer)
consumer - The consumer for the non-zero entries. It is called for each
non-zero entry in the vector, in order by increasing index.