Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

🤖 Generated with SplitRS

Functions§

arnoldi
Arnoldi iteration: build an orthonormal Krylov basis for A.
backward_substitution
Backward substitution: solve U x = b where U is upper triangular (CSR).
banded_matrix
Build a CSR matrix from a banded stencil.
bicgstab_solve
Biconjugate Gradient Stabilised (BICGStab) solver for non-symmetric systems A x = b.
cg_solve
Conjugate Gradient solver for symmetric positive-definite systems A x = b.
col_scale
Column-scale a CSR matrix: A D_c where D_c = diag(scales).
coo_to_csr
Convert COO (coordinate format) triplets directly to CSR.
diagonal_preconditioner
Build a diagonal (Jacobi) preconditioner: returns 1 / a_ii for each i.
equilibration_scales
Two-sided equilibration scaling: compute row/col scale vectors so that the scaled matrix has unit diagonal (i.e., sqrt(|A_ii|) scaling).
forward_substitution
Forward substitution: solve L x = b where L is lower triangular (CSR).
gauss_seidel_solve
Gauss-Seidel iterative solver for A x = b.
identity_csr
Return the n×n identity matrix in CSR format.
jacobi_scale
Diagonal (Jacobi) scaling: return D^{-1} A where D = diag(A).
jacobi_solve
Jacobi iterative solver.
lanczos
Lanczos iteration: build a tridiagonal approximation of a symmetric matrix A.
laplacian_1d
1-D finite-difference Laplacian on n interior nodes.
laplacian_2d
2-D finite-difference Laplacian on an nx × ny grid (5-point stencil).
lower_triangular
Extract the lower triangular part of a sparse matrix (including diagonal).
minres_solve
Minimum Residual (MINRES) method for symmetric (possibly indefinite) systems A x = b.
multi_rhs_cg
Solve A X = B for multiple right-hand sides simultaneously using CG.
pcg_solve
Preconditioned Conjugate Gradient solver.
ritz_values
Compute Ritz values from a Lanczos tridiagonal matrix via QR iteration.
row_scale
Row-scale a CSR matrix: D_r A where D_r = diag(scales).
saddle_point_solve
Solve the saddle-point system: [ A B^T ] [ x ] [ f ] [ B 0 ] [ p ] = [ g ]
sor_solve
Successive Over-Relaxation (SOR) solver. Use omega = 1 for Gauss-Seidel.
sparse_eig_power
Compute the dominant eigenvalue and eigenvector of a sparse matrix using the power method.
sparse_eig_smallest
Compute the smallest eigenvalue of a sparse SPD matrix using inverse iteration (shift-and-invert with the ILU preconditioner).
spectral_radius_estimate
Estimate the spectral radius (largest singular value approximation) via the power method applied to A^T A.
spgemm
Sparse-sparse matrix multiply: C = A * B.