dfo-algorithm
dfo-algorithm copied to clipboard
Loss of one iteration due to list not sorted after initialization
I believe that the way your code is implemented makes the first iteration of the main While loop in dfo_tr useless in some cases. Indeed, in the while loop, for the model to be correct, it is assumed that the lists Ynorms, Y, and f_values are sorted by _shift_sort_points. But you do not sort these lists before entering the while loop, thus making the first model computation wrong in some cases. Of course, this behavior only affects the first iteration since the lists are sorted at the end of the while loop.