Skip to content

fix minimizer guess bug

Neil Warrack requested to merge minimizer_bugfix into release-3-1-x

The problem:
The guess() function doesn't work in MendelMin.hh

The details:
The user-supplied guess of the parameters (stored via a push_back to the _pop vector) are associated (via vector position) with a corresponding value for the function (stored in the _fit vector). The value is -1.0 regardless of the guess (oops). The lower-than-zero value later triggers an overwriting of the parameters (user-supplied or not) with randomly generated guesses (see L161).

The solution:
Save the real value of the function to be minimized given the user-supplied guess, instead of -1.0.

Merge request reports