dimforge / dimforge/nalgebra

Sparse matrix creation routines treat zeros differently. Unify behavior?

Open
#1,084 4 comments 0 reactions 0 assignees View on GitHub
documentation good first issue nalgebra-sparse
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

I noticed that `CooMatrix::push_matrix` does not threshold or detect zero elements in the input. Thus the resulting sparse matrix is more dense than it needs to be. By comparison, constructing a matrix using, e.g., `CscMatrix::from`, does detect entries that are exactly zero and does not include them in the resulting sparse matrix. If there isn't a rationale for the difference in behavior, may I suggest to make all construction methods detect and discard zero entries? This would incur overhead during construction but could speed up subsequent (particularly repeated) computations performed with the resulting sparse matrix. What are your thoughts on this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.