Pin the asymmetric-cover gauge per support component#33
Merged
Conversation
The gauge a -> γ*a, b -> b/γ of an asymmetric cover acts independently on each connected component of the bipartite support graph of A, so the balance convention determines the split only when imposed within each component. As a single global constraint it pinned one of the k gauge directions and left the rest to solver internals — the native solver's ridge, the heuristic's tightening passes, or whichever vertex the LP solver returned — so cover_min([B 0; 0 C]) did not reproduce the blockwise covers of B and C in the returned factors. A union-find helper, _support_components, now backs _balance_cover!, the native exact solver's closed-form shift, and post-solve shifts in the JuMP and Ipopt extensions (whose global balance model constraint pins only the one direction). The split is now a deterministic function of the support and the products, and block-diagonal assembly commutes with cover_min. The isbalanced test helper checks every component, and new tests cover component labeling, block-assembly consistency, offset axes, and the extension solvers. Assisted-by: Claude Fable 5 (claude-fable-5) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #33 +/- ##
==========================================
+ Coverage 98.55% 98.77% +0.21%
==========================================
Files 13 13
Lines 2070 2196 +126
==========================================
+ Hits 2040 2169 +129
+ Misses 30 27 -3 ☔ 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.
The gauge a -> γ*a, b -> b/γ of an asymmetric cover acts independently on each connected component of the bipartite support graph of A, so the balance convention determines the split only when imposed within each component. As a single global constraint it pinned one of the k gauge directions and left the rest to solver internals — the native solver's ridge, the heuristic's tightening passes, or whichever vertex the LP solver returned — so cover_min([B 0; 0 C]) did not reproduce the blockwise covers of B and C in the returned factors.
A union-find helper, _support_components, now backs _balance_cover!, the native exact solver's closed-form shift, and post-solve shifts in the JuMP and Ipopt extensions (whose global balance model constraint pins only the one direction). The split is now a deterministic function of the support and the products, and block-diagonal assembly commutes with cover_min. The isbalanced test helper checks every component, and new tests cover component labeling, block-assembly consistency, offset axes, and the extension solvers.
This PR also includes a second (unrelated) commit polishing an overly-verbose docstring.
Assisted-by: Claude Fable 5 (claude-fable-5) noreply@anthropic.com