Expand description
Sparse matrix formats, sparse operations and helpers to transform different formats into each other.
Structs§
- Block
Lanczos Params - Parameters for the block thick-restart Lanczos eigensolver.
- Compressed
Sparse Data2 - Structure to store compressed sparse data with two potential data layers. Think for example in single cell raw counts and normalised counts.
- Lanczos
Params - Parameters for the restarted Lanczos eigensolver.
- Lanczos
Result - Outcome of a restarted Lanczos solve, with the convergence diagnostics.
- Ritz
Pairs - Ritz pairs and convergence diagnostics from [lanczos_thick_restart] and block_lanczos_thick_restart.
- Scatter
Ptr - Destination pointer handed to every worker of the parallel scatter.
- Sparse
Axis - Generate structure to store sparse rows or columns
- Sparse
ColMoments - One sparse column reduced to what
sparse_pairwise_correlationsneeds.
Enums§
- Compressed
Sparse Format - Type to describe the CompressedSparseFormat
Traits§
- Sparse
From Dense - Builds a CompressedSparseData2 from a dense
faermatrix.
Functions§
- block_
lanczos_ thick_ restart - Largest eigenpairs of a symmetric operator via block thick-restarted Lanczos.
- compute_
largest_ eigenpairs_ lanczos - Compute the largest eigenpairs of a symmetric sparse matrix.
- compute_
largest_ eigenpairs_ lanczos_ diag - Compute the largest eigenpairs of a symmetric sparse matrix, with diagnostics.
- coo_
to_ csr - Transform COO stored data into CSR
- coo_
to_ csr_ presorted - Optimised COO to CSR - assumes input is already sorted by (row, col)
- count_
zeroes - Counts the zeroes in a given faer matrix
- csr_
matmul_ csr - Multiply two CSR matrices using sparse accumulators and parallel processing
- csr_
matmul_ dense_ block - Apply a CSR operator to a dense row-major block:
out = a @ block - csr_
matvec - Sparse matrix @ dense vector:
M @ v. - csr_
sparse_ matmul_ dense - Sparse CSR @ sparse CSR -> dense
- csr_
vecmat - Dense vector @ sparse matrix:
v @ M. - eliminate_
zeros_ csr - Remove zeros from sparse matrix
- frobenius_
norm - Compute Frobenius norm of sparse matrix
- frobenius_
norm_ sq_ f64 - Squared Frobenius norm of a sparse matrix, in
f64. - normalise_
csr_ columns_ l1 - Normalises the columns of a CSR matrix to a sum of 1 (L1 norm)
- normalise_
csr_ rows_ l1 - Normalises the rows of a CSR matrix to a sum of 1 (L1 norm)
- parse_
compressed_ sparse_ format - Helper function to parse compressed sparse format
- require_
csc - Fail unless the matrix is stored as CSC.
- require_
csr - Fail unless the matrix is stored as CSR.
- require_
matmul_ operands - Check that two CSR matrices can be multiplied,
a @ b. - sparse_
add_ csr - Add two CSR matrices together
- sparse_
col_ means_ csc - Calculate the column means for CSC CompressedSparseData2
- sparse_
col_ moments - Reduce one sparse column to its moments without densifying it.
- sparse_
col_ sds_ csc - Calculate the column standard deviations for CSC CompressedSparseData2
- sparse_
multiply_ elementwise_ csr - Element-wise sparse multiplication
- sparse_
pairwise_ correlations - Pearson correlation of specified column pairs, over the sparsity patterns.
- sparse_
scalar_ multiply_ csr - Scalar multiplication of CSR matrix
- sparse_
subtract_ csr - Sparse matrix subtraction
- sparse_
svd_ lanczos - Compute sparse SVD using Lanczos on A^T A or AA^T
- thread_
chunks - Split
0..ninto one contiguous range per rayon worker. - transpose_
sparse - Re-express a compressed sparse matrix in the other format (CSC→CSR or CSR→CSC).
- transpose_
sparse_ single_ layer - Transpose a compressed sparse matrix (CSC→CSR or CSR→CSC), keeping only one of the two data layers.
- undirected_
edges_ to_ csr - Scatter a sorted undirected edge list into a symmetric CSR adjacency
- validate_
square_ csr - Check that a matrix is a structurally sound square CSR and return its order