StuartGordonReid/Comp-Finance

Solution comparators

Closed this issue · 0 comments

Currently I'm checking if a problem is a min or a max and then evaluating two or more solutions side by side to decide which is better ... I should instead,

  1. Overload the >, <, =, >=, <=, and != operators for the Solution abstract base class
  2. Decouple the Function (optimization problem) from the Optimizer
  3. Couple the Solution abc with the Function

That way in the Optimizer you would be able to directly compare solutions (or an instantiation thereof e.g. Particle) using equalities which will be a lot neater.