Skip to content

Commit

Permalink
Added default state evaluator that treats all states equally (#94)
Browse files Browse the repository at this point in the history
* Added default state evaluator that treats all states equally

* Removed solution input parameter to pass checks
  • Loading branch information
marrts authored Jun 29, 2022
1 parent b7faabb commit 3260ec7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ class StateEvaluator
StateEvaluator(StateEvaluator&&) noexcept = default;
StateEvaluator& operator=(StateEvaluator&&) noexcept = default;

virtual std::pair<bool, FloatType> evaluate(const State<FloatType>& solution) const = 0;
virtual std::pair<bool, FloatType> evaluate(const State<FloatType>& /*solution*/) const
{
return std::make_pair<bool, FloatType>(true, static_cast<FloatType>(0.0));
};
};

using StateEvaluatorF = StateEvaluator<float>;
Expand Down

0 comments on commit 3260ec7

Please sign in to comment.