1Default BFE
2===========
3
4.. versionadded:: 2.11
5
6*#include <pagmo/batch_evaluators/default_bfe.hpp>*
7
8.. cpp:namespace-push:: pagmo
9
10.. cpp:class:: default_bfe
11
12   This class is a user-defined batch fitness evaluator (UDBFE) that can be used to
13   construct a :cpp:class:`~pagmo::bfe`.
14   :cpp:class:`~pagmo::default_bfe` is the default UDBFE used by :cpp:class:`~pagmo::bfe`, and,
15   depending on the properties of the input :cpp:class:`~pagmo::problem`, it will delegate the implementation
16   of its call operator to :cpp:class:`~pagmo::member_bfe` or :cpp:class:`~pagmo::thread_bfe`.
17
18   .. cpp:function:: vector_double operator()(const problem &p, const vector_double &dvs) const
19
20      Call operator.
21
22      The call operator will internally employ :cpp:class:`~pagmo::member_bfe` or :cpp:class:`~pagmo::thread_bfe`
23      to perform the evaluation of the input batch of decision vectors *dvs*. The choice between :cpp:class:`~pagmo::member_bfe`
24      and :cpp:class:`~pagmo::thread_bfe` is made according to the following heuristic:
25
26      * if *p* provides a batch fitness member function (as established by :cpp:func:`pagmo::problem::has_batch_fitness()`),
27        then a :cpp:class:`~pagmo::member_bfe` will be constructed and invoked to produce the return value; otherwise,
28      * if *p* provides at least the :cpp:enumerator:`~pagmo::thread_safety::basic` thread safety level (as established
29        by :cpp:func:`pagmo::problem::get_thread_safety()`), then a :cpp:class:`~pagmo::thread_bfe` will be constructed
30        and invoked to produce the return value.
31
32      If *p* does not provide a batch fitness member function and if it does not provide at least the :cpp:enumerator:`~pagmo::thread_safety::basic`
33      thread safety level, an error will be raised.
34
35      :param p: the input :cpp:class:`~pagmo::problem`.
36      :param dvs: the input decision vectors that will be evaluated.
37
38      :return: the fitness vectors corresponding to the input decision vectors in *dvs*.
39
40      :exception 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 :cpp:enumerator:`~pagmo::thread_safety::basic` thread safety level.
41      :exception unspecified: any exception raised by the call operator of :cpp:class:`~pagmo::member_bfe` or :cpp:class:`~pagmo::thread_bfe`.
42
43   .. cpp:function:: std::string get_name() const
44
45      :return: a human-readable name for this :cpp:class:`~pagmo::default_bfe`.
46
47.. cpp:namespace-pop::
48