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);
bool in(int i) const
Test whether i is an element of this set.
static bool lubAny(const Delta &d)
Test whether arbitrary values got pruned from lub.
bool excludeI(Space &home, I &i)
Exclude all elements in the set represented by i from this set.
RangeList * lst(void) const
Return last range.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
BndSetRanges(void)
Default constructor.
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.
bool isConsistent(void) const
Check whether internal invariants hold.
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 glbMin(void) const
Return minimum of the greatest lower bound.
bool operator()(void) const
Test whether iterator is still at a range or done.
SetVarImp(Space &home, bool share, SetVarImp &x)
Constructor for cloning x.
int max(void) const
Return largest value of range.
int lubMinN(unsigned int n) const
Return n -th smallest element in the least upper bound.
ModEvent excludeI(Space &home, I &i)
Exclude set described by i from the 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 min(void) const
Return smallest value of range.
Finite integer set variable implementation.
unsigned int card(void) const
Return cardinality.
static const int MIN_OF_EMPTY
Returned by empty sets when asked for their minimum element.
Range iterator for computing the complement (described by template arguments)
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.
Range iterator for the least upper bound.
int glbMax(void) const
Return maximum of the greatest lower bound.
int minN(unsigned int n) const
Return n -th smallest element.
bool glbAny(void) const
Test whether delta represents any domain change in glb.
int min(void) const
Return smallest value of range.
static const int MAX_OF_EMPTY
Returned by empty sets when asked for their maximum element.
Gecode::FloatVal c(-8, 8)
unsigned int size(void) const
Return size.
int lubMax(void) const
Return maximum of the least upper bound.
int max(void) const
Return largest value of range.
int p
Number of positive literals for node type.
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 cardMax(void) const
Return current cardinality maximum.
void become(Space &home, const BndSet &s)
Make this set equal to s.
bool empty(void) const
Test whether this set is empty.
static bool glbAny(const Delta &d)
Test whether arbitrary values got pruned from glb.
unsigned int cardMin(void) const
Return current cardinality minimum.
bool operator()(void) const
Test whether iterator is still at a range or done.
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.
int glbMax(void) const
Return glb maximum.
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 glbMin(void) const
Return glb minimum.
void operator++(void)
Move iterator to next range (if possible)
RangeList * fst(void) const
Return first range.
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 _size
The size of this set.
void init(I &i)
Initialize with iterator i.
unsigned int _card
The cardinality this set represents.
RangeList * ranges(void) const
Return range list for iteration.
bool knownOut(int) const
Test whether n is not contained in least upper bound.
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.
bool knownIn(int n) const
Test whether n is contained in greatest lower bound.
void dispose(Space &home)
Free memory used by this set.
Base-class for Set-variable implementations.
Set view for set variables
ModEvent intersectI(Space &home, I &i)
Exclude everything but set described by i from the least upper bound.
int lubMin(void) const
Return lub minimum.
bool intersect(Space &home, int i, int j)
Intersect this set with the set .
Node * x
Pointer to corresponding Boolean expression node.
Generic domain change information to be supplied to advisors.
unsigned int lubSize(void) const
Return the size of the least upper bound.
GlbRanges(void)
Default constructor.
int min(void) const
Return smallest element.
int lubMax(void) const
Return lub maximum.
void init(const T &x)
Initialize with least upper bound ranges for set variable x.
int lubMin(void) const
Return minimum of the least upper bound.
Growing sets of integers.
unsigned int glbSize(void) const
Return the size of the greatest lower bound.
Lists of ranges (intervals)
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.
BndSet(void)
Default constructor. Creates an empty set.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
bool assigned(void) const
Test whether variable is assigned.
SetDelta(void)
Create set delta as providing no information (if any is true)
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
int max(void) const
Return greatest element.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
#define GECODE_SET_EXPORT
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.
bool lubAny(void) const
Test whether delta represents any domain change in lub.
void excludeAll(Space &home)
Exclude all elements from this set.
Finite set delta information for advisors.