Sparse row echelon module
OpenSEFA.SparseRowEchelonModule — Module
Reduced row echelon form computation optimized for sparse matrices.
This module extends the functionality of RowEchelonModule by adding specialized methods for sparse matrices that avoid conversion to dense format.
OpenSEFA.SparseRowEchelonModule.nullspace_sparse — Method
Compute a basis for the nullspace of a sparse matrix using the sparse RREF implementation.
Parameters:
A: Input sparse matrixɛ: Tolerance for determining zero pivots
Returns:
- A sparse matrix whose columns form a basis for the nullspace of A.
OpenSEFA.SparseRowEchelonModule.rank_sparse — Method
Compute the rank of a sparse matrix using the sparse RREF implementation.
Parameters:
A: Input sparse matrixɛ: Tolerance for determining zero pivots
Returns:
- The rank of matrix A
OpenSEFA.SparseRowEchelonModule.sparse_rref! — Method
Compute the reduced row echelon form of a sparse matrix A in-place. Optimized to maintain sparsity throughout the computation.
Parameters:
A: Input sparse matrix (modified in-place)ɛ: Tolerance for determining zero pivots
Returns:
- The modified matrix A in RREF.
OpenSEFA.SparseRowEchelonModule.sparse_rref — Method
Compute the reduced row echelon form of a sparse matrix without modifying the input.
Parameters:
A: Input sparse matrixɛ: Tolerance for determining zero pivots
Returns:
- A new sparse matrix in RREF
OpenSEFA.SparseRowEchelonModule.sparse_rref_with_pivots! — Method
Compute the reduced row echelon form of a sparse matrix A in-place, also returning the pivot columns.
Parameters:
A: Input sparse matrix (modified in-place)ɛ: Tolerance for determining zero pivots
Returns:
- Tuple containing (modified matrix A in RREF, pivot columns).
OpenSEFA.SparseRowEchelonModule.sparse_rref_with_pivots — Method
Compute the reduced row echelon form of a sparse matrix and return pivot columns without modifying the input.
Parameters:
A: Input sparse matrixɛ: Tolerance for determining zero pivots
Returns:
- Tuple containing (new matrix in RREF, pivot columns)