mahf-opt / mahf

A framework for modular construction and evaluation of metaheuristics.
GNU General Public License v3.0
10 stars 0 forks source link

Update the `CroState` to make molecules accessable individually #159

Closed Saethox closed 1 year ago

Saethox commented 1 year ago

The components updating the CroState currently need to juggle with indices to avoid borrowing two Molecules mutably at the same time, so we might want to look into replacing Vec with something that allows multiple mutable references to distinct indices. The current solution works, but is pretty unreadable.

Saethox commented 1 year ago

I found this gives more troubles than benefits, as the index is needed for the population anyway.