Skip to content

Commit d3a657a

Browse files
committed
Review and clean up ChatGPT-generated Nelder-Mead implementation
Fix bugs: error message typo ("Min not be" -> "Min must not be"), validation messages using wrong bracket notation ([0,1] -> (0,1) for exclusive bounds), swapped format args in expectPoint test helper, mislabeled NaN-Min test case, and missing empty-x0 validation. Clean up code: replace setZero with clear builtin, rename misleading reflect method to transformPoint, remove unnecessary buffer zeroing in replacePoint, remove redundant n parameter from createSimplex, simplify createSimplex with copy, use min/max builtins in constraint clamping, and add comments to algorithm steps throughout. Trim verbose ChatGPT-style doc comments to concise idiomatic Go.
1 parent d435cd6 commit d3a657a

File tree

2 files changed

+122
-118
lines changed

2 files changed

+122
-118
lines changed

0 commit comments

Comments
 (0)