Skip to content

refactor(c++): 🎨 implementation into either source or inline files - #203

Open
robertodr wants to merge 4 commits into
chore-cibuildwheel-conffrom
refactor-split-impls
Open

refactor(c++): 🎨 implementation into either source or inline files#203
robertodr wants to merge 4 commits into
chore-cibuildwheel-conffrom
refactor-split-impls

Conversation

@robertodr

@robertodr robertodr commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

🤖 AI text below 🤖

This pull request primarily refactors and reorganizes the implementation of graph encoding and cross-rank storage logic in the monoprop library. The main changes involve moving inline function implementations from headers to a new .cpp file, improving encapsulation, and cleaning up header dependencies. Additionally, a new utility function is added for parameter validation.

Refactoring and Implementation Reorganization

  • Moved inline implementations from MPGraphEncodingStorage.h and MPGraphEncodingTypes.h into a new source file MPGraphEncoding.cpp, replacing inline functions with declarations in the headers. This improves build times and encapsulation of implementation details. [1] [2] [3] [4] [5] [6] [7]
  • Updated CMake configuration to compile the new MPGraphEncoding.cpp file as part of the build.

API and Dependency Cleanups

  • Removed unnecessary includes and unused code from headers, reducing header bloat and unnecessary dependencies. [1] [2] [3] [4]
  • Changed the inclusion of inline implementation files in MonomialPropagator.h to a single .inl file, further reducing header complexity.

New and Improved Utilities

  • Added a new function expected_num_params to Validation.cpp and exposed it in Validation.h, providing a utility to determine the expected number of parameters from a mapping vector. [1] [2]
  • Removed unused static utility functions from MonomialPropagator that are now provided elsewhere.

These changes improve code organization, maintainability, and build performance by isolating implementation details and reducing header dependencies.

Checklist

  • Tests added or updated to cover the changes
  • Documentation updated (docstrings, docs/, CONTRIBUTING.md) if needed
  • CHANGELOG / release notes updated if applicable

AI/LLM disclosure

  • I did not use LLM tooling, or used it only privately for ideation
  • I used the following tool to help write this PR description:
  • I used the following tool to generate or modify code: GitHub Copilot, Claude Sonnet 4.6 and Claude Opus 4.8

Important

By opening this PR I confirm that I have read CONTRIBUTING.md and I agree to the terms of the Contributor License Agreement.

Warning

If you're contributing on behalf of your employer, contact cla@algorithmiq.fi to arrange a Corporate CLA.

@robertodr robertodr changed the title refactor(c++): 🎨 split implementation into either source or inlin… refactor(c++): 🎨 implementation into either source or inline files Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Docs preview: https://pr-203.monoprop-docs.pages.dev

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.31%. Comparing base (a20e30f) to head (6bde741).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                   Coverage Diff                    @@
##           chore-cibuildwheel-conf     #203   +/-   ##
========================================================
  Coverage                    95.31%   95.31%           
========================================================
  Files                           14       14           
  Lines                          704      704           
  Branches                        88       88           
========================================================
  Hits                           671      671           
  Misses                          20       20           
  Partials                        13       13           
Flag Coverage Δ
cpp 95.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@robertodr
robertodr force-pushed the refactor-split-impls branch from dd1ded4 to 959a78e Compare August 5, 2026 12:27
@robertodr
robertodr changed the base branch from chore-split-implementation to chore-cibuildwheel-conf August 5, 2026 12:27
@robertodr
robertodr force-pushed the refactor-split-impls branch from 8c8cd31 to 8c4a9ea Compare August 5, 2026 14:10
@robertodr
robertodr force-pushed the refactor-split-impls branch from 8c4a9ea to 8bb5b72 Compare August 5, 2026 14:42
@Panadestein
Panadestein force-pushed the refactor-split-impls branch from 8bb5b72 to d4d25ae Compare August 5, 2026 15:45
@robertodr
robertodr force-pushed the refactor-split-impls branch from d4d25ae to c5e4065 Compare August 5, 2026 16:12
@robertodr
robertodr force-pushed the refactor-split-impls branch from c5e4065 to 64d772c Compare August 5, 2026 17:51
@robertodr
robertodr force-pushed the refactor-split-impls branch from 64d772c to 6bde741 Compare August 5, 2026 19:18
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

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