public class SingleElementVectorView extends AbstractVector
Vector.Element| Constructor and Description |
|---|
SingleElementVectorView() |
SingleElementVectorView(Vector vec,
int idx) |
| Modifier and Type | Method and Description |
|---|---|
Vector |
copy()
Creates new copy of this vector.
|
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.
|
Vector |
times(double x)
Gets a new vector that contains product of each element and the argument.
|
all, allSpliterator, assign, assign, assign, assign, checkCardinality, checkCardinality, checkCardinality, checkIndex, compute, 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, toMatrix, toMatrixPlusOne, viewPart, writeExternalclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAttribute, hasAttribute, removeAttribute, setAttributepublic SingleElementVectorView()
public SingleElementVectorView(Vector vec, int idx)
vec - Parent vector.idx - Index of the parent 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 copy()
copy in interface Vectorcopy in class AbstractVectorpublic 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.6.0 Release Date : July 10 2018