public class SparseVector extends AbstractVector implements StorageConstants
Vector.Element
COLUMN_STORAGE_MODE, RANDOM_ACCESS_MODE, ROW_STORAGE_MODE, SEQUENTIAL_ACCESS_MODE, UNKNOWN_STORAGE_MODE
Constructor and Description |
---|
SparseVector() |
SparseVector(int size,
int acsMode) |
SparseVector(Map<Integer,Double> map,
boolean cp) |
Modifier and Type | Method and Description |
---|---|
it.unimi.dsi.fastutil.ints.IntSet |
indexes()
Indexes of non-default elements.
|
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.
|
Spliterator<Double> |
nonZeroSpliterator()
Gets spliterator for all non-zero values 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, 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, maxElement, maxValue, minElement, minus, minValue, nonZeroElements, nonZeroes, normalize, normalize, plus, plus, readExternal, set, setStorage, setX, size, sort, storageGet, storageSet, sum, times, toMatrix, toMatrixPlusOne, viewPart, writeExternal
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
assertAccessMode, assertStorageMode
getAttribute, hasAttribute, removeAttribute, setAttribute
public SparseVector()
public SparseVector(Map<Integer,Double> map, boolean cp)
map
- Underlying map.cp
- Should given map be copied.public SparseVector(int size, int acsMode)
size
- Vector size.acsMode
- Vector elements access mode.public Vector like(int crd)
public Matrix likeMatrix(int rows, int cols)
likeMatrix
in interface Vector
rows
- Number of rows.cols
- Number of columns.public Vector times(double x)
times
in interface Vector
times
in class AbstractVector
x
- Multiply argument.public it.unimi.dsi.fastutil.ints.IntSet indexes()
public Spliterator<Double> nonZeroSpliterator()
nonZeroSpliterator
in interface Vector
nonZeroSpliterator
in class AbstractVector
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019