sparse: Fix CSC column panic messages and Cholesky solve docs - #1617
Open
MrKyomoto wants to merge 1 commit into
Open
sparse: Fix CSC column panic messages and Cholesky solve docs#1617MrKyomoto wants to merge 1 commit into
MrKyomoto wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Partially addresses #1526.
CscMatrix::col()andcol_mut()so they refer to column indices instead of row indices.CscCholesky::solve()andsolve_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()andrefactor()unchanged.Their documentation currently requires the number of values to match
m_pattern.nnz(), while the implementation acceptsvalues.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.