GHOST
Public Member Functions | List of all members
ghost::global_constraints::AllDifferent Class Reference

#include <all_different.hpp>

Inheritance diagram for ghost::global_constraints::AllDifferent:
Inheritance graph
Collaboration diagram for ghost::global_constraints::AllDifferent:
Collaboration graph

Public Member Functions

 AllDifferent (const std::vector< int > &variables_index)
 
 AllDifferent (const std::vector< Variable > &variables)
 
- 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...
 
Constraintoperator= (const Constraint &other)=delete
 Copy assignment operator disabled. More...
 
Constraintoperator= (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::Constraint
double get_current_error () const
 
int get_id () const
 Inline method to get the unique id of the Constraint object. More...
 

Detailed Description

Implementation of the All Different constraint. See http://sofdem.github.io/gccat/gccat/Calldifferent.html

Constructor & Destructor Documentation

◆ AllDifferent() [1/2]

ghost::global_constraints::AllDifferent::AllDifferent ( const std::vector< int > &  variables_index)

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.

Parameters
variables_indexa const reference to a vector of IDs of variables composing the constraint.

◆ AllDifferent() [2/2]

ghost::global_constraints::AllDifferent::AllDifferent ( const std::vector< Variable > &  variables)

Constructor with a vector of variable.

Parameters
variablesa const reference to a vector of variables composing the constraint.

The documentation for this class was generated from the following file: