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