Default BFE#

New in version 2.11.

#include <pagmo/batch_evaluators/default_bfe.hpp>

class default_bfe#

This class is a user-defined batch fitness evaluator (UDBFE) that can be used to construct a bfe. default_bfe is the default UDBFE used by bfe, and, depending on the properties of the input problem, it will delegate the implementation of its call operator to member_bfe or thread_bfe.

vector_double operator()(const problem &p, const vector_double &dvs) const#

Call operator.

The call operator will internally employ member_bfe or thread_bfe to perform the evaluation of the input batch of decision vectors dvs. The choice between member_bfe and thread_bfe is made according to the following heuristic:

If p does not provide a batch fitness member function and if it does not provide at least the basic thread safety level, an error will be raised.

Parameters
  • p – the input problem.

  • dvs – the input decision vectors that will be evaluated.

Returns

the fitness vectors corresponding to the input decision vectors in dvs.

Throws
  • std::invalid_argument – if the input problem p does not provide a batch fitness member function and it is does not provide at least the basic thread safety level.

  • unspecified – any exception raised by the call operator of member_bfe or thread_bfe.

std::string get_name() const#
Returns

a human-readable name for this default_bfe.