Go to the documentation of this file.
53 unsigned int degree(
void)
const;
56 double afc(
void)
const;
146 unsigned int degree(
void)
const;
148 double afc(
void)
const;
208 template<
class VarA,
class VarB>
212 template<
class ViewA,
class ViewB>
213 bool before(
const ViewA&
x,
const ViewB&
y);
243 View
base(
void)
const;
245 unsigned int degree(
void)
const;
247 double afc(
void)
const;
308 template<
class ViewA,
class ViewB>
314 template<
class Var,
class View>
320 template<
class ViewA,
class ViewB>
326 template<
class View,
class Var>
332 template<
class ViewA,
class ViewB>
338 template<
class VarA,
class VarB>
344 template<
class Var,
class View>
350 template<
class View,
class Var>
356 template<
class ViewA,
class ViewB>
416 View::schedule(home,
p,me);
421 return View::me(med);
426 return View::med(me);
449 VarImpView<Var>::VarImpView(VarImpType*
y)
453 VarImpView<Var>::varimp(VarImpType*
y) {
458 VarImpView<Var>::varderived(
void) {
463 VarImpView<Var>::varimp(
void)
const {
468 VarImpView<Var>::degree(
void)
const {
479 return x->assigned();
485 x->subscribe(home,
p,pc,schedule);
490 x->cancel(home,
p,pc);
495 x->reschedule(home,
p,pc);
500 x->subscribe(home,
a,fail);
505 x->cancel(home,
a,fail);
509 VarImpView<Var>::schedule(Space& home, Propagator&
p,
ModEvent me) {
510 VarImpType::schedule(home,
p,me);
515 return VarImpType::me(med);
520 return VarImpType::med(me);
524 VarImpView<Var>::modevent(
const Delta&
d) {
525 return VarImpType::modevent(
d);
529 VarImpView<Var>::update(Space& home,
bool share, VarImpView<Var>&
y) {
540 DerivedView<View>::DerivedView(
void) {}
544 DerivedView<View>::DerivedView(
const View&
y)
549 DerivedView<View>::varderived(
void) {
550 return View::varderived();
555 DerivedView<View>::varimp(
void)
const {
567 DerivedView<View>::degree(
void)
const {
583 DerivedView<View>::schedule(Space& home, Propagator&
p,
ModEvent me) {
584 return View::schedule(home,
p,me);
589 return View::me(med);
593 DerivedView<View>::med(
ModEvent me) {
594 return View::med(me);
601 x.subscribe(home,
p,pc,schedule);
611 x.reschedule(home,
p,pc);
616 x.subscribe(home,
a,fail);
621 x.cancel(home,
a,fail);
625 DerivedView<View>::modevent(
const Delta&
d) {
626 return View::modevent(
d);
630 DerivedView<View>::update(Space& home,
bool share, DerivedView<View>&
y) {
631 x.update(home,share,
y.
x);
641 template<
class ViewA,
class ViewB>
647 template<
class Var,
class View>
653 template<
class ViewA,
class ViewB>
659 template<
class Var,
class View>
665 template<
class View,
class Var>
677 template<
class ViewA,
class ViewB>
680 return same(
x.base(),
y.base());
688 template<
class ViewA,
class ViewB>
690 before(
const ViewA&
x,
const ViewB&
y) {
700 template<
class ViewA,
class ViewB>
702 shared(
const ConstView<ViewA>&,
const ConstView<ViewB>&) {
705 template<
class Var,
class View>
707 shared(
const VarImpView<Var>&,
const ConstView<View>&) {
710 template<
class ViewA,
class ViewB>
712 shared(
const DerivedView<ViewA>&,
const ConstView<ViewB>&) {
715 template<
class View,
class Var>
717 shared(
const ConstView<View>&,
const VarImpView<Var>&) {
720 template<
class ViewA,
class ViewB>
722 shared(
const ConstView<ViewA>&,
const DerivedView<ViewB>&) {
725 template<
class VarA,
class VarB>
727 shared(
const VarImpView<VarA>&
x,
const VarImpView<VarB>&
y) {
728 return (
static_cast<VarImpBase*
>(
x.varimp()) ==
729 static_cast<VarImpBase*
>(
y.
varimp()));
731 template<
class Var,
class View>
733 shared(
const VarImpView<Var>&
x,
const DerivedView<View>&
y) {
734 return (View::varderived() &&
735 static_cast<VarImpBase*
>(
x.varimp()) ==
736 static_cast<VarImpBase*
>(
y.
varimp()));
738 template<
class View,
class Var>
740 shared(
const DerivedView<View>&
x,
const VarImpView<Var>&
y) {
741 return (View::varderived() &&
742 static_cast<VarImpBase*
>(
x.varimp()) ==
743 static_cast<VarImpBase*
>(
y.
varimp()));
745 template<
class ViewA,
class ViewB>
747 shared(
const DerivedView<ViewA>&
x,
const DerivedView<ViewB>&
y) {
748 return (ViewA::varderived() && ViewB::varderived() &&
749 static_cast<VarImpBase*
>(
x.varimp()) ==
750 static_cast<VarImpBase*
>(
y.
varimp()));
double afc(void) const
Return accumulated failure count.
VarImpView(void)
Default constructor.
VarImpType * x
Pointer to variable implementation.
const ModEvent ME_GEN_ASSIGNED
Generic modification event: variable is assigned a value.
Post propagator for SetVar x
bool same(const OffsetView &x, const OffsetView &y)
Test whether views x and y are the same.
Post propagator for SetVar SetOpType SetVar y
double afc(void) const
Return accumulated failure count.
View::VarImpType VarImpType
The variable implementation type corresponding to the constant view.
bool same(const DerivedView< ViewA > &x, const DerivedView< ViewB > &y)
Test whether two views are the same.
bool assigned(void) const
Test whether view is assigned.
static bool varderived(void)
Return whether this view is derived from a VarImpView.
unsigned int degree(void) const
Return degree (number of subscribed propagators)
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
unsigned int degree(void) const
Return degree (number of subscribed propagators and advisors)
double afc(void) const
Return accumulated failure count.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
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.
bool assigned(View x, int v)
Whether x is assigned to value v.
bool assigned(void) const
Test whether view is assigned.
SetVarImp * copy(Space &home, bool share)
Return copy of this variable.
bool same(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether two views are the same.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
static ModEventDelta med(ModEvent me)
Translate modification event me to modification event delta for view.
bool same(const Item &i, const Item &j)
Whether two items are the same.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
bool same(const ConstView< ViewA > &, const DerivedView< ViewB > &)
Test whether two views are the same.
static ModEventDelta med(ModEvent)
Translate modification event me to modification event delta for view.
bool same(const VarImpView< Var > &, const DerivedView< View > &)
Test whether two views are the same.
Var VarType
The variable type corresponding to the view.
void update(Space &home, bool share, DerivedView< View > &y)
Update this view to be a clone of view y.
View::VarType VarType
The variable type belonging to the View.
VarImpType * varimp(void) const
Return variable implementation of view.
Base-class for derived views.
Base class for variables.
Base-class for constant views.
Gecode toplevel namespace
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
Base-class for propagators.
VarImp * x
Pointer to variable implementation.
static ModEvent modevent(const Delta &d)
Return modification event.
static bool varderived(void)
Return whether this view is derived from a VarImpView.
Node * x
Pointer to corresponding Boolean expression node.
void reschedule(Space &home, Propagator &p, IntSet &y)
Generic domain change information to be supplied to advisors.
VarImp * varimp(void) const
Return variable implementation of variable.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
bool same(const DerivedView< View > &, const VarImpView< Var > &)
Test whether two views are the same.
DerivedView(void)
Default constructor.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
const ModEvent ME_GEN_NONE
Generic modification event: no modification.
void update(Space &home, bool share, ConstView &y)
Update this view to be a clone of view y.
static ModEvent modevent(const Delta &d)
Return modification event.
const double base
Base for geometric restart sequence.
bool same(const VarImpView< Var > &x, const VarImpView< Var > &y)
Test whether two views are the same.
View::VarImpType VarImpType
The variable implementation type belonging to the View.
bool same(const VarImpView< Var > &, const ConstView< View > &)
Test whether two views are the same.
void update(Space &home, bool share, VarImpView< Var > &y)
Update this view to be a clone of view y.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
bool before(const Item &i, const Item &j)
Test whether one item is before another.
int ModEvent
Type for modification events.
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.
int PropCond
Type for propagation conditions.
View x
View from which this view is derived.
Var::VarImpType VarImpType
The variable implementation type corresponding to the view.
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.
static ModEventDelta med(ModEvent me)
Translate modification event me to modification event delta for view.
VarImpType * varimp(void) const
Return dummy variable implementation of view.
void cancel(Space &home, Propagator &p, IntSet &y)
View base(void) const
Return view from which this view is derived.
bool before(const OffsetView &x, const OffsetView &y)
Test whether view x comes before y (arbitrary order)
bool shared(const IntSet &, VX)
View::VarType VarType
The variable type corresponding to the constant view.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
void subscribe(Space &home, Propagator &p, IntSet &y)
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.
int ModEventDelta
Modification event deltas.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
VarImpType * varimp(void) const
Return variable implementation of view.
int p
Number of positive literals for node type.
Base-class for variable implementation views.