Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## cupdlp-csparse #3810 +/- ##
==================================================
- Coverage 76.15% 76.14% -0.02%
==================================================
Files 467 467
Lines 116789 116702 -87
Branches 18144 18136 -8
==================================================
- Hits 88946 88867 -79
+ Misses 27603 27595 -8
Partials 240 240 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Description
Summary
This PR replaces the bodies of ipx::DepthFirstSearch and ipx::AugmentingPath with new implementations, so that IPX no longer contains code that follows cs_dfs.c and cs_augment.c from CSparse. The CSparse/Davis citations are removed. AugmentingPath now cites the original algorithm: Duff, "On algorithms for obtaining a maximum transversal", ACM TOMS 7 (1981).
Changes
DepthFirstSearch is an iterative depth-first search.
AugmentingPath is a depth-first search for an alternating path, with a "cheap assignment" check whenever a column is first visited.
Interface change: the three workspace arrays work (size m), work2 and work3 (size m+1 each) are replaced by one work array of size 2*(m+1).
Each path level stores its column and resume position. The row the path leaves through is recovered as Ai[pos-1], so the rows don't need their own stack.
The callers in guess_basis.cc and symbolic_invert.cc are updated for the new signature.
Testing
Function-level: I compared the new code with the original on 30,000 random sparse matrices of up to 300×400, including excluded rows, columns with no entries and repeated markers. Every output matched exactly after every call:
End to end: IPX with crossover, single-threaded, gives identical logs to the original on all 93 deterministic instances under 3 MB in check/instances, once timings are removed. I left out issue-3166, a MIP that hits the time limit.
unit_tests: all 527 test cases pass.
Checklist
latestbranch