![]() |
Ultra 0.9.4
|
#include <evaluator.h>
Static Public Attributes | |
| static constexpr std::size_t | default_min_samples_per_thread = 512 |
Protected Member Functions | |
| evaluator (D &) noexcept | |
| bool | set_parallel_evaluation (unsigned, std::size_t=0) noexcept |
| const auto & | data () const noexcept |
| std::size_t | min_samples_per_thread () const noexcept |
| unsigned | parallel_helpers () const noexcept |
Base class for dataset-aware evaluators.
| D | dataset type |
This class stores a reference to a dataset and provides a uniform access interface for both plain datasets and multi_dataset specialisations. It is intended to be used as a protected base class for concrete evaluators.
|
explicitprotectednoexcept |
Constructs the evaluator bound to a dataset.
| [in] | d | dataset used for fitness evaluation |
|
nodiscardprotectednoexcept |
Returns the dataset currently used for evaluation.
For multi_dataset, this returns the currently selected dataset. Otherwise, it returns the dataset itself.
|
nodiscardprotectednoexcept |
Returns the effective minimum number of dataset examples per evaluation thread, including the default selected when zero was configured.
|
nodiscardprotectednoexcept |
Returns the configured number of helper threads for parallel evaluation.
|
protectednoexcept |
Sets the number of helper threads and workload threshold for parallel evaluation.
| [in] | helpers | number of helper threads; zero disables parallel evaluation |
| [in] | min_samples | minimum number of samples per thread; zero uses the default threshold |