From b52575c46a127cef11f75a00bb4e11604e8f5223 Mon Sep 17 00:00:00 2001 From: Seabert Yuan Date: Thu, 9 Oct 2025 15:23:42 -0700 Subject: [PATCH 1/2] docs: link conversions page from CooMatrix page and add reference to duplicate entry sum behaviour --- nalgebra-sparse/src/convert/serial.rs | 6 +++--- nalgebra-sparse/src/coo.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nalgebra-sparse/src/convert/serial.rs b/nalgebra-sparse/src/convert/serial.rs index 8cb8b16f3..5fb00d06d 100644 --- a/nalgebra-sparse/src/convert/serial.rs +++ b/nalgebra-sparse/src/convert/serial.rs @@ -38,7 +38,7 @@ where coo } -/// Converts a [`CooMatrix`] to a dense matrix. +/// Converts a [`CooMatrix`] to a dense matrix summing duplicates. pub fn convert_coo_dense(coo: &CooMatrix) -> DMatrix where T: Scalar + Zero + ClosedAddAssign, @@ -50,7 +50,7 @@ where output } -/// Converts a [`CooMatrix`] to a [`CsrMatrix`]. +/// Converts a [`CooMatrix`] to a [`CsrMatrix`] summing duplicates. pub fn convert_coo_csr(coo: &CooMatrix) -> CsrMatrix where T: Scalar + Zero, @@ -124,7 +124,7 @@ where .expect("Internal error: Invalid CsrMatrix format during dense-> CSR conversion") } -/// Converts a [`CooMatrix`] to a [`CscMatrix`]. +/// Converts a [`CooMatrix`] to a [`CscMatrix`] summing duplicates. pub fn convert_coo_csc(coo: &CooMatrix) -> CscMatrix where T: Scalar + Zero, diff --git a/nalgebra-sparse/src/coo.rs b/nalgebra-sparse/src/coo.rs index 6f9698143..d1c237b5b 100644 --- a/nalgebra-sparse/src/coo.rs +++ b/nalgebra-sparse/src/coo.rs @@ -19,7 +19,7 @@ use crate::SparseFormatError; /// arrays `row_indices`, `col_indices` and `values` that constitute the coordinate triplets /// of the matrix. The indices must be in bounds, but *duplicate entries are explicitly allowed*. /// Upon conversion to other formats, the duplicate entries may be summed together. See the -/// documentation for the respective conversion functions. +/// documentation for the respective [conversion](crate::convert) functions. /// /// # Examples /// From e2ff7721f7096aa9f90ad0ca9fff034cffa4b982 Mon Sep 17 00:00:00 2001 From: Seabert Yuan Date: Fri, 10 Oct 2025 14:33:33 -0700 Subject: [PATCH 2/2] docs: update version in sparse crate home page usage section --- nalgebra-sparse/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nalgebra-sparse/src/lib.rs b/nalgebra-sparse/src/lib.rs index 11ce08348..777c43108 100644 --- a/nalgebra-sparse/src/lib.rs +++ b/nalgebra-sparse/src/lib.rs @@ -50,7 +50,7 @@ //! //! ```toml //! [dependencies] -//! nalgebra_sparse = "0.1" +//! nalgebra_sparse = "0.11" //! ``` //! //! # Supported matrix formats