GHOST
|
#include <linear_equation_l.hpp>
Public Member Functions | |
LinearEquationL (const std::vector< int > &variables_index, double rhs, const std::vector< double > &coefficients) | |
LinearEquationL (const std::vector< int > &variables_index, double rhs) | |
LinearEquationL (const std::vector< Variable > &variables, double rhs, const std::vector< double > &coefficients) | |
LinearEquationL (const std::vector< Variable > &variables, double rhs) | |
Public Member Functions inherited from ghost::Constraint | |
Constraint (const std::vector< int > &variables_index) | |
Constraint (const std::vector< Variable > &variables) | |
Constraint (const Constraint &other)=default | |
Default copy contructor. More... | |
Constraint (Constraint &&other)=default | |
Default move contructor. More... | |
Constraint & | operator= (const Constraint &other)=delete |
Copy assignment operator disabled. More... | |
Constraint & | operator= (Constraint &&other)=delete |
Move assignment operator disabled. More... | |
virtual | ~Constraint ()=default |
Default virtual destructor. More... | |
bool | has_variable (int var_id) const |
Additional Inherited Members | |
Protected Member Functions inherited from ghost::global_constraints::LinearEquation | |
LinearEquation (const std::vector< int > &variables_index, double rhs, const std::vector< double > &coefficients) | |
LinearEquation (const std::vector< Variable > &variables, double rhs, const std::vector< double > &coefficients) | |
double | required_error (const std::vector< Variable * > &variables) const override |
double | optional_delta_error (const std::vector< Variable * > &variables, const std::vector< int > &variable_indexes, const std::vector< int > &candidate_values) const override |
void | conditional_update_data_structures (const std::vector< Variable * > &variables, int variable_id, int new_value) override |
Protected Member Functions inherited from ghost::Constraint | |
double | get_current_error () const |
int | get_id () const |
Inline method to get the unique id of the Constraint object. More... | |
Protected Attributes inherited from ghost::global_constraints::LinearEquation | |
double | rhs |
Implementation of the Linear Equation constraint with less than, i.e., the Scalar Product constraint with the atom '<'. See http://sofdem.github.io/gccat/gccat/Cscalar_product.html
ghost::global_constraints::LinearEquationL::LinearEquationL | ( | const std::vector< int > & | variables_index, |
double | rhs, | ||
const std::vector< double > & | coefficients | ||
) |
Constructor with a vector of variable IDs. This vector is internally used by ghost::Constraint 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 constraint. |
rhs | the right-hand side real number of the equation. |
coefficients | the vector of real numbers coefficients for each variable of the equation. |
ghost::global_constraints::LinearEquationL::LinearEquationL | ( | const std::vector< int > & | variables_index, |
double | rhs | ||
) |
Constructor with a vector of variable IDs. This constructor calls LinearEquationL( const std::vector<int>& index, double rhs, const std::vector<double>& coefficients), with all coefficients set to 1.0.
variables_index | a const reference to a vector of IDs of variables composing the constraint. |
rhs | the right-hand side real number of the equation. |
ghost::global_constraints::LinearEquationL::LinearEquationL | ( | const std::vector< Variable > & | variables, |
double | rhs, | ||
const std::vector< double > & | coefficients | ||
) |
Constructor with a vector of variable.
variables | a const reference to a vector of variables composing the constraint. |
rhs | the right-hand side real number of the equation. |
coefficients | the vector of real numbers coefficients for each variable of the equation. |
ghost::global_constraints::LinearEquationL::LinearEquationL | ( | const std::vector< Variable > & | variables, |
double | rhs | ||
) |
Constructor with a vector of variable. This constructor calls LinearEquationL( const std::vector<Variable>& variables, double rhs, const std::vector<double>& coefficients), with all coefficients set to 1.0.
variables | a const reference to a vector of variables composing the constraint. |
rhs | the right-hand side real number of the equation. |