Collection of functions for selecting the optimum value out of a vector of values according to a given strategy.
More...
|
| long | minValue (const std::vector< long > &values) |
| | Minimal value.
|
| |
| long | meanValue (const std::vector< long > &values) |
| | Arithmetic mean.
|
| |
| template<class T > |
| T | medianValue (std::vector< T > values) |
| | Median value.
|
| |
| long | optimumValue (const std::vector< long > &values, SelectorStrategyOption strategy) |
| | Optimal value according to passed strategy.
|
| |
Collection of functions for selecting the optimum value out of a vector of values according to a given strategy.
◆ meanValue()
| long autopas::OptimumSelector::meanValue |
( |
const std::vector< long > & |
values | ) |
|
|
inline |
Arithmetic mean.
- Parameters
-
- Returns
- Arithmetic mean of the vector.
◆ medianValue()
template<class T >
| T autopas::OptimumSelector::medianValue |
( |
std::vector< T > |
values | ) |
|
|
inline |
Median value.
- Parameters
-
- Returns
- Middle ((size-1) /2) of the sorted vector.
- Todo:
- C++20: replace by std::midpoint
◆ minValue()
| long autopas::OptimumSelector::minValue |
( |
const std::vector< long > & |
values | ) |
|
|
inline |
Minimal value.
- Parameters
-
- Returns
- Smallest value of the vector.
◆ optimumValue()
| long autopas::OptimumSelector::optimumValue |
( |
const std::vector< long > & |
values, |
|
|
SelectorStrategyOption |
strategy |
|
) |
| |
|
inline |
Optimal value according to passed strategy.
- Parameters
-
| values | |
| strategy | For possible selector strategy choices see AutoPas::SelectorStrategy. |
- Returns
- value or 0 if values is empty.