Skip to content

Export rcond, condest, and rgrowth - #43

Merged
ViralBShah merged 2 commits into
mainfrom
export-condition-estimates
Oct 30, 2026
Merged

ViralBShah merged 2 commits into
mainfrom
export-condition-estimates

Conversation

@ViralBShah

Copy link
Copy Markdown
Member

Fixes #29. rcond and condest already worked but weren't exported, so using KLU; rcond(klu(A)) threw UndefVarError. This PR exports them, along with rgrowth, which is part of the same family, and adds all three to the API list in the docs.

None of the three names exists in Base, LinearAlgebra or SparseArrays on Julia 1.13, and unqualified use works alongside using LinearAlgebra on 1.10. Other packages weren't checked for clashes. LinearAlgebra.cond isn't extended, because it defaults to the 2-norm and condest estimates the 1-norm.

Testing

The new tests cover real and complex values with Int32 and Int64 indices, and compare results against independent calculations from the factors and dense matrices. They also cover refactorization, computing the factorization on demand, and singular matrices. The full suite passes locally on macOS with Julia 1.13 at -t 2.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.29%. Comparing base (8b94a65) to head (6646a1c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   62.41%   69.29%   +6.87%     
==========================================
  Files           2        2              
  Lines         620      622       +2     
==========================================
+ Hits          387      431      +44     
+ Misses        233      191      -42     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ViralBShah
ViralBShah force-pushed the export-condition-estimates branch 2 times, most recently from fa566c4 to d77a81c Compare October 30, 2026 19:59
@ViralBShah

Copy link
Copy Markdown
Member Author

Review fixes in 2e48bd5. rgrowth made a singular factorization report issuccess(F) == true, because klu_rgrowth resets Common->status. The status is now restored after the call, and a test covers it. The three docstrings moved out of the @eval loop, since each function had four identical copies. The docs build now renders each one once.

ViralBShah and others added 2 commits October 30, 2026 20:50
These were already defined and correct, but had to be qualified with
`KLU.` to be used. rgrowth is exported too, as it is part of the same
family of functions.

Fixes #29

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
klu_rgrowth resets Common->status to KLU_OK, so calling the now exported rgrowth made a
singular factorization report issuccess(F) == true. Restore the status after the call.

The docstrings were inside the @eval loop, which gave each function four identical copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ViralBShah
ViralBShah force-pushed the export-condition-estimates branch from 2e48bd5 to 6646a1c Compare October 30, 2026 20:50
@ViralBShah
ViralBShah merged commit e606b12 into main Oct 30, 2026
8 checks passed
@ViralBShah
ViralBShah deleted the export-condition-estimates branch October 30, 2026 20:53
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.

Cannot use KLU to get the condition number.

1 participant