46 namespace Gecode {
namespace Set {
88 namespace Gecode {
namespace Set {
141 int minN(
unsigned int n)
const;
143 unsigned int size(
void)
const;
145 unsigned int card(
void)
const;
147 void card(
unsigned int c);
152 bool empty(
void)
const;
155 bool in(
int i)
const;
330 void init(
const T&
x);
348 unsigned int width(
void)
const;
372 void init(
const T&
x);
390 unsigned int width(
void)
const;
418 void init(
const T&
x);
427 namespace Gecode {
namespace Set {
496 unsigned int cardMin(
void)
const;
499 unsigned int cardMax(
void)
const;
511 unsigned int glbSize(
void)
const;
513 unsigned int lubSize(
void)
const;
529 template<
class I>
ModEvent includeI_full(
Space& home,
int mi,
int ma, I&
i);
532 template<
class I>
ModEvent excludeI_full(
Space& home,
int mi,
int ma, I&
i);
534 template<
class I>
ModEvent intersectI_full(
Space& home,
int mi,
int ma, I&
i);
static bool lubAny(const Delta &d)
Test whether arbitrary values got pruned from lub.
int lubMax(void) const
Return maximum of the least upper bound.
bool excludeI(Space &home, I &i)
Exclude all elements in the set represented by i from this set.
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.
BndSetRanges(void)
Default constructor.
int min(void) const
Return smallest value of range.
ModEvent exclude(Space &home, int n)
Exclude n from the least upper bound.
Range iterator for the unknown set.
const int min
Smallest allowed integer in integer set.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc.
SetVarImp * copy(Space &home, bool share)
Return copy of this variable.
int max(void) const
Return largest value of range.
SetVarImp(Space &home, bool share, SetVarImp &x)
Constructor for cloning x.
RangeList * lst(void) const
Return last range.
bool operator()(void) const
Test whether iterator is still at a range or done.
int max(void) const
Return greatest element.
bool assigned(void) const
Test whether variable is assigned.
ModEvent excludeI(Space &home, I &i)
Exclude set described by i from the least upper bound.
bool knownOut(int) const
Test whether n is not contained in least upper bound.
Range iterator for range lists
Shrinking sets of integers.
RangesCompl(void)
Default constructor.
int ModEvent
Type for modification events.
static void schedule(Space &home, Propagator &p, ModEvent me, bool force=false)
Schedule propagator p with modification event me.
Base-class for propagators.
I i
Iterator to compute complement for.
Range iterator for the greatest lower bound.
int minN(unsigned int n) const
Return n -th smallest element.
Finite integer set variable implementation.
static const int MIN_OF_EMPTY
Returned by empty sets when asked for their minimum element.
bool in(int i) const
Test whether i is an element of this set.
Range iterator for computing the complement (described by template arguments)
RangeList * ranges(void) const
Return range list for iteration.
const unsigned int card
Maximum cardinality of an integer set.
ModEvent intersect(Space &home, int n)
Exclude everything but n from the least upper bound.
const int max
Largest allowed integer in integer set.
int lubMinN(unsigned int n) const
Return n -th smallest element in the least upper bound.
RangeList * fst(void) const
Return first range.
Range iterator for the least upper bound.
static const int MAX_OF_EMPTY
Returned by empty sets when asked for their maximum element.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
int glbMax(void) const
Return glb maximum.
Gecode::IntArgs i(4, 1, 2, 3, 4)
void init(const T &x)
Initialize with unknown set ranges for set variable x.
int n
Number of negative literals for node type.
unsigned int size(void) const
Return size.
void become(Space &home, const BndSet &s)
Make this set equal to s.
static bool glbAny(const Delta &d)
Test whether arbitrary values got pruned from glb.
unsigned int cardMax(void) const
Return current cardinality maximum.
ModEvent includeI(Space &home, I &i)
Include set described by i in the greatest lower bound.
int PropCond
Type for propagation conditions.
void init(Space &home)
Initialize as the empty set.
bool intersectI(Space &home, I &i)
Exclude all elements not in the set represented by i from this set.
UnknownRanges(void)
Default constructor.
A complement iterator spezialized for the BndSet limits.
int min(void) const
Return smallest value of range.
void operator++(void)
Move iterator to next range (if possible)
Range iterator for integer sets.
void operator++(void)
Move iterator to next range (if possible)
void init(const BndSet &s)
Initialize with BndSet s.
unsigned int glbSize(void) const
Return the size of the greatest lower bound.
unsigned int _size
The size of this set.
void init(I &i)
Initialize with iterator i.
bool isConsistent(void) const
Check whether internal invariants hold.
unsigned int _card
The cardinality this set represents.
bool glbAny(void) const
Test whether delta represents any domain change in glb.
GLBndSet(void)
Default constructor. Creates an empty set.
LUBndSet(void)
Default constructor. Creates an empty set.
void update(Space &home, BndSet &x)
Update this set to be a clone of set x.
void init(Space &home)
Initialize as the full set including everything between Limits::min and Limits::max.
ModEvent include(Space &home, int n)
Include n in the greatest lower bound.
bool exclude(Space &home, int i, int j, SetDelta &d)
Exclude the set from this set.
bool includeI(Space &home, I &i)
Include the set represented by i in this set.
int glbMin(void) const
Return glb minimum.
int lubMin(void) const
Return minimum of the least upper bound.
void dispose(Space &home)
Free memory used by this set.
struct Gecode::@511::NNF::@54::@56 a
For atomic nodes.
Base-class for Set-variable implementations.
int lubMin(void) const
Return lub minimum.
Set view for set variables
ModEvent intersectI(Space &home, I &i)
Exclude everything but set described by i from the least upper bound.
bool intersect(Space &home, int i, int j)
Intersect this set with the set .
Node * x
Pointer to corresponding Boolean expression node.
unsigned int lubSize(void) const
Return the size of the least upper bound.
Generic domain change information to be supplied to advisors.
int glbMin(void) const
Return minimum of the greatest lower bound.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
GlbRanges(void)
Default constructor.
void init(const T &x)
Initialize with least upper bound ranges for set variable x.
int glbMax(void) const
Return maximum of the greatest lower bound.
Growing sets of integers.
int lubMax(void) const
Return lub maximum.
bool knownIn(int n) const
Test whether n is contained in greatest lower bound.
bool lubAny(void) const
Test whether delta represents any domain change in lub.
bool empty(void) const
Test whether this set is empty.
Lists of ranges (intervals)
int max(void) const
Return largest value of range.
Gecode toplevel namespace
bool overwrite(Space &home, I &i)
Overwrite the ranges with those represented by i.
Range iterator for computing set difference.
LubRanges(void)
Default constructor.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
BndSet(void)
Default constructor. Creates an empty set.
bool operator()(void) const
Test whether iterator is still at a range or done.
unsigned int card(void) const
Return cardinality.
SetDelta(void)
Create set delta as providing no information (if any is true)
#define GECODE_SET_EXPORT
int min(void) const
Return smallest element.
void init(const T &x)
Initialize with greatest lower bound ranges for set variable x.
bool include(Space &home, int i, int j, SetDelta &d)
Include the set in this set.
void excludeAll(Space &home)
Exclude all elements from this set.
Finite set delta information for advisors.