public class CacheVector<K,V> extends AbstractVector
Vector.Element| Constructor and Description |
|---|
CacheVector() |
CacheVector(int size,
IgniteCache<K,V> cache,
VectorKeyMapper<K> keyFunc,
ValueMapper<V> valMapper)
Creates new vector over existing cache.
|
| Modifier and Type | Method and Description |
|---|---|
Vector |
assign(double val)
Assigns given value to all elements of this vector.
|
Vector |
divide(double x)
Creates new vector containing values from this vector divided by the argument.
|
Vector |
like(int crd)
Creates new empty vector of the same underlying class but of different cardinality.
|
Matrix |
likeMatrix(int rows,
int cols)
Creates new matrix of compatible flavor with given size.
|
Vector |
map(IgniteBiFunction<Double,Double,Double> fun,
double y)
Maps all elements of this vector by applying given function to each element with a constant
second parameter
y. |
Vector |
map(IgniteDoubleFunction<Double> fun)
Maps all values in this vector through a given function.
|
double |
maxValue()
Gets maximum value in this vector.
|
double |
minValue()
Gets minimal value in this vector.
|
Vector |
plus(double x)
Creates new vector containing sum of each element in this vector and argument.
|
double |
sum()
Gets the sum of all elements in this vector.
|
Vector |
times(double x)
Gets a new vector that contains product of each element and the argument.
|
all, allSpliterator, assign, assign, assign, checkCardinality, checkCardinality, checkCardinality, checkIndex, compute, copy, cross, destroy, dot, dotSelf, equals, foldMap, foldMap, get, getDistanceSquared, getElement, getLengthSquared, getMetaStorage, getStorage, getX, guid, hashCode, increment, incrementX, isArrayBased, isDense, isDistributed, isRandomAccess, isSequentialAccess, isZero, kNorm, logNormalize, logNormalize, makeElement, map, maxElement, minElement, minus, nonZeroElements, nonZeroes, nonZeroSpliterator, normalize, normalize, plus, readExternal, set, setStorage, setX, size, sort, storageGet, storageSet, times, toMatrix, toMatrixPlusOne, viewPart, writeExternalclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAttribute, hasAttribute, removeAttribute, setAttributepublic CacheVector()
public CacheVector(int size,
IgniteCache<K,V> cache,
VectorKeyMapper<K> keyFunc,
ValueMapper<V> valMapper)
size - Vector size.cache - Ignite cache.keyFunc - VectorKeyMapper to validate cache key.valMapper - ValueMapper to obtain value for given cache key.public double minValue()
minValue in interface VectorminValue in class AbstractVectorpublic double maxValue()
maxValue in interface VectormaxValue in class AbstractVectorpublic Vector map(IgniteDoubleFunction<Double> fun)
map in interface Vectormap in class AbstractVectorfun - Mapping function.public Vector map(IgniteBiFunction<Double,Double,Double> fun, double y)
y.map in interface Vectormap in class AbstractVectorfun - Mapping function.y - Second parameter for mapping function.public double sum()
sum in interface Vectorsum in class AbstractVectorpublic Vector assign(double val)
assign in interface Vectorassign in class AbstractVectorval - Value to assign.public Vector plus(double x)
plus in interface Vectorplus in class AbstractVectorx - Argument value.public Vector divide(double x)
divide in interface Vectordivide in class AbstractVectorx - Division argument.public Vector times(double x)
times in interface Vectortimes in class AbstractVectorx - Multiply argument.public Vector like(int crd)
crd - Cardinality for new vector.public Matrix likeMatrix(int rows, int cols)
rows - Number of rows.cols - Number of columns.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018