|
| 1 | +""" |
| 2 | +This module contains: |
| 3 | +
|
| 4 | + - Data types: |
| 5 | + + `SparseMatrixCSR`:Compressed Sparse Row (CSR) sparse matrix implementation with Bi-based indexing. |
| 6 | + + `SymSparseMatrixCSR`: Symmetric Compressed Sparse Row sparse matrix implementation with Bi-based indexing. |
| 7 | +
|
| 8 | + - Procedures: |
| 9 | + + `push_coo!`: Helper function to build COO arrays for further building a SparseMatrix |
| 10 | + + `finalize_coo!`: Finalization of COO arrays building. |
| 11 | + + `sparsecsr`: Analogous method to [`sparse`](@ref) function to build a SparseMatrixCSR. |
| 12 | + + `symsparsecsr`: Analogous method to [`sparse`](@ref) function to build a SymSparseMatrixCSR. |
| 13 | + + `colvals`: Analogous method to [`rowvals`](@ref) to return `colvals` array. |
| 14 | + + `hasrowmajororder`: Return `true` if matrix values are ordered by row. |
| 15 | + + `hascolmajororder`: Return `true` if matrix values are ordered by column. |
| 16 | + + `getptr`: Return the pointer array of a SparseMatrix (`rowptr` or `colptr` depending on the SparseMatrix type) |
| 17 | + + `getindices`: Return the indices array of a SparseMatrix (`rowval` or `colval` depending on the SparseMatrix type) |
| 18 | +
|
| 19 | + - Overloaded procedures: |
| 20 | + + `*`: SparseMatrix-Vector product. |
| 21 | + + `mul!`: SparseMatrix-Vector product. |
| 22 | + + `nnz`: Return the number of stored (filled) elements in a sparse array. |
| 23 | + + `nonzeros`: Return `nzval` array. |
| 24 | + + `nzrange`: Return the range of indices for a particular row or column (Depending on the SparseMatrix type) |
| 25 | + + `findnz`: Return a tuple (I, J, V) where I and J are the row and column indices. |
| 26 | + + `rowvals`: Return row indices or raises an error (Depending on the SparseMatrix type) |
| 27 | +
|
| 28 | +""" |
1 | 29 | module SparseMatricesCSR
|
2 | 30 |
|
3 | 31 | using SparseArrays
|
4 | 32 | using LinearAlgebra
|
5 | 33 |
|
6 |
| -import Base: size, getindex, show, count |
7 |
| -import SparseArrays: nnz, getnzval, nzvalview, nonzeros, nzrange, findnz |
| 34 | +import Base: size, getindex, show, count, * |
| 35 | +import LinearAlgebra: mul! |
| 36 | +import SparseArrays: nnz, getnzval, nonzeros, nzrange, findnz, rowvals |
8 | 37 |
|
9 | 38 | export SparseMatrixCSR
|
10 | 39 | export SymSparseMatrixCSR
|
11 |
| -export push_coo!, finalize_coo!, sparsecsr, symsparsecsr, getrowptr, getcolval |
| 40 | +export push_coo!, finalize_coo!, sparsecsr, symsparsecsr, colvals |
| 41 | +export hasrowmajororder, hascolmajororder, getptr, getindices |
12 | 42 |
|
13 | 43 | include("SparseMatrixCSC.jl")
|
14 | 44 | include("SparseMatrixCSR.jl")
|
|
0 commit comments