dimforge / dimforge/nalgebra

CSR/CSC: Provide constructor for unsorted but otherwise valid data

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

Description

The main constructor from existing CSR/CSC data is e.g. [try_from_csr_data](https://docs.rs/nalgebra-sparse/0.2.0/nalgebra_sparse/csr/struct.CsrMatrix.html#method.try_from_csr_data). However, this deliberately rejects unsorted input. However, if the only issue with the data is that the column indices are not sorted, then this is fixable. We should provide a similarly named `try_from_unsorted_csr_data` which would sort the column indices when needed. Similarly for `CscMatrix`, as well as an analogous constructor for `SparsityPattern`.

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.