BinaryHeuristic.cpp 382 B

123456789101112131415161718
  1. #include "BinaryHeuristic.h"
  2. BinaryHeuristic::BinaryHeuristic(std::ostream& outstream):
  3. outstream(outstream)
  4. {
  5. }
  6. std::function<bool(double, double)> BinaryHeuristic::getOperatorFromGoal(ObjectiveFunctionGoal goal)
  7. {
  8. switch (goal) {
  9. case ObjectiveFunctionGoal::min:
  10. return std::less<double>();
  11. case ObjectiveFunctionGoal::max:
  12. default:
  13. return std::greater<double>();
  14. }
  15. }