Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR extends the optimal Metropolis updater (OPT_METROPOLIS) in the sample_huio function to handle polynomial terms up to 4th degree, expanding from the previous limitation of only quadratic (2nd degree) terms.
- Extended optimal transition capability from quadratic to quartic polynomial terms
- Added new polynomial minimum finding utility functions for cubic and quartic cases
- Refactored the variable degree tracking system to use a more efficient vector-based approach
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| include/openjij/utility/min_polynomial.hpp | New utility functions for finding minimum values of integer polynomials up to degree 4 |
| include/openjij/system/integer_polynomial_sa_system.hpp | Extended GetMinEnergyDifference to handle cubic and quartic coefficients using new utility functions |
| include/openjij/graph/integer_polynomial_model.hpp | Replaced set-based degree tracking with vector-based approach for better performance |
| include/openjij/updater/single_integer_move.hpp | Updated method names to reflect extended capability from quadratic to quartic |
| include/openjij/system/integer_quadratic_sa_system.hpp | Updated method names for consistency |
| tests/cxxtest/utility/min_polynomial.hpp | Comprehensive test cases for the new polynomial minimum finding functions |
| tests/cxxtest/graph/integer_polynomial_model.hpp | Updated tests to use new degree tracking API |
| tests/cxxtest/utility/all.hpp | Added include for new polynomial utility tests |
| tests/cxxtest/cxxtest.cpp | Added include for new polynomial utility header |
| openjij/declare.hpp | Updated Python bindings to use new degree tracking API |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
変更
sample_huio関数において、updater=OPT_METROPOLISとすると、ある変数に対して最もエネルギーが下がるような最適遷移が行われます。現在のmainの実装ではこの最適遷移が行われるのはz^2のような2乗項だけでしたが、これを4乗項まで行うように変更しました。