Set variables
More...
#include <set.hh>
|
(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. More...
|
|
|
| SetVar (void) |
| Default constructor. More...
|
|
| SetVar (const SetVar &y) |
| Initialize from set variable y. More...
|
|
| SetVar (const Set::SetView &y) |
| Initialize from set view y. More...
|
|
| SetVar (Space &home) |
| Initialize variable with empty greatest lower and full least upper bound. More...
|
|
| 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. More...
|
|
| 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. More...
|
|
| 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. More...
|
|
| 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. More...
|
|
|
unsigned int | glbSize (void) const |
| Return number of elements in the greatest lower bound. More...
|
|
unsigned int | lubSize (void) const |
| Return number of elements in the least upper bound. More...
|
|
unsigned int | unknownSize (void) const |
| Return number of unknown elements (elements in lub but not in glb) More...
|
|
unsigned int | cardMin (void) const |
| Return cardinality minimum. More...
|
|
unsigned int | cardMax (void) const |
| Return cardinality maximum. More...
|
|
int | lubMin (void) const |
| Return minimum element of least upper bound. More...
|
|
int | lubMax (void) const |
| Return maximum element of least upper bound. More...
|
|
int | glbMin (void) const |
| Return minimum element of greatest lower bound. More...
|
|
int | glbMax (void) const |
| Return maximum of greatest lower bound. More...
|
|
Set variables
Definition at line 127 of file set.hh.
◆ SetVar() [1/8]
Gecode::SetVar::SetVar |
( |
void |
| ) |
|
|
inline |
Default constructor.
Definition at line 46 of file set.hpp.
◆ SetVar() [2/8]
Gecode::SetVar::SetVar |
( |
const SetVar & |
y | ) |
|
|
inline |
Initialize from set variable y.
Definition at line 49 of file set.hpp.
◆ SetVar() [3/8]
Initialize from set view y.
Definition at line 53 of file set.hpp.
◆ SetVar() [4/8]
Gecode::SetVar::SetVar |
( |
Space & |
home | ) |
|
Initialize variable with empty greatest lower and full least upper bound.
Definition at line 43 of file set.cpp.
◆ SetVar() [5/8]
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:
Definition at line 46 of file set.cpp.
◆ SetVar() [6/8]
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:
Definition at line 61 of file set.cpp.
◆ SetVar() [7/8]
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:
Definition at line 74 of file set.cpp.
◆ SetVar() [8/8]
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:
Definition at line 89 of file set.cpp.
◆ glbSize()
unsigned int Gecode::SetVar::glbSize |
( |
void |
| ) |
const |
|
inline |
Return number of elements in the greatest lower bound.
Definition at line 63 of file set.hpp.
◆ lubSize()
unsigned int Gecode::SetVar::lubSize |
( |
void |
| ) |
const |
|
inline |
Return number of elements in the least upper bound.
Definition at line 66 of file set.hpp.
◆ unknownSize()
unsigned int Gecode::SetVar::unknownSize |
( |
void |
| ) |
const |
|
inline |
Return number of unknown elements (elements in lub but not in glb)
Definition at line 69 of file set.hpp.
◆ cardMin()
unsigned int Gecode::SetVar::cardMin |
( |
void |
| ) |
const |
|
inline |
Return cardinality minimum.
Definition at line 78 of file set.hpp.
◆ cardMax()
unsigned int Gecode::SetVar::cardMax |
( |
void |
| ) |
const |
|
inline |
Return cardinality maximum.
Definition at line 81 of file set.hpp.
◆ lubMin()
int Gecode::SetVar::lubMin |
( |
void |
| ) |
const |
|
inline |
Return minimum element of least upper bound.
Definition at line 84 of file set.hpp.
◆ lubMax()
int Gecode::SetVar::lubMax |
( |
void |
| ) |
const |
|
inline |
Return maximum element of least upper bound.
Definition at line 87 of file set.hpp.
◆ glbMin()
int Gecode::SetVar::glbMin |
( |
void |
| ) |
const |
|
inline |
Return minimum element of greatest lower bound.
Definition at line 90 of file set.hpp.
◆ glbMax()
int Gecode::SetVar::glbMax |
( |
void |
| ) |
const |
|
inline |
Return maximum of greatest lower bound.
Definition at line 93 of file set.hpp.
◆ contains()
bool Gecode::SetVar::contains |
( |
int |
i | ) |
const |
|
inline |
Test whether i is in greatest lower bound.
Definition at line 72 of file set.hpp.
◆ notContains()
bool Gecode::SetVar::notContains |
( |
int |
i | ) |
const |
|
inline |
Test whether i is not in the least upper bound.
Definition at line 75 of file set.hpp.
◆ operator<<()
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< |
( |
std::basic_ostream< Char, Traits > & |
os, |
|
|
const SetVar & |
x |
|
) |
| |
|
related |
Print set variable x.
Definition at line 38 of file print.hpp.
The documentation for this class was generated from the following files: