40namespace Gecode {
namespace Set {
74 unsigned int cardMin(
void)
const;
76 unsigned int cardMax(
void)
const;
89 unsigned int glbSize(
void)
const;
91 unsigned int lubSize(
void)
const;
168 template<
class Char,
class Traits>
169 std::basic_ostream<Char,Traits>&
196 unsigned int domSize;
209 unsigned int cardMin(
void)
const;
211 unsigned int cardMax(
void)
const;
224 unsigned int glbSize(
void)
const;
226 unsigned int lubSize(
void)
const;
313 template<
class Char,
class Traits>
314 std::basic_ostream<Char,Traits>&
347 unsigned int cardMin(
void)
const;
349 unsigned int cardMax(
void)
const;
362 unsigned int glbSize(
void)
const;
364 unsigned int lubSize(
void)
const;
440 template<
class Char,
class Traits>
441 std::basic_ostream<Char,Traits>&
476 unsigned int cardMin(
void)
const;
478 unsigned int cardMax(
void)
const;
491 unsigned int glbSize(
void)
const;
493 unsigned int lubSize(
void)
const;
569 template<
class Char,
class Traits>
570 std::basic_ostream<Char,Traits>&
620 unsigned int cardMin(
void)
const;
622 unsigned int cardMax(
void)
const;
635 unsigned int glbSize(
void)
const;
637 unsigned int lubSize(
void)
const;
745 template<
class Char,
class Traits>
746 std::basic_ostream<Char,Traits>&
791 unsigned int cardMin(
void)
const;
793 unsigned int cardMax(
void)
const;
806 unsigned int glbSize(
void)
const;
808 unsigned int lubSize(
void)
const;
914 template<
class Char,
class Traits,
class View>
915 std::basic_ostream<Char,Traits>&
973 unsigned int cardMin(
void)
const;
975 unsigned int cardMax(
void)
const;
988 unsigned int glbSize(
void)
const;
990 unsigned int lubSize(
void)
const;
1115 template<
class Char,
class Traits,
class View>
1116 std::basic_ostream<Char,Traits>&
1125 template<
class View>
1128 template<
class View>
1136 template<
class View>
1153 template<
class View>
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.
Base-class for constant views.
Generic domain change information to be supplied to advisors.
Base-class for derived views.
static ModEvent modevent(const Delta &d)
Return modification event.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
FloatVal intersect(const FloatVal &x, const FloatVal &y)
Return intersection of x and y.
int med(void) const
Return median of domain (greatest element not greater than the median)
void initCache(Space &home, const IntSet &s)
Initialize cache to set s.
Integer view for integer variables.
Range iterator for computing set difference.
Base-class for propagators.
Range iterator for integer sets.
ModEvent exclude(Space &home, int i, int j)
Restrict least upper bound to not contain all elements between and including i and j.
ModEvent excludeI(Space &home, I &i)
Remove range sequence described by i from least upper bound.
int glbMax(void) const
Return maximum of the greatest lower bound.
ModEvent include(Space &home, int i, int j)
Update greatest lower bound to include all elements between and including i and j.
bool glbAny(const Delta &d) const
Test whether arbitrary values got pruned from glb.
bool glbModified(void) const
Check whether greatest lower bound cache differs from current domain.
bool lubAny(const Delta &d) const
Test whether arbitrary values got pruned from lub.
GLBndSet glbCache
The cached greatest lower bound.
unsigned int glbSize(void) const
Return the number of elements in the greatest lower bound.
LUBndSet lubCache
The cached least upper bound.
int lubMin(void) const
Return minimum of the least upper bound.
unsigned int cardMax(void) const
Return maximum cardinality.
int lubMinN(unsigned int n) const
Return n-th smallest element of the least upper bound.
bool contains(int i) const
Test whether i is in the greatest lower bound.
unsigned int cardMin(void) const
Return minimum cardinality.
ModEvent includeI(Space &home, I &i)
Include range sequence described by i in greatest lower bound.
void cacheLub(Space &home)
Update least upper bound cache to current domain.
void cacheGlb(Space &home)
Update greatest lower bound cache to current domain.
static ModEventDelta med(ModEvent)
Translate modification event me to modification event delta for view.
bool lubModified(void) const
Check whether least upper bound cache differs from current domain.
unsigned int unknownSize(void) const
Return the number of unknown elements.
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
unsigned int lubSize(void) const
Return the number of elements in the least upper bound.
bool notContains(int i) const
Test whether i is not in the least upper bound.
int lubMax(void) const
Return maximum of the least upper bound.
CachedView(const View &y)
Initialize with set view y.
int glbMin(void) const
Return minimum of the greatest lower bound.
void update(Space &home, CachedView< View > &y)
Update this view to be a clone of view y.
CachedView(void)
Default constructor.
bool glbAny(const Delta &d) const
Test whether arbitrary values got pruned from glb.
static ModEvent me_negateset(ModEvent me)
Negate the modification event me.
ModEvent include(Space &home, int i, int j)
Update greatest lower bound to include all elements between and including i and j.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
bool contains(int i) const
Test whether i is in the greatest lower bound.
unsigned int cardMax(void) const
Return maximum cardinality.
unsigned int lubSize(void) const
Return the number of elements 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.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
int lubMax(void) const
Return maximum of the least upper bound.
bool notContains(int i) const
Test whether i is not in the least upper bound.
int lubMin(void) const
Return minimum of the least upper bound.
ModEvent exclude(Space &home, int i, int j)
Restrict least upper bound to not contain all elements between and including i and j.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
ModEvent intersect(Space &home, int i, int j)
Update least upper bound to contain at most all elements between and including i and j.
static PropCond pc_negateset(PropCond pc)
Negate the propagation condition pc.
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
ComplementView(void)
Default constructor.
unsigned int glbSize(void) const
Return the number of elements in the greatest lower bound.
bool lubAny(const Delta &d) const
Test whether arbitrary values got pruned from lub.
unsigned int cardMin(void) const
Return minimum cardinality.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
ModEvent excludeI(Space &home, I &i)
Remove range sequence described by i from least upper bound.
ModEvent includeI(Space &home, I &i)
Include range sequence described by i in greatest lower bound.
int lubMinN(unsigned int n) const
Return n-th smallest element of the least upper bound.
static ModEventDelta med(ModEvent)
Translate modification event me to modification event delta for view.
unsigned int unknownSize(void) const
Return the number of unknown elements.
static ModEvent modevent(const Delta &d)
Return modification event.
bool notContains(int i) const
Test whether i is not in the least upper bound.
int lubMinN(unsigned int n) const
Return n-th smallest element of the least upper bound.
unsigned int lubSize(void) const
Return the number of elements in the least upper bound.
bool glbAny(const Delta &d) const
Test whether arbitrary values got pruned from glb.
unsigned int cardMin(void) const
Return minimum cardinality.
ModEvent intersect(Space &home, int i, int j)
Update least upper bound to contain at most all elements between and including i and j.
bool contains(int i) const
Test whether i is in the greatest lower bound.
bool operator<(const ConstSetView &y) const
Whether this view comes before view y (arbitray order)
ModEvent include(Space &home, int i, int j)
Update greatest lower bound to include all elements between and including i and j.
unsigned int glbSize(void) const
Return the number of elements in the greatest lower bound.
int lubMax(void) const
Return maximum of the least upper bound.
ModEvent includeI(Space &home, I &i)
Include range sequence described by i in greatest lower bound.
ModEvent exclude(Space &home, int i, int j)
Restrict least upper bound to not contain all elements between and including i and j.
int glbMax(void) const
Return maximum of the greatest lower bound.
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
unsigned int unknownSize(void) const
Return the number of unknown elements.
ModEvent excludeI(Space &home, I &i)
Remove range sequence described by i from least upper bound.
int lubMin(void) const
Return minimum of the least upper bound.
int glbMin(void) const
Return minimum of the greatest lower bound.
void update(Space &home, ConstSetView &y)
Update this view to be a clone of view y.
ConstSetView(void)
Default constructor.
bool lubAny(const Delta &d) const
Test whether arbitrary values got pruned from lub.
unsigned int cardMax(void) const
Return maximum cardinality.
Constant view for the empty set.
EmptyView(void)
Default constructor.
unsigned int cardMin(void) const
Return minimum cardinality.
ModEvent includeI(Space &home, I &i)
Include range sequence described by i in greatest lower bound.
bool contains(int i) const
Test whether i is in the greatest lower bound.
int lubMax(void) const
Return maximum of the least upper bound.
bool notContains(int i) const
Test whether i is not in the least upper bound.
bool glbAny(const Delta &d) const
Test whether arbitrary values got pruned from glb.
int lubMin(void) const
Return minimum of the least upper bound.
unsigned int glbSize(void) const
Return the number of elements in the greatest lower bound.
int glbMin(void) const
Return minimum of the greatest lower bound.
ModEvent include(Space &home, int i, int j)
Update greatest lower bound to include all elements between and including i and j.
int glbMax(void) const
Return maximum of the greatest lower bound.
ModEvent excludeI(Space &home, I &i)
Remove range sequence described by i from least upper bound.
bool lubAny(const Delta &d) const
Test whether arbitrary values got pruned from lub.
unsigned int cardMax(void) const
Return maximum cardinality.
ModEvent exclude(Space &home, int i, int j)
Restrict least upper bound to not contain all elements between and including i and j.
ModEvent intersect(Space &home, int i, int j)
Update least upper bound to contain at most all elements between and including i and j.
unsigned int lubSize(void) const
Return the number of elements in the least upper bound.
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
unsigned int unknownSize(void) const
Return the number of unknown elements.
int lubMinN(unsigned int n) const
Return n-th smallest element of the least upper bound.
Growing sets of integers.
Range iterator for difference of greatest lower bound and cache
GlbRanges< View > gr
Lower bound iterator.
GlbDiffRanges(const CachedView< View > &x)
Constructor.
BndSetRanges cr
Cached lower bound.
Range iterator for the greatest lower bound.
Shrinking sets of integers.
Range iterator for difference of least upper bound and cache
LubRanges< View > lr
Upper bound iterator.
BndSetRanges cr
Cached upper bound.
LubDiffRanges(const CachedView< View > &x)
Constructor.
Range iterator for the least upper bound.
Finite integer set variable implementation.
Set view for set variables
bool contains(int i) const
Test whether i is in the greatest lower bound.
bool lubAny(const Delta &d) const
Test whether arbitrary values got pruned from lub.
bool glbAny(const Delta &d) const
Test whether arbitrary values got pruned from glb.
unsigned int unknownSize(void) const
Return the number of unknown elements.
SetView(void)
Default constructor.
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
ModEvent include(Space &home, int i, int j)
Update greatest lower bound to include all elements between and including i and j.
int glbMax(void) const
Return maximum of the greatest lower bound.
unsigned int lubSize(void) const
Return the number of elements in the least upper bound.
int lubMax(void) const
Return maximum of the least upper bound.
int lubMin(void) const
Return minimum of the least upper bound.
int lubMinN(unsigned int n) const
Return n-th smallest element of the least upper bound.
int glbMin(void) const
Return minimum of the greatest lower bound.
static ModEvent modevent(const Delta &d)
Return modification event.
unsigned int cardMin(void) const
Return minimum cardinality.
unsigned int cardMax(void) const
Return maximum cardinality.
unsigned int glbSize(void) const
Return the number of elements in the greatest lower bound.
bool notContains(int i) const
Test whether i is not in the least upper bound.
ModEvent intersect(Space &home, int i, int j)
Update least upper bound to contain at most all elements between and including i and j.
ModEvent excludeI(Space &home, I &i)
Remove range sequence described by i from least upper bound.
ModEvent exclude(Space &home, int i, int j)
Restrict least upper bound to not contain all elements between and including i and j.
ModEvent includeI(Space &home, I &i)
Include range sequence described by i in greatest lower bound.
ModEvent exclude(Space &home, int i, int j)
Restrict least upper bound to not contain all elements between and including i and j.
bool lubAny(const Delta &d) const
Test whether arbitrary values got pruned from lub.
bool contains(int i) const
Test whether i is in the greatest lower bound.
ModEvent intersect(Space &home, int i, int j)
Update least upper bound to contain at most all elements between and including i and j.
unsigned int cardMin(void) const
Return minimum cardinality.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
unsigned int lubSize(void) const
Return the number of elements in the least upper bound.
int lubMax(void) const
Return maximum of the least upper bound.
int glbMax(void) const
Return maximum of the greatest lower bound.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
unsigned int cardMax(void) const
Return maximum cardinality.
bool glbAny(const Delta &d) const
Test whether arbitrary values got pruned from glb.
int lubMinN(unsigned int n) const
Return n-th smallest element of the least upper bound.
unsigned int glbSize(void) const
Return the number of elements in the greatest lower bound.
ModEvent includeI(Space &home, I &i)
Include range sequence described by i in greatest lower bound.
int glbMin(void) const
Return minimum of the greatest lower bound.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
unsigned int unknownSize(void) const
Return the number of unknown elements.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
bool notContains(int i) const
Test whether i is not in the least upper bound.
SingletonView(void)
Default constructor.
static PropCond pc_settoint(PropCond pc)
Convert set variable PropCond pc to a PropCond for integer variables.
ModEvent include(Space &home, int i, int j)
Update greatest lower bound to include all elements between and including i and j.
ModEvent excludeI(Space &home, I &i)
Remove range sequence described by i from least upper bound.
static ModEvent me_inttoset(ModEvent me)
Convert integer variable ModEvent me to a ModEvent for set variables.
static ModEvent me_settoint(ModEvent me)
Convert set variable ModEvent me to a ModEvent for integer variables.
int lubMin(void) const
Return minimum of the least upper bound.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
static ModEvent modevent(const Delta &d)
Return modification event.
static ModEventDelta med(ModEvent)
Translate modification event me to modification event delta for view.
Constant view for the universe.
int glbMax(void) const
Return maximum of the greatest lower bound.
ModEvent excludeI(Space &home, I &i)
Remove range sequence described by i from least upper bound.
ModEvent exclude(Space &home, int i, int j)
Restrict least upper bound to not contain all elements between and including i and j.
int glbMin(void) const
Return minimum of the greatest lower bound.
bool lubAny(const Delta &d) const
Test whether arbitrary values got pruned from lub.
ModEvent includeI(Space &home, I &i)
Include range sequence described by i in greatest lower bound.
UniverseView(void)
Default constructor.
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
ModEvent include(Space &home, int i, int j)
Update greatest lower bound to include all elements between and including i and j.
ModEvent intersect(Space &home, int i, int j)
Update least upper bound to contain at most all elements between and including i and j.
bool notContains(int i) const
Test whether i is not in the least upper bound.
bool contains(int i) const
Test whether i is in the greatest lower bound.
bool glbAny(const Delta &d) const
Test whether arbitrary values got pruned from glb.
int lubMax(void) const
Return maximum of the least upper bound.
unsigned int unknownSize(void) const
Return the number of unknown elements.
unsigned int cardMin(void) const
Return minimum cardinality.
int lubMinN(unsigned int n) const
Return n-th smallest element of the least upper bound.
unsigned int glbSize(void) const
Return the number of elements in the greatest lower bound.
unsigned int lubSize(void) const
Return the number of elements in the least upper bound.
unsigned int cardMax(void) const
Return maximum cardinality.
int lubMin(void) const
Return minimum of the least upper bound.
Base-class for variable implementation views.
int ModEventDelta
Modification event deltas.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const IdxViewArray< View > &x)
bool operator==(const CachedView< View > &x, const CachedView< View > &y)
bool operator!=(const CachedView< View > &x, const CachedView< View > &y)
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar y
int PropCond
Type for propagation conditions.
Post propagator for SetVar x
int ModEvent
Type for modification events.