public abstract class AbstractReadOnlyVector extends AbstractVector
Vector
interface to minimize the effort required to implement it.
Subclasses may override some of the implemented methods if a more
specific or optimized implementation is desirable.Vector.Element| Constructor and Description |
|---|
AbstractReadOnlyVector() |
AbstractReadOnlyVector(VectorStorage sto) |
| Modifier and Type | Method and Description |
|---|---|
void |
compute(int idx,
IgniteIntDoubleToDoubleBiFunction f)
Replace vector entry with value oldVal at i with result of computing f(i, oldVal).
|
Vector |
copy()
Creates new copy of this vector.
|
Matrix |
cross(Vector vec)
Gets the cross product of this vector and the other vector.
|
Vector |
divide(double x)
Creates new vector containing values from this vector divided by the argument.
|
Vector |
logNormalize()
Creates new vector containing the
log(1 + entry) / L_2 norm values of this vector. |
Vector |
logNormalize(double power)
Creates new vector with a normalized value calculated as
log_power(1 + entry) / L_power norm. |
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.
|
Vector |
map(Vector vec,
IgniteBiFunction<Double,Double,Double> fun)
Maps all values in this vector through a given function.
|
Vector |
times(double x)
Gets a new vector that contains product of each element and the argument.
|
Matrix |
toMatrix(boolean rowLike)
Converts this vector into [N x 1] or [1 x N] matrix where N is this vector cardinality.
|
Matrix |
toMatrixPlusOne(boolean rowLike,
double zeroVal)
Converts this vector into [N+1 x 1] or [1 x N+1] matrix where N is this vector cardinality
|
all, allSpliterator, assign, assign, assign, assign, checkCardinality, checkCardinality, checkCardinality, checkIndex, destroy, dot, dotSelf, equals, foldMap, foldMap, get, getDistanceSquared, getElement, getLengthSquared, getMetaStorage, getStorage, getX, guid, hashCode, increment, incrementX, isArrayBased, isDense, isDistributed, isRandomAccess, isSequentialAccess, isZero, kNorm, makeElement, maxElement, maxValue, minElement, minus, minValue, nonZeroElements, nonZeroes, nonZeroSpliterator, normalize, normalize, plus, plus, readExternal, set, setStorage, setX, size, sort, storageGet, storageSet, sum, times, viewPart, writeExternalclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitlike, likeMatrixgetAttribute, hasAttribute, removeAttribute, setAttributepublic AbstractReadOnlyVector()
public AbstractReadOnlyVector(VectorStorage sto)
sto - Storage.public Matrix cross(Vector vec)
cross in interface Vectorcross in class AbstractVectorvec - Second vector.public Matrix toMatrix(boolean rowLike)
toMatrix in interface VectortoMatrix in class AbstractVectorrowLike - true for rowLike [N x 1], or false for column [1 x N] matrix.public Matrix toMatrixPlusOne(boolean rowLike, double zeroVal)
zeroVal parameter.toMatrixPlusOne in interface VectortoMatrixPlusOne in class AbstractVectorrowLike - true for rowLike [N+1 x 1], or false for column [1 x N+1] matrix.public Vector copy()
copy in interface Vectorcopy in class AbstractVectorpublic Vector logNormalize()
log(1 + entry) / L_2 norm values of this vector.logNormalize in interface VectorlogNormalize in class AbstractVectorpublic Vector logNormalize(double power)
log_power(1 + entry) / L_power norm.logNormalize in interface VectorlogNormalize in class AbstractVectorpower - The power to use. Must be > 1. Cannot be Double.POSITIVE_INFINITY.public Vector map(IgniteDoubleFunction<Double> fun)
map in interface Vectormap in class AbstractVectorfun - Mapping function.public Vector map(Vector vec, IgniteBiFunction<Double,Double,Double> fun)
A, argument vector B and the
function F this method maps every element x as:
A(x) = F(A(x), B(x))map in interface Vectormap in class AbstractVectorvec - Argument vector.fun - 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 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 void compute(int idx,
IgniteIntDoubleToDoubleBiFunction f)
compute in interface Vectorcompute in class AbstractVectoridx - Position.f - Function used for replacing.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018