40 namespace Gecode {
namespace Set {
namespace Element {
42 template<
class SView,
class RView>
53 template<
class SView,
class RView>
62 template<
class SView,
class RView>
76 template<
class SView,
class RView>
82 template<
class SView,
class RView>
89 template<
class SView,
class RView>
98 template<
class SView,
class RView>
104 template<
class SView,
class RView>
111 bool fix_flag =
false;
118 for(
int i=0; vx1lb(); ++vx1lb) {
119 while (
iv[
i].idx < vx1lb.
val())
i++;
131 if (
iv[i].idx < vx1ub.
val()) {
143 for (
int k=i; k<
n; k++) {
158 while (
iv[i].idx < vx1u.
val()) {
162 assert(
iv[i].idx == vx1u.
val());
164 SView candidate =
iv[
i].view;
165 int candidateInd =
iv[
i].idx;
189 for (
int k=i; k<
n; k++) {
197 if (
x1.cardMax()==0) {
208 for (; vx1lb(); ++vx1lb) {
209 while (
iv[i].idx < vx1lb.
val()) i++;
210 assert(
iv[i].idx==vx1lb.
val());
213 for (
int j=0; vx1lb2(); ++vx1lb2) {
214 while (
iv[j].idx < vx1lb2.
val()) j++;
215 assert(
iv[j].idx==vx1lb2.
val());
216 if (
iv[i].idx!=
iv[j].idx) {
229 if (
x1.cardMin()-
x1.glbSize() > 1) {
235 for (; vx1u() &&
x1.cardMin()-
x1.glbSize() > 1; ++vx1u) {
237 while (
iv[i].idx < vx1u.
val()) i++;
238 assert(
iv[i].idx == vx1u.
val());
243 for (; vx1u2(); ++vx1u2) {
245 while (
iv[j].idx < vx1u2.
val()) j++;
246 assert(
iv[j].idx == vx1u2.
val());
247 if (
iv[i].idx!=
iv[j].idx) {
275 for (;
x1.cardMin()-
x1.glbSize() == 2 && vx1u(); ++vx1u) {
277 while (
iv[i].idx < vx1u.
val()) i++;
278 assert (
iv[i].idx == vx1u.
val());
283 for (; vx1u2(); ++vx1u2) {
285 while (
iv[j].idx < vx1u2.
val()) j++;
286 assert (
iv[j].idx == vx1u2.
val());
287 if (
iv[i].idx!=
iv[j].idx) {
290 for (; vx1u3(); ++vx1u3) {
292 while (
iv[k].idx < vx1u3.
val()) k++;
293 assert (
iv[k].idx == vx1u3.
val());
294 if (
iv[j].idx!=
iv[k].idx &&
iv[i].idx!=
iv[k].idx) {
316 bool allAssigned =
true;
318 if (!
iv[
i].view.assigned()) {
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
Range iterator for the unknown set.
Range iterator for singleton range.
ExecStatus ES_SUBSUMED(Propagator &p)
int ModEvent
Type for modification events.
Base-class for propagators.
void update(Space &home, IdxViewArray< View > &x)
Cloning.
Range iterator for the greatest lower bound.
Propagator for element with disjointness
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Propagation has computed fixpoint.
int val(void) const
Return current value.
Range iterator for the least upper bound.
Base-class for both propagators and branchers.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Range iterator for computing intersection (binary)
void cancel(Space &home, Propagator &p, PropCond pc)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Value iterator from range iterator.
Range iterator for integer sets.
ElementDisjoint(Space &home, ElementDisjoint &p)
Constructor for cloning p.
int size(void) const
Return the current size.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
bool includeI(Space &home, I &i)
Include the set represented by i in this set.
void dispose(Space &home)
Free memory used by this set.
static ExecStatus post(Home home, IdxViewArray &x, RView y)
Post propagator for .
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
Post propagator for SetVar SetOpType SetVar SetRelType r
SetExpr inter(const SetVarArgs &x)
Intersection of set variables.
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
virtual size_t dispose(Space &home)
Delete actor and return its size.
void subscribe(Space &home, Propagator &p, PropCond pc, bool process=true)
Growing sets of integers.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual void reschedule(Space &home)
Schedule function.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
Gecode toplevel namespace
int ModEventDelta
Modification event deltas.
Home class for posting propagators
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.