Skip to content

Fix suwa-todo method and improve heatbath method#496

Merged
K-Suzuki-Jij merged 1 commit intomainfrom
feature/improve-updater
Aug 7, 2025
Merged

Fix suwa-todo method and improve heatbath method#496
K-Suzuki-Jij merged 1 commit intomainfrom
feature/improve-updater

Conversation

@K-Suzuki-Jij
Copy link
Contributor

変更

  1. 熱浴法の高速化。これまでGumbel-Max Trickを使った実装であったが、累積和を直接計算する素直な実装の方が速かったのでそのように変更した。
  2. 諏訪藤堂法のバグ修正。いまのmainの実装でここの部分に等号も含めないと数値誤差で結果が微妙におかしくなることがわかったため、ここに等号を含めた。そのうえで不要な配列などを削除して高速化した。(ロジックの上ではもとの実装に等号を含めた変更となります)

@K-Suzuki-Jij K-Suzuki-Jij requested review from Copilot and j-i-k-o August 7, 2025 00:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the performance of two optimization methods in OpenJij by fixing a bug in the Suwa-Todo method and replacing the Gumbel-Max Trick implementation in the heatbath method with a more efficient cumulative sum approach.

  • Fixed numerical precision bug in Suwa-Todo method by changing strict inequality to less-than-or-equal comparison
  • Replaced Gumbel-Max Trick with direct cumulative probability calculation in heatbath method for better performance
  • Removed unnecessary arrays and simplified logic in Suwa-Todo method for optimization

@K-Suzuki-Jij K-Suzuki-Jij merged commit cf5f4ce into main Aug 7, 2025
20 checks passed
@K-Suzuki-Jij K-Suzuki-Jij deleted the feature/improve-updater branch August 7, 2025 01:00
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.

2 participants