Class SparseMatrix<E>
java.lang.Object
org.episteme.core.mathematics.linearalgebra.matrices.GenericMatrix<E>
org.episteme.core.mathematics.linearalgebra.matrices.SparseMatrix<E>
- All Implemented Interfaces:
Matrix<E>, AbelianGroup<Matrix<E>>, AbelianMonoid<Matrix<E>>, Group<Matrix<E>>, Magma<Matrix<E>>, Monoid<Matrix<E>>, Ring<Matrix<E>>, Semiring<Matrix<E>>, Set<Matrix<E>>, Module<Matrix<E>, E>
A sparse matrix implementation.
Wrapper around GenericMatrix that enforces SparseMatrixStorage.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Field Summary
Fields inherited from class GenericMatrix
provider, ring, storage -
Constructor Summary
ConstructorsConstructorDescriptionSparseMatrix(int rows, int cols, Ring<E> ring) SparseMatrix(E[][] data, Ring<E> ring) Creates a SparseMatrix with automatic storage optimization.SparseMatrix(MatrixStorage<E> storage, LinearAlgebraProvider<E> provider, Ring<E> ring) SparseMatrix(MatrixStorage<E> storage, Ring<E> ring) -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> SparseMatrix<E> int[]intgetNnz()int[]Object[]static <E> SparseMatrix<E> static <E> SparseMatrix<E> static <E> SparseMatrix<E> voidtoString()static <E> SparseMatrix<E> Methods inherited from class GenericMatrix
add, cholesky, cols, contains, description, determinant, eigen, get, getColumn, getField, getProvider, getRow, getScalarRing, getStorage, getSubMatrix, inverse, lu, multiply, multiply, negate, one, qr, rows, scale, svd, trace, transpose, withProvider, zeroMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AbelianGroup
negate, subtractMethods inherited from interface Matrix
add, identity, inverse, isCommutative, isEmpty, isMultiplicationCommutative, map, multiply, operate, scale, subtract, toTensorMethods inherited from interface Monoid
isAssociative
-
Constructor Details
-
SparseMatrix
-
SparseMatrix
-
SparseMatrix
-
SparseMatrix
-
SparseMatrix
-
-
Method Details
-
fromDense
-
of
-
of
-
zeros
-
identity
-
getNnz
public int getNnz() -
getSparseStorage
-
set
- Overrides:
setin classGenericMatrix<E>
-
getValues
-
getColIndices
public int[] getColIndices() -
getRowPointers
public int[] getRowPointers() -
toString
-