Skip to content

Fix #210: [Model] Partition#224

Closed
zazabap wants to merge 2 commits intomainfrom
issue-210-partition
Closed

Fix #210: [Model] Partition#224
zazabap wants to merge 2 commits intomainfrom
issue-210-partition

Conversation

@zazabap
Copy link
Copy Markdown
Collaborator

@zazabap zazabap commented Mar 10, 2026

Summary

Add the Partition problem model — a classic NP-complete satisfaction problem (Karp #20, GJ SP2).

Fixes #210

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.92%. Comparing base (53c13f1) to head (ea6a387).
⚠️ Report is 223 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #224      +/-   ##
==========================================
+ Coverage   96.90%   96.92%   +0.01%     
==========================================
  Files         202      204       +2     
  Lines       27679    27796     +117     
==========================================
+ Hits        26823    26940     +117     
  Misses        856      856              

☔ View full report in Codecov by Sentry.
📢 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.

Add the Partition satisfaction problem: given a multiset of positive
integers, determine whether it can be split into two subsets with equal
sum. Implements Problem (Metric=bool) and SatisfactionProblem traits.

- Model: src/models/misc/partition.rs with Partition struct, evaluate(),
  num_elements()/total_sum() getters, declare_variants! (Schroeppel-Shamir)
- Tests: 13 unit tests covering creation, evaluation, solver, serialization
- CLI: dispatch, alias, and create support (reuses --sizes flag)
- Paper: problem-def entry with formal definition and example

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@GiggleLiu GiggleLiu closed this Mar 19, 2026
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.

[Model] Partition

2 participants