public class SingleElementVector extends AbstractVector
Vector.Element| Constructor and Description |
|---|
SingleElementVector() |
SingleElementVector(int size,
int idx,
double val) |
SingleElementVector(Map<String,Object> args) |
| Modifier and Type | Method and Description |
|---|---|
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.Element |
maxElement()
Gets maximum element in this vector.
|
Vector.Element |
minElement()
Gets minimal element in this vector.
|
int |
nonZeroElements()
Gets number of non-zero elements in this vector.
|
double |
sum()
Gets the sum of all elements in this vector.
|
all, allSpliterator, assign, assign, assign, assign, checkCardinality, checkCardinality, checkCardinality, checkIndex, compute, copy, cross, destroy, divide, 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, map, map, maxValue, minus, minValue, nonZeroes, nonZeroSpliterator, normalize, normalize, plus, plus, readExternal, set, setStorage, setX, size, sort, storageGet, storageSet, times, times, toMatrix, toMatrixPlusOne, viewPart, writeExternalclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAttribute, hasAttribute, removeAttribute, setAttributepublic SingleElementVector()
public SingleElementVector(int size,
int idx,
double val)
size - Parent vector size.idx - Index of the parent vector element.val - Value of the vector element.public Vector.Element minElement()
minElement in interface VectorminElement in class AbstractVectorpublic Vector.Element maxElement()
maxElement in interface VectormaxElement in class AbstractVectorpublic double sum()
sum in interface Vectorsum in class AbstractVectorpublic int nonZeroElements()
nonZeroElements in interface VectornonZeroElements in class AbstractVectorpublic 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.6.0 Release Date : July 10 2018