public class SparseVector extends AbstractVector implements StorageConstants
Vector.ElementCOLUMN_STORAGE_MODE, RANDOM_ACCESS_MODE, ROW_STORAGE_MODE, SEQUENTIAL_ACCESS_MODE, UNKNOWN_STORAGE_MODE| Constructor and Description |
|---|
SparseVector() |
SparseVector(int size) |
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, copyOfRange, cross, destroy, divide, dot, dotSelf, equals, foldMap, foldMap, get, getDistanceSquared, getElement, getLengthSquared, getMetaStorage, getRaw, getRawX, getStorage, getX, guid, hashCode, increment, incrementX, isArrayBased, isDense, isDistributed, isNumeric, isZero, kNorm, logNormalize, logNormalize, makeElement, map, map, map, maxElement, maxValue, minElement, minus, minValue, nonZeroElements, nonZeroes, normalize, normalize, plus, plus, readExternal, set, setRaw, setRawX, setStorage, setX, size, sort, storageGet, storageGetRaw, storageSet, storageSetRaw, sum, times, toMatrix, toMatrixPlusOne, viewPart, writeExternalclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitassertAccessMode, assertStorageModeasArray, labeledgetAttribute, hasAttribute, removeAttribute, setAttributepublic SparseVector()
public SparseVector(Map<Integer,Double> map, boolean cp)
map - Underlying map.cp - Should given map be copied.public SparseVector(int size)
size - Vector size.public Vector like(int crd)
public Matrix likeMatrix(int rows, int cols)
likeMatrix in interface Vectorrows - Number of rows.cols - Number of columns.public Vector times(double x)
times in interface Vectortimes in class AbstractVectorx - Multiply argument.public it.unimi.dsi.fastutil.ints.IntSet indexes()
public Spliterator<Double> nonZeroSpliterator()
nonZeroSpliterator in interface VectornonZeroSpliterator in class AbstractVector
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 8.9.17-p1 Release Date : November 27 2025