Closed cmourglia closed 8 years ago
Thanks a lot for this pr. I would rather have the isBetter method tied to a lambda function instead of it decided at compile time, that would allow for switching it along the evo run (although I agree it is rather uncommon to want to change such a thing during a run), and adding captures might be desirable in some cases.
You can now create your GA with a second template parameter supposed to provide comparison between to doubles, e.g:
When you create your GA, you call it with
GA<DNA, Lesser> myGa;
which will replaceisBetter
default comparison (greater than) by ours.