Module sparse

Module sparse 

Source
Expand description

sparse matrix data structures

most sparse matrix algorithms accept matrices in sparse column-oriented format. this format represents each column of the matrix by storing the row indices of its non-zero elements, as well as their values

the indices and the values are each stored in a contiguous slice (or group of slices for arbitrary values). in order to specify where each column starts and ends, a slice of size ncols + 1 stores the start of each column, with the last element being equal to the total number of non-zeros (or the capacity in uncompressed mode)

§example

consider the 4-by-5 matrix:

[[10.0, 0.0, 12.0, -1.0, 13.0]
 [ 0.0, 0.0, 25.0, -2.0,  0.0]
 [ 1.0, 0.0,  0.0,  0.0,  0.0]
 [ 4.0, 0.0,  0.0,  0.0,  5.0]]

the matrix is stored as follows:

column pointers: | 0                  | 3,3         | 5           | 7           | 9

row indices    : |    0 |    2 |    3 |    0 |    1 |    0 |    1 |    0 |    3 |
values         : | 10.0 |  1.0 |  4.0 | 12.0 | 25.0 | -1.0 | -2.0 | 13.0 |  5.0 |

Modules§

csc_numeric
implementation of numeric representation
csc_symbolic
implementation of symbolic representation
csr_numeric
implementation of numeric representation
csr_symbolic
implementation of symbolic representation
linalg
sparse linear algebra module. contains low level routines and the implementation of their corresponding high level wrappers
ops
sparse matrix binary and ternary operation implementations
utils
algorithmic primitives for sparse matrices

Structs§

Argsort
the order values should be read in, when constructing/filling from indices and values
Pair
pair of indices with C-compatible layout
Triplet
triplet of indices and value with C-compatible layout

Enums§

CreationError
errors that can occur during the creation of sparse matrices from user input
FaerError
errors that can occur in sparse algorithms

Type Aliases§

SparseColMat
owning sparse column major matrix
SparseColMatMut
view over sparse column major matrix
SparseColMatRef
view over sparse column major matrix
SparseRowMat
owning sparse row major matrix
SparseRowMatMut
view over sparse row major matrix
SparseRowMatRef
view over sparse row major matrix
SymbolicSparseColMat
owning symbolic structure of sparse matrix in column format, either compressed or uncompressed
SymbolicSparseColMatRef
symbolic view structure of sparse matrix in column format, either compressed or uncompressed
SymbolicSparseRowMat
owning symbolic structure of sparse matrix in row format, either compressed or uncompressed
SymbolicSparseRowMatRef
symbolic view structure of sparse matrix in row format, either compressed or uncompressed