Skip to content

sparse: Fix CSC column panic messages and Cholesky solve docs - #1617

Open
MrKyomoto wants to merge 1 commit into
dimforge:mainfrom
MrKyomoto:fix/sparse-panic-docs
Open

sparse: Fix CSC column panic messages and Cholesky solve docs#1617
MrKyomoto wants to merge 1 commit into
dimforge:mainfrom
MrKyomoto:fix/sparse-panic-docs

Conversation

@MrKyomoto

Copy link
Copy Markdown

Summary

Partially addresses #1526.

  • Correct the panic messages in CscMatrix::col() and col_mut() so they refer to column indices instead of row indices.
  • Correct the CscCholesky::solve() and solve_mut() panic documentation. Right-hand-side matrices may be rectangular; their number of rows must match the dimension of the factorized matrix.

Remaining question

This PR intentionally leaves the value-count behavior of factor_numerical() and refactor() unchanged.

Their documentation currently requires the number of values to match m_pattern.nnz(), while the implementation accepts values.len() >= m_pattern.nnz() and ignores additional values.

Maintainer guidance would be helpful on whether the implementation should enforce exact equality or whether the documentation should describe the current behavior.

Partially addresses dimforge#1526.

- CscMatrix::col() and col_mut() reported out-of-bounds column
indices as row indices. Correct both panic messages and add regression
tests that verify the reported index type.
- The Cholesky solve methods accept rectangular right-hand-side matrices
as long as their row count matches the dimension of the factorized
matrix. Update their panic documentation to describe the actual
dimension requirement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant