56 double afc(
void)
const;
63 unsigned int id(
void)
const;
161 unsigned int id(
void)
const;
258 unsigned int id(
void)
const;
326 template<
class ViewA,
class ViewB>
332 template<
class Var,
class View>
338 template<
class ViewA,
class ViewB>
344 template<
class View,
class Var>
350 template<
class ViewA,
class ViewB>
356 template<
class VarA,
class VarB>
362 template<
class Var,
class View>
368 template<
class View,
class Var>
374 template<
class ViewA,
class ViewB>
441 View::schedule(home,p,
me);
446 return View::me(
med);
451 return View::med(
me);
517 return x->assigned();
528 x->cancel(home,p,pc);
533 x->reschedule(home,p,pc);
538 x->subscribe(home,a,fail);
543 x->cancel(home,a,fail);
548 VarImpType::schedule(home,p,
me);
553 return VarImpType::me(
med);
558 return VarImpType::med(
me);
563 return VarImpType::modevent(d);
573 return this->
varimp() <
y.varimp();
594 return View::varderived();
635 return View::schedule(home,p,
me);
640 return View::me(
med);
645 return View::med(
me);
662 x.reschedule(home,p,pc);
667 x.subscribe(home,a,fail);
672 x.cancel(home,a,fail);
677 return View::modevent(d);
687 return base() <
y.base();
697 template<
class ViewA,
class ViewB>
703 template<
class Var,
class View>
709 template<
class ViewA,
class ViewB>
715 template<
class Var,
class View>
721 template<
class Var,
class View>
727 template<
class ViewX,
class ViewY>
733 template<
class View,
class Var>
739 template<
class ViewX,
class ViewY>
745 template<
class VarX,
class VarY>
748 return x.varimp() ==
y.varimp();
752 template<
class ViewA,
class ViewB>
758 template<
class Var,
class View>
764 template<
class ViewA,
class ViewB>
770 template<
class Var,
class View>
776 template<
class Var,
class View>
782 template<
class ViewX,
class ViewY>
788 template<
class View,
class Var>
794 template<
class ViewX,
class ViewY>
800 template<
class VarX,
class VarY>
803 return x.varimp() !=
y.varimp();
812 template<
class ViewA,
class ViewB>
817 template<
class Var,
class View>
822 template<
class ViewA,
class ViewB>
827 template<
class View,
class Var>
832 template<
class ViewA,
class ViewB>
837 template<
class VarA,
class VarB>
843 template<
class Var,
class View>
846 return (View::varderived() &&
850 template<
class View,
class Var>
853 return (View::varderived() &&
857 template<
class ViewA,
class ViewB>
860 return (ViewA::varderived() && ViewB::varderived() &&
Base-class for constant views.
double afc(void) const
Return accumulated failure count.
unsigned int degree(void) const
Return degree (number of subscribed propagators and advisors)
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
bool operator<(const ConstView &y) const
Whether this view comes before view y (arbitray order)
static ModEvent modevent(const Delta &d)
Return modification event.
static ModEventDelta med(ModEvent me)
bool assigned(void) const
Test whether view is assigned.
static ModEvent me(const ModEventDelta &med)
View::VarImpType VarImpType
The variable implementation type corresponding to the constant view.
static bool varderived(void)
Return whether this view is derived from a VarImpView.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
void update(Space &home, ConstView &y)
Update this view to be a clone of view y.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
View::VarType VarType
The variable type corresponding to the constant view.
VarImpType * varimp(void) const
Return dummy variable implementation of view.
Generic domain change information to be supplied to advisors.
Base-class for derived views.
View base(void) const
Return view from which this view is derived.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
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.
View x
View from which this view is derived.
bool operator<(const DerivedView< View > &y) const
Whether this view comes before view y (arbitray order)
View::VarImpType VarImpType
The variable implementation type belonging to the View.
View::VarType VarType
The variable type belonging to the View.
static bool varderived(void)
Return whether this view is derived from a VarImpView.
DerivedView(void)
Default constructor.
static ModEvent me(const ModEventDelta &med)
bool assigned(void) const
Test whether view is assigned.
VarImpType * varimp(void) const
Return variable implementation of view.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
unsigned int degree(void) const
Return degree (number of subscribed propagators)
void update(Space &home, DerivedView< View > &y)
Update this view to be a clone of view y.
double afc(void) const
Return accumulated failure count.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
static ModEventDelta med(ModEvent)
Base-class for propagators.
Base-class for variable implementations.
Base-class for variable implementation views.
void update(Space &home, VarImpView< Var > &y)
Update this view to be a clone of view y.
static ModEventDelta med(ModEvent me)
Var VarType
The variable type corresponding to the view.
bool operator<(const VarImpView &y) const
Whether this view comes before view y (arbitray order)
VarImpType * varimp(void) const
Return variable implementation of view.
unsigned int degree(void) const
Return degree (number of subscribed propagators and advisors)
Var::VarImpType VarImpType
The variable implementation type corresponding to the view.
static ModEvent me(const ModEventDelta &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.
static bool varderived(void)
Return whether this view is derived from a VarImpView.
VarImpView(void)
Default constructor.
double afc(void) const
Return accumulated failure count.
static ModEvent modevent(const Delta &d)
Return modification event.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
bool assigned(void) const
Test whether view is assigned.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
void varimp(VarImpType *y)
Set variable implementation to y.
VarImpType * x
Pointer to variable implementation.
Base class for variables.
int ModEventDelta
Modification event deltas.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar y
const ModEvent ME_GEN_NONE
Generic modification event: no modification.
bool shared(ViewArray< ViewX > x, ViewArray< ViewY > y)
int PropCond
Type for propagation conditions.
const ModEvent ME_GEN_ASSIGNED
Generic modification event: variable is assigned a value.
Post propagator for SetVar x
bool operator==(const FloatVal &x, const FloatVal &y)
bool operator!=(const FloatVal &x, const FloatVal &y)
int ModEvent
Type for modification events.