Class AbstractCooRingVector<T extends AbstractCooRingVector<T,U,V,W,Y>,U extends AbstractDenseRingVector<U,W,Y>,V extends AbstractCooRingMatrix<V,W,T,Y>,W extends AbstractDenseRingMatrix<W,U,Y>,Y extends Ring<Y>>

java.lang.Object
org.flag4j.arrays.backend.AbstractTensor<T,Y[],Y>
org.flag4j.arrays.backend.semiring_arrays.AbstractCooSemiringVector<T,U,V,W,Y>
org.flag4j.arrays.backend.ring_arrays.AbstractCooRingVector<T,U,V,W,Y>
Type Parameters:
T - Type of this vector.
U - Type of equivalent dense vector.
V - Type of matrix equivalent to T.
Y - Type of dense matrix equivalent to U.
Y - Type of the arrays element in this vector.
All Implemented Interfaces:
Serializable, RingTensorMixin<T,U,Y>, TensorOverRing<T,U,Y[],Y>, SemiringTensorMixin<T,U,Y>, TensorOverSemiring<T,U,Y[],Y>, VectorMixin<T,V,W,Y>
Direct Known Subclasses:
AbstractCooFieldVector, CooRingVector

public abstract class AbstractCooRingVector<T extends AbstractCooRingVector<T,U,V,W,Y>,U extends AbstractDenseRingVector<U,W,Y>,V extends AbstractCooRingMatrix<V,W,T,Y>,W extends AbstractDenseRingMatrix<W,U,Y>,Y extends Ring<Y>> extends AbstractCooSemiringVector<T,U,V,W,Y> implements RingTensorMixin<T,U,Y>, VectorMixin<T,V,W,Y>

A sparse vector stored in coordinate list (COO) format. The AbstractTensor.data of this COO vector are elements of a Ring.

The non-zero data and non-zero indices of a COO vector are mutable but the AbstractTensor.shape and total number of non-zero data is fixed.

Sparse vectors allow for the efficient storage of and ops on large vectors that contain many zero values.

COO vectors are optimized for large hyper-sparse vectors (i.e. vectors which contain almost all zeros relative to the size of the vector).

A sparse COO vector is stored as:

Note: many ops assume that the data of the COO vector are sorted lexicographically. However, this is not explicitly verified. Every operation implemented in this class will preserve the lexicographical sorting.

If indices need to be sorted for any reason, call AbstractCooSemiringVector.sortIndices().

See Also: