Gecode::CpltSetVar Class Reference
[Set variables with complete domain representation]
#include <cpltset.hh>
Inherits Gecode::VarBase< Gecode::CpltSet::CpltSetVarImp >.
Detailed Description
Finite set variable with complete domain representation.Definition at line 97 of file cpltset.hh.
Value access | |
unsigned int | glbSize (void) const |
Return the size of the greatest lower bound. | |
unsigned int | lubSize (void) const |
Return the size of the least upper bound. | |
unsigned int | unknownSize (void) const |
Return the size of lub-glb. | |
unsigned int | cardMin (void) const |
Return current cardinality minimum. | |
unsigned int | cardMax (void) const |
Return current cardinality maximum. | |
int | lubMin (void) const |
Return minimum of the least upper bound. | |
int | lubMax (void) const |
Return maximum of the least upper bound. | |
int | glbMin (void) const |
Return minimum of the greatest lower bound. | |
int | glbMax (void) const |
Return maximum of the greatest lower bound. | |
Domain tests | |
bool | contains (int i) const |
Test whether i is in greatest lower bound. | |
bool | notContains (int i) const |
Test whether i is not in the least upper bound. | |
bool | assigned (void) const |
Test whether this variable is assigned. | |
Cloning | |
void | update (Space *home, bool share, CpltSetVar &x) |
Update this variable to be a clone of variable x. | |
Public Member Functions | |
CpltSetVar (void) | |
Default constructor. | |
void | dispose (Space *home) |
Deallocate memory. | |
GECODE_CPLTSET_EXPORT | CpltSetVar (Space *home, int glbMin, int glbMax, int lubMin, int lubMax, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card) |
Initialize variable with given bounds and cardinality. | |
void | init (Space *home, int glbMin, int glbMax, int lubMin, int lubMax, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card) |
Initialize variable with given bounds and cardinality. | |
GECODE_CPLTSET_EXPORT | CpltSetVar (Space *home, const IntSet &glbD, int lubMin, int lubMax, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card) |
Initialize variable with given bounds and cardinality. | |
void | init (Space *home, const IntSet &glbD, int lubMin, int lubMax, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card) |
Initialize variable with given bounds and cardinality. | |
GECODE_CPLTSET_EXPORT | CpltSetVar (Space *home, int glbMin, int glbMax, const IntSet &lubD, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card) |
Initialize variable with given bounds and cardinality. | |
void | init (Space *home, int glbMin, int glbMax, const IntSet &lubD, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card) |
Initialize variable with given bounds and cardinality. | |
GECODE_CPLTSET_EXPORT | CpltSetVar (Space *home, const IntSet &glbD, const IntSet &lubD, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card) |
Initialize variable with given bounds and cardinality. | |
void | init (Space *home, const IntSet &glbD, const IntSet &lubD, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card) |
Initialize variable with given bounds and cardinality. | |
Related Functions | |
(Note that these are not member functions.) | |
GECODE_CPLTSET_EXPORT std::ostream & | operator<< (std::ostream &, const Gecode::CpltSetVar &x) |
Print bdd variable x. |
Constructor & Destructor Documentation
Gecode::CpltSetVar::CpltSetVar | ( | void | ) | [inline] |
Gecode::CpltSetVar::CpltSetVar | ( | Space * | home, | |
int | glbMin, | |||
int | glbMax, | |||
int | lubMin, | |||
int | lubMax, | |||
unsigned int | cardMin = 0 , |
|||
unsigned int | cardMax = Set::Limits::card | |||
) |
Initialize variable with given bounds and cardinality.
The variable is created with greatest lower bound , least upper bound , and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:
- If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
- If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.
Definition at line 42 of file cpltset.cc.
Gecode::CpltSetVar::CpltSetVar | ( | Space * | home, | |
const IntSet & | glbD, | |||
int | lubMin, | |||
int | lubMax, | |||
unsigned int | cardMin = 0 , |
|||
unsigned int | cardMax = Set::Limits::card | |||
) |
Initialize variable with given bounds and cardinality.
The variable is created with greatest lower bound glbD, least upper bound , and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:
- If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
- If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.
Definition at line 58 of file cpltset.cc.
Gecode::CpltSetVar::CpltSetVar | ( | Space * | home, | |
int | glbMin, | |||
int | glbMax, | |||
const IntSet & | lubD, | |||
unsigned int | cardMin = 0 , |
|||
unsigned int | cardMax = Set::Limits::card | |||
) |
Initialize variable with given bounds and cardinality.
The variable is created with greatest lower bound , least upper bound lubD, and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:
- If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
- If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.
Definition at line 73 of file cpltset.cc.
Gecode::CpltSetVar::CpltSetVar | ( | Space * | home, | |
const IntSet & | glbD, | |||
const IntSet & | lubD, | |||
unsigned int | cardMin = 0 , |
|||
unsigned int | cardMax = Set::Limits::card | |||
) |
Initialize variable with given bounds and cardinality.
The variable is created with greatest lower bound glbD, least upper bound lubD, and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:
- If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
- If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.
Definition at line 86 of file cpltset.cc.
Member Function Documentation
void Gecode::CpltSetVar::dispose | ( | Space * | home | ) | [inline] |
void Gecode::CpltSetVar::init | ( | Space * | home, | |
int | glbMin, | |||
int | glbMax, | |||
int | lubMin, | |||
int | lubMax, | |||
unsigned int | cardMin = 0 , |
|||
unsigned int | cardMax = Set::Limits::card | |||
) | [inline] |
Initialize variable with given bounds and cardinality.
The variable is created with greatest lower bound , least upper bound , and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:
- If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
- If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.
Definition at line 45 of file cpltset.icc.
void Gecode::CpltSetVar::init | ( | Space * | home, | |
const IntSet & | glbD, | |||
int | lubMin, | |||
int | lubMax, | |||
unsigned int | cardMin = 0 , |
|||
unsigned int | cardMax = Set::Limits::card | |||
) | [inline] |
Initialize variable with given bounds and cardinality.
The variable is created with greatest lower bound glbD, least upper bound , and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:
- If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
- If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.
Definition at line 65 of file cpltset.icc.
void Gecode::CpltSetVar::init | ( | Space * | home, | |
int | glbMin, | |||
int | glbMax, | |||
const IntSet & | lubD, | |||
unsigned int | cardMin = 0 , |
|||
unsigned int | cardMax = Set::Limits::card | |||
) | [inline] |
Initialize variable with given bounds and cardinality.
The variable is created with greatest lower bound , least upper bound lubD, and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:
- If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
- If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.
Definition at line 56 of file cpltset.icc.
void Gecode::CpltSetVar::init | ( | Space * | home, | |
const IntSet & | glbD, | |||
const IntSet & | lubD, | |||
unsigned int | cardMin = 0 , |
|||
unsigned int | cardMax = Set::Limits::card | |||
) | [inline] |
Initialize variable with given bounds and cardinality.
The variable is created with greatest lower bound glbD, least upper bound lubD, and cardinality minimum cardMin and maximum cardMax. The following exceptions might be thrown:
- If the bounds are no legal set bounds (between Set::Limits::min and Set::Limits::max), an exception of type Gecode::Set::VariableOutOfRangeDomain is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::VariableOutOfRangeCardinality is thrown.
- If minCard > maxCard, an exception of type Gecode::Set::VariableFailedDomain is thrown.
Definition at line 74 of file cpltset.icc.
unsigned int Gecode::CpltSetVar::glbSize | ( | void | ) | const [inline] |
unsigned int Gecode::CpltSetVar::lubSize | ( | void | ) | const [inline] |
unsigned int Gecode::CpltSetVar::unknownSize | ( | void | ) | const [inline] |
unsigned int Gecode::CpltSetVar::cardMin | ( | void | ) | const [inline] |
unsigned int Gecode::CpltSetVar::cardMax | ( | void | ) | const [inline] |
int Gecode::CpltSetVar::lubMin | ( | void | ) | const [inline] |
int Gecode::CpltSetVar::lubMax | ( | void | ) | const [inline] |
int Gecode::CpltSetVar::glbMin | ( | void | ) | const [inline] |
int Gecode::CpltSetVar::glbMax | ( | void | ) | const [inline] |
bool Gecode::CpltSetVar::contains | ( | int | i | ) | const [inline] |
bool Gecode::CpltSetVar::notContains | ( | int | i | ) | const [inline] |
bool Gecode::CpltSetVar::assigned | ( | void | ) | const [inline] |
void Gecode::CpltSetVar::update | ( | Space * | home, | |
bool | share, | |||
CpltSetVar & | x | |||
) | [inline] |
Friends And Related Function Documentation
GECODE_CPLTSET_EXPORT std::ostream & operator<< | ( | std::ostream & | , | |
const Gecode::CpltSetVar & | x | |||
) | [related] |
The documentation for this class was generated from the following files:
- gecode/cpltset.hh (Revision: 7494)
- gecode/cpltset/var/cpltset.cc (Revision: 6038)
- gecode/cpltset/var/cpltset.icc (Revision: 6274)