42namespace Gecode {
namespace Set {
84namespace Gecode {
namespace Set {
137 int minN(
unsigned int n)
const;
139 unsigned int size(
void)
const;
141 unsigned int card(
void)
const;
143 void card(
unsigned int c);
149 bool empty(
void)
const;
151 bool in(
int i)
const;
423namespace Gecode {
namespace Set {
493 unsigned int cardMin(
void)
const;
495 unsigned int cardMax(
void)
const;
507 unsigned int glbSize(
void)
const;
509 unsigned int lubSize(
void)
const;
526 template<
class I>
ModEvent includeI_full(
Space& home,
int mi,
int ma, I& i);
528 template<
class I>
ModEvent excludeI_full(
Space& home,
int mi,
int ma, I& i);
530 template<
class I>
ModEvent intersectI_full(
Space& home,
int mi,
int ma, I& i);
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Generic domain change information to be supplied to advisors.
Range iterator for computing the complement (described by template arguments)
Range iterator for computing set difference.
Range iterator for range lists
Base-class for propagators.
Lists of ranges (intervals)
Range iterator for integer sets.
BndSetRanges(void)
Default constructor.
void init(const BndSet &s)
Initialize with BndSet s.
int min(void) const
Return smallest element.
bool isConsistent(void) const
Check whether internal invariants hold.
int minN(unsigned int n) const
Return n -th smallest element.
bool overwrite(Space &home, I &i)
Overwrite the ranges with those represented by i.
static const int MAX_OF_EMPTY
Returned by empty sets when asked for their maximum element.
RangeList * lst(void) const
Return last range.
unsigned int size(void) const
Return size.
BndSet(void)
Default constructor. Creates an empty set.
void update(Space &home, BndSet &x)
Update this set to be a clone of set x.
unsigned int _card
The cardinality this set represents.
bool empty(void) const
Test whether this set is empty.
bool in(int i) const
Test whether i is an element of this set.
void become(Space &home, const BndSet &s)
Make this set equal to s.
static const int MIN_OF_EMPTY
Returned by empty sets when asked for their minimum element.
int max(void) const
Return greatest element.
unsigned int card(void) const
Return cardinality.
RangeList * ranges(void) const
Return range list for iteration.
void dispose(Space &home)
Free memory used by this set.
unsigned int _size
The size of this set.
RangeList * fst(void) const
Return first range.
Growing sets of integers.
GLBndSet(void)
Default constructor. Creates an empty set.
bool includeI(Space &home, I &i)
Include the set represented by i in this set.
void init(Space &home)
Initialize as the empty set.
bool include(Space &home, int i, int j, SetDelta &d)
Include the set in this set.
Range iterator for the greatest lower bound.
bool operator()(void) const
Test whether iterator is still at a range or done.
void init(const T &x)
Initialize with greatest lower bound ranges for set variable x.
int min(void) const
Return smallest value of range.
int max(void) const
Return largest value of range.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
void operator++(void)
Move iterator to next range (if possible)
GlbRanges(const T &x)
Initialize with greatest lower bound ranges for set variable x.
GlbRanges(void)
Default constructor.
Shrinking sets of integers.
void init(Space &home)
Initialize as the full set including everything between Limits::min and Limits::max.
bool intersectI(Space &home, I &i)
Exclude all elements not in the set represented by i from this set.
bool excludeI(Space &home, I &i)
Exclude all elements in the set represented by i from this set.
LUBndSet(void)
Default constructor. Creates an empty set.
bool intersect(Space &home, int i, int j)
Intersect this set with the set .
void excludeAll(Space &home)
Exclude all elements from this set.
bool exclude(Space &home, int i, int j, SetDelta &d)
Exclude the set from this set.
Range iterator for the least upper bound.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
LubRanges(void)
Default constructor.
void init(const T &x)
Initialize with least upper bound ranges for set variable x.
int max(void) const
Return largest value of range.
bool operator()(void) const
Test whether iterator is still at a range or done.
void operator++(void)
Move iterator to next range (if possible)
LubRanges(const T &x)
Initialize with least upper bound ranges for set variable x.
int min(void) const
Return smallest value of range.
A complement iterator spezialized for the BndSet limits.
void init(I &i)
Initialize with iterator i.
RangesCompl(void)
Default constructor.
Finite set delta information for advisors.
bool glbAny(void) const
Test whether delta represents any domain change in glb.
bool lubAny(void) const
Test whether delta represents any domain change in lub.
int lubMax(void) const
Return lub maximum.
int glbMin(void) const
Return glb minimum.
SetDelta(void)
Create set delta as providing no information (if any is true)
int lubMin(void) const
Return lub minimum.
int glbMax(void) const
Return glb maximum.
Base-class for Set-variable implementations.
static void schedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me)
Schedule propagator p.
Finite integer set variable implementation.
bool knownIn(int n) const
Test whether n is contained in greatest lower bound.
int glbMin(void) const
Return minimum of the greatest lower bound.
ModEvent intersect(Space &home, int n)
Exclude everything but n from the least upper bound.
int lubMinN(unsigned int n) const
Return n -th smallest element in the least upper bound.
static bool lubAny(const Delta &d)
Test whether arbitrary values got pruned from lub.
unsigned int cardMax(void) const
Return current cardinality maximum.
SetVarImp * copy(Space &home)
Return copy of this variable.
unsigned int lubSize(void) const
Return the size of the least upper bound.
int lubMin(void) const
Return minimum of the least upper bound.
bool assigned(void) const
Test whether variable is assigned.
int lubMax(void) const
Return maximum of the least upper bound.
int glbMax(void) const
Return maximum of the greatest lower bound.
ModEvent excludeI(Space &home, I &i)
Exclude set described by i from the least upper bound.
static bool glbAny(const Delta &d)
Test whether arbitrary values got pruned from glb.
bool knownOut(int) const
Test whether n is not contained in least upper bound.
ModEvent includeI(Space &home, I &i)
Include set described by i in the greatest lower bound.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
unsigned int glbSize(void) const
Return the size of the greatest lower bound.
ModEvent intersectI(Space &home, I &i)
Exclude everything but set described by i from the least upper bound.
ModEvent exclude(Space &home, int n)
Exclude n from the least upper bound.
ModEvent include(Space &home, int n)
Include n in the greatest lower bound.
unsigned int cardMin(void) const
Return current cardinality minimum.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
SetVarImp(Space &home, SetVarImp &x)
Constructor for cloning x.
Set view for set variables
Range iterator for the unknown set.
void init(const T &x)
Initialize with unknown set ranges for set variable x.
UnknownRanges(void)
Default constructor.
ModEvent fail(Space &home)
#define GECODE_SET_EXPORT
const int min
Smallest allowed integer in integer set.
const unsigned int card
Maximum cardinality of an integer set.
const int max
Largest allowed integer in integer set.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
int PropCond
Type for propagation conditions.
Post propagator for SetVar x
int ModEvent
Type for modification events.