Null problem#
-
struct null_problem#
Null problem.
This problem is used to implement the default constructors of pagmo::problem and of the meta-problems.
Public Functions
-
null_problem(vector_double::size_type nobj = 1u, vector_double::size_type nec = 0u, vector_double::size_type nic = 0u, vector_double::size_type nix = 0u)#
Constructor from number of objectives.
- Parameters
nobj – the desired number of objectives.
nec – the desired number of equality constraints.
nic – the desired number of inequality constraints.
nix – the problem integer dimension.
- Throws
std::invalid_argument – if
nobj
is zero.
-
vector_double fitness(const vector_double&) const#
Fitness.
- Returns
a zero-filled vector of size equal to the number of objectives.
-
std::pair<vector_double, vector_double> get_bounds() const#
Problem bounds.
- Returns
the pair
([0.],[1.])
.
-
inline vector_double::size_type get_nobj() const#
Number of objectives.
- Returns
the number of objectives of the problem (as specified upon construction).
-
inline vector_double::size_type get_nec() const#
Number of equality constraints.
- Returns
the number of equality constraints of the problem (as specified upon construction).
-
inline vector_double::size_type get_nic() const#
Number of inequality constraints.
- Returns
the number of inequality constraints of the problem (as specified upon construction).
-
inline vector_double::size_type get_nix() const#
Size of the integer part.
- Returns
the size of the integer part (as specified upon construction).
-
inline std::string get_name() const#
Problem name.
- Returns
"Null problem"
.
-
null_problem(vector_double::size_type nobj = 1u, vector_double::size_type nec = 0u, vector_double::size_type nic = 0u, vector_double::size_type nix = 0u)#