Finite integer set variable implementation. More...
#include <var-imp.hpp>
Protected Member Functions | |
SetVarImp (Space &home, bool share, SetVarImp &x) | |
Constructor for cloning x. | |
Constructors and initialization | |
SetVarImp (Space &home) | |
Initialize with empty lower and full upper bound. | |
SetVarImp (Space &home, int glbMin, int glbMax, int lubMin, int lubMax, unsigned int cardMin=0, unsigned int cardMax=Limits::card) | |
Initialize with given bounds and cardinality. | |
SetVarImp (Space &home, const IntSet &glbD, int lubMin, int lubMax, unsigned int cardMin, unsigned int cardMax) | |
Initialize with given bounds and cardinality. | |
SetVarImp (Space &home, int glbMin, int glbMax, const IntSet &lubD, unsigned int cardMin, unsigned int cardMax) | |
Initialize with given bounds and cardinality. | |
SetVarImp (Space &home, const IntSet &glbD, const IntSet &lubD, unsigned int cardMin, unsigned int cardMax) | |
Initialize with given bounds and cardinality. | |
Value access | |
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 | lubMinN (unsigned int n) const |
Return n -th smallest element in 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. | |
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. | |
Domain tests | |
bool | assigned (void) const |
Test whether variable is assigned. | |
bool | knownIn (int n) const |
Test whether n is contained in greatest lower bound. | |
bool | knownOut (int) const |
Test whether n is not contained in least upper bound. | |
Domain update by value | |
ModEvent | include (Space &home, int n) |
Include n in the greatest lower bound. | |
ModEvent | include (Space &home, int i, int j) |
Include the range ![]() | |
ModEvent | exclude (Space &home, int n) |
Exclude n from the least upper bound. | |
ModEvent | exclude (Space &home, int i, int j) |
Exclude the range ![]() | |
ModEvent | intersect (Space &home, int n) |
Exclude everything but n from the least upper bound. | |
ModEvent | intersect (Space &home, int i, int j) |
Exclude everything but the range ![]() | |
ModEvent | cardMin (Space &home, unsigned int n) |
Restrict cardinality to be at least n. | |
ModEvent | cardMax (Space &home, unsigned int n) |
Restrict cardinality to be at most n. | |
Domain update by range iterator | |
template<class I > | |
ModEvent | includeI (Space &home, I &i) |
Include set described by i in the greatest lower bound. | |
template<class I > | |
ModEvent | excludeI (Space &home, I &i) |
Exclude set described by i from the least upper bound. | |
template<class I > | |
ModEvent | intersectI (Space &home, I &i) |
Exclude everything but set described by i from the least upper bound. | |
Dependencies | |
void | subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=true) |
Subscribe propagator p with propagation condition pc to variable. | |
void | cancel (Space &home, Propagator &p, PropCond pc) |
Cancel subscription of propagator p with propagation condition pc. | |
void | subscribe (Space &home, Advisor &a) |
Subscribe advisor a to variable. | |
void | cancel (Space &home, Advisor &a) |
Cancel subscription of advisor a. | |
Cloning | |
SetVarImp * | copy (Space &home, bool share) |
Return copy of this variable. | |
Delta information for advisors | |
static int | glbMin (const Delta &d) |
Return minimum value just pruned from glb. | |
static int | glbMax (const Delta &d) |
Return maximum value just pruned from glb. | |
static bool | glbAny (const Delta &d) |
Test whether arbitrary values got pruned from glb. | |
static int | lubMin (const Delta &d) |
Return minimum value just pruned from lub. | |
static int | lubMax (const Delta &d) |
Return maximum value just pruned from lub. | |
static bool | lubAny (const Delta &d) |
Test whether arbitrary values got pruned from lub. |
Finite integer set variable implementation.
Definition at line 434 of file var-imp.hpp.
Gecode::Set::SetVarImp::SetVarImp | ( | Space & | home, |
bool | share, | ||
SetVarImp & | x | ||
) | [inline, protected] |
Gecode::Set::SetVarImp::SetVarImp | ( | Space & | home | ) | [inline] |
Gecode::Set::SetVarImp::SetVarImp | ( | Space & | home, |
int | glbMin, | ||
int | glbMax, | ||
int | lubMin, | ||
int | lubMax, | ||
unsigned int | cardMin = 0 , |
||
unsigned int | cardMax = Limits::card |
||
) | [inline] |
Gecode::Set::SetVarImp::SetVarImp | ( | Space & | home, |
const IntSet & | glbD, | ||
int | lubMin, | ||
int | lubMax, | ||
unsigned int | cardMin, | ||
unsigned int | cardMax | ||
) | [inline] |
Gecode::Set::SetVarImp::SetVarImp | ( | Space & | home, |
int | glbMin, | ||
int | glbMax, | ||
const IntSet & | lubD, | ||
unsigned int | cardMin, | ||
unsigned int | cardMax | ||
) | [inline] |
Gecode::Set::SetVarImp::SetVarImp | ( | Space & | home, |
const IntSet & | glbD, | ||
const IntSet & | lubD, | ||
unsigned int | cardMin, | ||
unsigned int | cardMax | ||
) | [inline] |
unsigned int Gecode::Set::SetVarImp::cardMin | ( | void | ) | const [inline] |
unsigned int Gecode::Set::SetVarImp::cardMax | ( | void | ) | const [inline] |
int Gecode::Set::SetVarImp::lubMin | ( | void | ) | const [inline] |
int Gecode::Set::SetVarImp::lubMax | ( | void | ) | const [inline] |
int Gecode::Set::SetVarImp::lubMinN | ( | unsigned int | n | ) | const [inline] |
int Gecode::Set::SetVarImp::glbMin | ( | void | ) | const [inline] |
int Gecode::Set::SetVarImp::glbMax | ( | void | ) | const [inline] |
unsigned int Gecode::Set::SetVarImp::glbSize | ( | void | ) | const [inline] |
unsigned int Gecode::Set::SetVarImp::lubSize | ( | void | ) | const [inline] |
bool Gecode::Set::SetVarImp::assigned | ( | void | ) | const [inline] |
bool Gecode::Set::SetVarImp::knownIn | ( | int | n | ) | const [inline] |
bool Gecode::Set::SetVarImp::knownOut | ( | int | i | ) | const [inline] |
ModEvent Gecode::Set::SetVarImp::include | ( | Space & | home, |
int | n | ||
) | [inline] |
ModEvent Gecode::Set::SetVarImp::include | ( | Space & | home, |
int | i, | ||
int | j | ||
) | [inline] |
ModEvent Gecode::Set::SetVarImp::exclude | ( | Space & | home, |
int | n | ||
) | [inline] |
ModEvent Gecode::Set::SetVarImp::exclude | ( | Space & | home, |
int | i, | ||
int | j | ||
) | [inline] |
ModEvent Gecode::Set::SetVarImp::intersect | ( | Space & | home, |
int | n | ||
) | [inline] |
ModEvent Gecode::Set::SetVarImp::intersect | ( | Space & | home, |
int | i, | ||
int | j | ||
) | [inline] |
ModEvent Gecode::Set::SetVarImp::cardMin | ( | Space & | home, |
unsigned int | n | ||
) | [inline] |
ModEvent Gecode::Set::SetVarImp::cardMax | ( | Space & | home, |
unsigned int | n | ||
) | [inline] |
ModEvent Gecode::Set::SetVarImp::includeI | ( | Space & | home, |
I & | i | ||
) | [inline] |
ModEvent Gecode::Set::SetVarImp::excludeI | ( | Space & | home, |
I & | i | ||
) | [inline] |
ModEvent Gecode::Set::SetVarImp::intersectI | ( | Space & | home, |
I & | i | ||
) | [inline] |
void Gecode::Set::SetVarImp::subscribe | ( | Space & | home, |
Propagator & | p, | ||
PropCond | pc, | ||
bool | schedule = true |
||
) | [inline] |
void Gecode::Set::SetVarImp::cancel | ( | Space & | home, |
Propagator & | p, | ||
PropCond | pc | ||
) | [inline] |
void Gecode::Set::SetVarImp::subscribe | ( | Space & | home, |
Advisor & | a | ||
) | [inline] |
void Gecode::Set::SetVarImp::cancel | ( | Space & | home, |
Advisor & | a | ||
) | [inline] |
SetVarImp * Gecode::Set::SetVarImp::copy | ( | Space & | home, |
bool | share | ||
) | [inline] |
int Gecode::Set::SetVarImp::glbMin | ( | const Delta & | d | ) | [inline, static] |
int Gecode::Set::SetVarImp::glbMax | ( | const Delta & | d | ) | [inline, static] |
bool Gecode::Set::SetVarImp::glbAny | ( | const Delta & | d | ) | [inline, static] |
int Gecode::Set::SetVarImp::lubMin | ( | const Delta & | d | ) | [inline, static] |
int Gecode::Set::SetVarImp::lubMax | ( | const Delta & | d | ) | [inline, static] |
bool Gecode::Set::SetVarImp::lubAny | ( | const Delta & | d | ) | [inline, static] |