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

java.lang.Object
org.flag4j.arrays.backend.AbstractTensor<T,W[],W>
org.flag4j.arrays.backend.semiring_arrays.AbstractCooSemiringMatrix<T,U,V,W>
org.flag4j.arrays.backend.ring_arrays.AbstractCooRingMatrix<T,U,V,W>
Type Parameters:
T - Type of this sparse COO matrix.
U - Type of dense matrix which is similar to T.
W - Type of sparse COO vector which is similar to T.
W - Type of the arrays element in this matrix.
All Implemented Interfaces:
Serializable, MatrixMixin<T,U,V,W>, RingTensorMixin<T,U,W>, TensorOverRing<T,U,W[],W>, SemiringTensorMixin<T,U,W>, TensorOverSemiring<T,U,W[],W>
Direct Known Subclasses:
AbstractCooFieldMatrix, CooRingMatrix

public abstract class AbstractCooRingMatrix<T extends AbstractCooRingMatrix<T,U,V,W>,U extends AbstractDenseRingMatrix<U,?,W>,V extends AbstractCooRingVector<V,?,T,U,W>,W extends Ring<W>> extends AbstractCooSemiringMatrix<T,U,V,W> implements RingTensorMixin<T,U,W>, MatrixMixin<T,U,V,W>

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

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

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

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

COO Representation:

A sparse COO matrix is stored as:

Note: many ops assume that the data of the COO matrix are sorted lexicographically by the row and column indices. (i.e.) by row indices first then column indices. However, this is not explicitly verified but any ops implemented in this class will preserve the lexicographical sorting.

If indices need to be sorted, call AbstractCooSemiringMatrix.sortIndices().

See Also: