Skip to content

feat: display Big O notation in CLI output#592

Merged
GiggleLiu merged 3 commits intomainfrom
feat/cli-big-o-notation
Mar 12, 2026
Merged

feat: display Big O notation in CLI output#592
GiggleLiu merged 3 commits intomainfrom
feat/cli-big-o-notation

Conversation

@GiggleLiu
Copy link
Copy Markdown
Contributor

Summary

  • Display Big O notation for complexity and overhead in CLI commands (pred show, pred path)
  • Add big_o_normal_form two-phase pipeline (canonical form → asymptotic normalization) with DRY helpers (big_o_of, overhead_to_json, fmt_overhead_parts)
  • Expand pred_sym binary and its test suite

Test plan

  • make check passes (fmt + clippy + all tests)
  • Verify pred show MIS displays Big O complexity for variants
  • Verify pred path MIS QUBO displays Big O overhead per step

🤖 Generated with Claude Code

GiggleLiu and others added 3 commits March 12, 2026 19:03
Use asymptotic_normal_form to show simplified Big O notation alongside
exact formulas in `pred show` (variant complexity + reduction overhead)
and `pred path` (step overhead + composed overall). Also included in
JSON output as a `big_o` field.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Replace inline overhead display with shared big_o_of(), fmt_overhead_parts(),
and overhead_to_json() helpers. Display only asymptotic notation (no constant
factors) for complexity, reduction overhead, and path overhead.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@GiggleLiu GiggleLiu merged commit 31d51be into main Mar 12, 2026
4 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 93.91635% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.49%. Comparing base (a0fb111) to head (e1aa071).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/big_o.rs 88.97% 15 Missing ⚠️
src/canonical.rs 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #592      +/-   ##
==========================================
+ Coverage   96.48%   96.49%   +0.01%     
==========================================
  Files         204      204              
  Lines       28169    28397     +228     
==========================================
+ Hits        27178    27401     +223     
- Misses        991      996       +5     

☔ 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.

@GiggleLiu GiggleLiu deleted the feat/cli-big-o-notation branch April 12, 2026 00:48
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.

1 participant