Ultra 0.9.4
Loading...
Searching...
No Matches
ultra::refiner Class Reference

Public Member Functions

 refiner (const problem &p, bool=true)
template<Evaluator E, class Backend>
std::optional< evaluator_fitness_t< E > > optimise (evaluator_individual_t< E > &, const E &, Backend &&) const
template<Evaluator E, class Backend>
std::optional< evaluator_fitness_t< E > > optimise (evaluator_individual_t< E > &ind, const E &eva, Backend &&backend) const

Member Function Documentation

◆ optimise() [1/2]

template<Evaluator E, class Backend>
std::optional< evaluator_fitness_t< E > > ultra::refiner::optimise ( evaluator_individual_t< E > & ind,
const E & eva,
Backend && backend ) const

Applies a refinement backend to ind.

backend receives (ind, eva, params) and is expected to update ind. An engaged return value means that ind is an accepted replacement and contains the returned fitness; std::nullopt means no replacement.

Warning
Parallel refinement may evaluate multiple candidate individuals concurrently. Evaluators used must therefore support concurrent invocations or provide their own synchronisation.

◆ optimise() [2/2]

template<Evaluator E, class Backend>
std::optional< evaluator_fitness_t< E > > ultra::refiner::optimise ( evaluator_individual_t< E > & ind,
const E & eva,
Backend && backend ) const

Applies a refinement backend to ind.

backend receives (ind, eva, params) and is expected to update ind. An engaged return value means that ind is an accepted replacement and contains the returned fitness; std::nullopt means no replacement.

Warning
Parallel refinement may evaluate multiple candidate individuals concurrently. Evaluators used must therefore support concurrent invocations or provide their own synchronisation.

The documentation for this class was generated from the following files: