Gecode::SetVar Class Reference
[Set variables]
Set variables More...
#include <set.hh>
Related Functions | |
(Note that these are not member functions.) | |
template<class Char , class Traits > | |
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, const SetVar &x) |
Print set variable x. | |
Constructors and initialization | |
| |
SetVar (void) | |
Default constructor. | |
SetVar (const SetVar &y) | |
Initialize from set variable y. | |
SetVar (const Set::SetView &y) | |
Initialize from set view y. | |
SetVar (Space &home) | |
Initialize variable with empty greatest lower and full least upper bound. | |
SetVar (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. | |
SetVar (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. | |
SetVar (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. | |
SetVar (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. | |
Value access | |
| |
unsigned int | glbSize (void) const |
Return number of elements in the greatest lower bound. | |
unsigned int | lubSize (void) const |
Return number of elements in the least upper bound. | |
unsigned int | unknownSize (void) const |
Return number of unknown elements (elements in lub but not in glb). | |
unsigned int | cardMin (void) const |
Return cardinality minimum. | |
unsigned int | cardMax (void) const |
Return cardinality maximum. | |
int | lubMin (void) const |
Return minimum element of least upper bound. | |
int | lubMax (void) const |
Return maximum element of least upper bound. | |
int | glbMin (void) const |
Return minimum element of greatest lower bound. | |
int | glbMax (void) const |
Return maximum of 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. |
Detailed Description
Set variables
Definition at line 129 of file set.hh.
Constructor & Destructor Documentation
Gecode::SetVar::SetVar | ( | void | ) | [inline] |
Gecode::SetVar::SetVar | ( | const SetVar & | y | ) | [inline] |
Gecode::SetVar::SetVar | ( | const Set::SetView & | y | ) | [inline] |
Gecode::SetVar::SetVar | ( | Space & | home | ) |
Gecode::SetVar::SetVar | ( | 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::OutOfLimits is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::OutOfLimits is thrown.
- If cardMin > cardMax, an exception of type Gecode::Set::VariableEmptyDomain is thrown.
Gecode::SetVar::SetVar | ( | 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::OutOfLimits is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::OutOfLimits is thrown.
- If cardMin > cardMax, an exception of type Gecode::Set::VariableEmptyDomain is thrown.
Gecode::SetVar::SetVar | ( | 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::OutOfLimits is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::OutOfLimits is thrown.
- If minCard > maxCard, an exception of type Gecode::Set::VariableEmptyDomain is thrown.
Gecode::SetVar::SetVar | ( | 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::OutOfLimits is thrown.
- If the cardinality is greater than Set::Limits::max_set_size, an exception of type Gecode::Set::OutOfLimits is thrown.
- If minCard > maxCard, an exception of type Gecode::Set::VariableEmptyDomain is thrown.
Member Function Documentation
unsigned int Gecode::SetVar::glbSize | ( | void | ) | const [inline] |
unsigned int Gecode::SetVar::lubSize | ( | void | ) | const [inline] |
unsigned int Gecode::SetVar::unknownSize | ( | void | ) | const [inline] |
unsigned int Gecode::SetVar::cardMin | ( | void | ) | const [inline] |
unsigned int Gecode::SetVar::cardMax | ( | void | ) | const [inline] |
int Gecode::SetVar::lubMin | ( | void | ) | const [inline] |
int Gecode::SetVar::lubMax | ( | void | ) | const [inline] |
int Gecode::SetVar::glbMin | ( | void | ) | const [inline] |
int Gecode::SetVar::glbMax | ( | void | ) | const [inline] |
bool Gecode::SetVar::contains | ( | int | i | ) | const [inline] |
bool Gecode::SetVar::notContains | ( | int | i | ) | const [inline] |
Friends And Related Function Documentation
std::basic_ostream< Char, Traits > & operator<< | ( | std::basic_ostream< Char, Traits > & | os, | |
const SetVar & | x | |||
) | [related] |
The documentation for this class was generated from the following files:
- gecode/set.hh (Revision: 12346)
- gecode/set/var/set.cpp (Revision: 11366)
- gecode/set/var/set.hpp (Revision: 11366)