Helper struct that keeps the value that produces the lowest "score" as computed by your functor.
More...
template<typename ValueType, typename FunctionType>
struct FindLowestScore< ValueType, FunctionType >
Helper struct that keeps the value that produces the lowest "score" as computed by your functor.
Having this as a struct with a method, instead of a single "algorithm"-style function, allows you to keep your complicated filtering logic in your own loop, just calling in when you have a new candidate for "best".
- Note
- Create by calling make_lowest_score_finder() with your function/lambda that takes an element and returns the score, to deduce the un-spellable typename of the lambda.
- Template Parameters
-
ValueType | The type of a single element value - whatever you want to assign a score to. |
FunctionType | The type of your functor/lambda that turns a ValueType into a float "score". Usually deduced. |