GHOST
|
#include <objective.hpp>
Public Member Functions | |
Maximize (const std::vector< int > &variables_index) | |
Maximize (const std::vector< Variable > &variables) | |
Maximize (const std::vector< int > &variables_index, const std::string &name) | |
Maximize (const std::vector< Variable > &variables, const std::string &name) | |
Maximize (const std::vector< int > &variables_index, const char *name) | |
Maximize (const std::vector< Variable > &variables, const char *name) | |
Public Member Functions inherited from ghost::Objective | |
Objective (const Objective &other)=default | |
Default copy contructor. More... | |
Objective (Objective &&other)=default | |
Default move contructor. More... | |
Objective & | operator= (const Objective &other)=delete |
Copy assignment operator disabled. More... | |
Objective & | operator= (Objective &&other)=delete |
Move assignment operator disabled. More... | |
virtual | ~Objective ()=default |
Default virtual destructor. More... | |
std::string | get_name () const |
Inline accessor to get the name of the objective object. More... | |
bool | is_optimization () const |
Inline method returning if a user-defined objective function has been declared. More... | |
bool | is_maximization () const |
Additional Inherited Members | |
Protected Member Functions inherited from ghost::Objective | |
virtual double | required_cost (const std::vector< Variable * > &variables) const =0 |
virtual void | conditional_update_data_structures (const std::vector< Variable * > &variables, int index, int new_value) |
virtual int | expert_heuristic_value (const std::vector< Variable * > &variables, int variable_index, const std::vector< int > &possible_values, randutils::mt19937_rng &rng) const |
virtual int | expert_heuristic_value_permutation (const std::vector< Variable * > &variables, int variable_index, const std::vector< int > &bad_variables, randutils::mt19937_rng &rng) const |
virtual double | expert_postprocess (const std::vector< Variable * > &variables, double best_cost) const |
void | is_not_optimization () |
This is the base class to define maximization objective functions.
ghost::Maximize cannot be directly used to encode user-defined objective function, since this is an abstract class. To declare a problem with GHOST, users have to make their own derived objective class.
|
inline |
Constructor with a vector of variable IDs. This vector is internally used by Objective to know what variables from the global variable vector it is handling. The name of the objective function will be set to the string 'Maximize'.
variables_index | a const reference to a vector of IDs of variables composing the objective function. |
|
inline |
Constructor building a vector of variable IDs by calling v->get_id() from all variables v. The name of the objective function will be set to the string 'Maximize'.
variables | a const reference to a vector of variable composing the objective function. |
|
inline |
Constructor with a vector of variable IDs. This vector is internally used by Objective to know what variables from the global variable vector it is handling.
variables_index | a const reference to a vector of IDs of variables composing the objective function. |
name | a const reference ot a string to give a name to the objective function. |
|
inline |
Constructor building a vector of variable IDs by calling v->get_id() from all variables v.
variables | a const reference to a vector of variable composing the objective function. |
name | a const reference ot a string to give a name to the objective function. |
|
inline |
Constructor with a vector of variable IDs. This vector is internally used by Objective to know what variables from the global variable vector it is handling.
variables_index | a const reference to a vector of IDs of variables composing the objective function. |
name | a const char* to give a name to the objective function. |
|
inline |
Constructor building a vector of variable IDs by calling v->get_id() from all variables v.
variables | a const reference to a vector of variable composing the objective function. |
name | a const char* to give a name to the objective function. |