view.hpp
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Contributing authors:
* Samuel Gagnon <samuel.gagnon92@gmail.com>
*
* Copyright:
* Christian Schulte, 2005
* Samuel Gagnon, 2018
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
namespace Gecode {
template<class View>
class ConstView {
public:
typedef typename View::VarImpType VarImpType;
typedef typename View::VarType VarType;
unsigned int degree(void) const;
double afc(void) const;
static bool varderived(void);
VarImpType* varimp(void) const;
#ifdef GECODE_HAS_CBS
unsigned int id(void) const;
#endif
bool assigned(void) const;
static void schedule(Space& home, Propagator& p, ModEvent me);
static ModEvent me(const ModEventDelta& med);
static ModEventDelta med(ModEvent me);
void subscribe(Space& home, Propagator& p, PropCond pc, bool schedule=true);
void cancel(Space& home, Propagator& p, PropCond pc);
void reschedule(Space& home, Propagator& p, PropCond pc);
void subscribe(Space& home, Advisor& a, bool fail=false);
void cancel(Space& home, Advisor& a, bool fail=false);
static ModEvent modevent(const Delta& d);
void update(Space& home, ConstView& y);
bool operator <(const ConstView& y) const;
};
template<class Var>
class VarImpView {
public:
typedef Var VarType;
typedef typename Var::VarImpType VarImpType;
protected:
VarImpType* x;
VarImpView(void);
VarImpView(VarImpType* y);
void varimp(VarImpType* y);
public:
static bool varderived(void);
VarImpType* varimp(void) const;
unsigned int degree(void) const;
double afc(void) const;
#ifdef GECODE_HAS_CBS
unsigned int id(void) const;
#endif
bool assigned(void) const;
static void schedule(Space& home, Propagator& p, ModEvent me);
static ModEvent me(const ModEventDelta& med);
static ModEventDelta med(ModEvent me);
void subscribe(Space& home, Propagator& p, PropCond pc, bool schedule=true);
void cancel(Space& home, Propagator& p, PropCond pc);
void reschedule(Space& home, Propagator& p, PropCond pc);
void subscribe(Space& home, Advisor& a, bool fail=false);
void cancel(Space& home, Advisor& a, bool fail=false);
static ModEvent modevent(const Delta& d);
void update(Space& home, VarImpView<Var>& y);
bool operator <(const VarImpView& y) const;
};
template<class View>
class DerivedView {
public:
typedef typename View::VarImpType VarImpType;
typedef typename View::VarType VarType;
protected:
View x;
DerivedView(void);
public:
DerivedView(const View& y);
static bool varderived(void);
VarImpType* varimp(void) const;
View base(void) const;
unsigned int degree(void) const;
double afc(void) const;
#ifdef GECODE_HAS_CBS
unsigned int id(void) const;
#endif
bool assigned(void) const;
static void schedule(Space& home, Propagator& p, ModEvent me);
static ModEvent me(const ModEventDelta& med);
static ModEventDelta med(ModEvent);
void subscribe(Space& home, Propagator& p, PropCond pc, bool schedule=true);
void cancel(Space& home, Propagator& p, PropCond pc);
void reschedule(Space& home, Propagator& p, PropCond pc);
void subscribe(Space& home, Advisor& a, bool fail=false);
void cancel(Space& home, Advisor& a, bool fail=false);
static ModEvent modevent(const Delta& d);
void update(Space& home, DerivedView<View>& y);
bool operator <(const DerivedView<View>& y) const;
};
template<class ViewA, class ViewB>
bool shared(const ConstView<ViewA>&, const ConstView<ViewB>&);
template<class Var, class View>
bool shared(const VarImpView<Var>&, const ConstView<View>&);
template<class ViewA, class ViewB>
bool shared(const DerivedView<ViewA>&, const ConstView<ViewB>&);
template<class View, class Var>
bool shared(const ConstView<View>&, const VarImpView<Var>&);
template<class ViewA, class ViewB>
bool shared(const ConstView<ViewA>&, const DerivedView<ViewB>&);
template<class VarA, class VarB>
bool shared(const VarImpView<VarA>&, const VarImpView<VarB>&);
template<class Var, class View>
bool shared(const VarImpView<Var>&, const DerivedView<View>&);
template<class View, class Var>
bool shared(const DerivedView<View>&, const VarImpView<Var>&);
template<class ViewA, class ViewB>
bool shared(const DerivedView<ViewA>&, const DerivedView<ViewB>&);
/*
* Constant view: has no variable implementation
*
*/
template<class View>
forceinline unsigned int
ConstView<View>::degree(void) const {
return 0;
}
template<class View>
forceinline double
ConstView<View>::afc(void) const {
return 0.0;
}
template<class View>
forceinline bool
ConstView<View>::varderived(void) {
return false;
}
template<class View>
forceinline typename View::VarImpType*
ConstView<View>::varimp(void) const {
return NULL;
}
#ifdef GECODE_HAS_CBS
template<class View>
forceinline unsigned int
ConstView<View>::id(void) const {
return 0;
}
#endif
template<class View>
forceinline bool
ConstView<View>::assigned(void) const {
return true;
}
template<class View>
forceinline void
ConstView<View>::subscribe(Space& home, Propagator& p, PropCond,
bool schedule) {
if (schedule)
View::schedule(home,p,ME_GEN_ASSIGNED);
}
template<class View>
forceinline void
ConstView<View>::cancel(Space&, Propagator&, PropCond) {
}
template<class View>
forceinline void
ConstView<View>::reschedule(Space& home, Propagator& p, PropCond) {
View::schedule(home,p,ME_GEN_ASSIGNED);
}
template<class View>
forceinline void
ConstView<View>::subscribe(Space&, Advisor&, bool) {
}
template<class View>
forceinline void
ConstView<View>::cancel(Space&, Advisor&, bool) {
}
template<class View>
forceinline void
ConstView<View>::schedule(Space& home, Propagator& p, ModEvent me) {
View::schedule(home,p,me);
}
template<class View>
forceinline ModEvent
ConstView<View>::me(const ModEventDelta& med) {
return View::me(med);
}
template<class View>
forceinline ModEventDelta
ConstView<View>::med(ModEvent me) {
return View::med(me);
}
template<class View>
forceinline ModEvent
ConstView<View>::modevent(const Delta& d) {
(void) d;
return ME_GEN_NONE;
}
template<class View>
forceinline void
ConstView<View>::update(Space&, ConstView<View>&) {
}
template<class View>
forceinline bool
ConstView<View>::operator <(const ConstView<View>&) const {
return true;
}
/*
* Variable view: contains a pointer to a variable implementation
*
*/
template<class Var>
forceinline
VarImpView<Var>::VarImpView(void)
: x(NULL) {}
template<class Var>
forceinline
VarImpView<Var>::VarImpView(VarImpType* y)
: x(y) {}
template<class Var>
forceinline void
VarImpView<Var>::varimp(VarImpType* y) {
x=y;
}
template<class Var>
forceinline bool
VarImpView<Var>::varderived(void) {
return true;
}
template<class Var>
forceinline typename Var::VarImpType*
VarImpView<Var>::varimp(void) const {
return x;
}
template<class Var>
forceinline unsigned int
VarImpView<Var>::degree(void) const {
return x->degree();
}
template<class Var>
forceinline double
VarImpView<Var>::afc(void) const {
return x->afc();
}
#ifdef GECODE_HAS_CBS
template<class Var>
forceinline unsigned int
VarImpView<Var>::id(void) const {
return x->id();
}
#endif
template<class Var>
forceinline bool
VarImpView<Var>::assigned(void) const {
return x->assigned();
}
template<class Var>
forceinline void
VarImpView<Var>::subscribe(Space& home, Propagator& p, PropCond pc,
bool schedule) {
x->subscribe(home,p,pc,schedule);
}
template<class Var>
forceinline void
VarImpView<Var>::cancel(Space& home, Propagator& p, PropCond pc) {
x->cancel(home,p,pc);
}
template<class Var>
forceinline void
VarImpView<Var>::reschedule(Space& home, Propagator& p, PropCond pc) {
x->reschedule(home,p,pc);
}
template<class Var>
forceinline void
VarImpView<Var>::subscribe(Space& home, Advisor& a, bool fail) {
x->subscribe(home,a,fail);
}
template<class Var>
forceinline void
VarImpView<Var>::cancel(Space& home, Advisor& a, bool fail) {
x->cancel(home,a,fail);
}
template<class Var>
forceinline void
VarImpView<Var>::schedule(Space& home, Propagator& p, ModEvent me) {
VarImpType::schedule(home,p,me);
}
template<class Var>
forceinline ModEvent
VarImpView<Var>::me(const ModEventDelta& med) {
return VarImpType::me(med);
}
template<class Var>
forceinline ModEventDelta
VarImpView<Var>::med(ModEvent me) {
return VarImpType::med(me);
}
template<class Var>
forceinline ModEvent
VarImpView<Var>::modevent(const Delta& d) {
return VarImpType::modevent(d);
}
template<class Var>
forceinline void
VarImpView<Var>::update(Space& home, VarImpView<Var>& y) {
x = y.x->copy(home);
}
template<class Var>
forceinline bool
VarImpView<Var>::operator <(const VarImpView<Var>& y) const {
return this->varimp() < y.varimp();
}
/*
* Derived view: contain the base view from which they are derived
*
*/
template<class View>
forceinline
DerivedView<View>::DerivedView(void) {}
template<class View>
forceinline
DerivedView<View>::DerivedView(const View& y)
: x(y) {}
template<class View>
forceinline bool
DerivedView<View>::varderived(void) {
return View::varderived();
}
template<class View>
forceinline typename View::VarImpType*
DerivedView<View>::varimp(void) const {
return x.varimp();
}
template<class View>
forceinline View
DerivedView<View>::base(void) const {
return x;
}
template<class View>
forceinline unsigned int
DerivedView<View>::degree(void) const {
return x.degree();
}
template<class View>
forceinline double
DerivedView<View>::afc(void) const {
return x.afc();
}
#ifdef GECODE_HAS_CBS
template<class View>
forceinline unsigned int
DerivedView<View>::id(void) const {
return x.id();
}
#endif
template<class View>
forceinline bool
DerivedView<View>::assigned(void) const {
return x.assigned();
}
template<class View>
forceinline void
DerivedView<View>::schedule(Space& home, Propagator& p, ModEvent me) {
return View::schedule(home,p,me);
}
template<class View>
forceinline ModEvent
DerivedView<View>::me(const ModEventDelta& med) {
return View::me(med);
}
template<class View>
forceinline ModEventDelta
DerivedView<View>::med(ModEvent me) {
return View::med(me);
}
template<class View>
forceinline void
DerivedView<View>::subscribe(Space& home, Propagator& p, PropCond pc,
bool schedule) {
x.subscribe(home,p,pc,schedule);
}
template<class View>
forceinline void
DerivedView<View>::cancel(Space& home, Propagator& p, PropCond pc) {
x.cancel(home,p,pc);
}
template<class View>
forceinline void
DerivedView<View>::reschedule(Space& home, Propagator& p, PropCond pc) {
x.reschedule(home,p,pc);
}
template<class View>
forceinline void
DerivedView<View>::subscribe(Space& home, Advisor& a, bool fail) {
x.subscribe(home,a,fail);
}
template<class View>
forceinline void
DerivedView<View>::cancel(Space& home, Advisor& a, bool fail) {
x.cancel(home,a,fail);
}
template<class View>
forceinline ModEvent
DerivedView<View>::modevent(const Delta& d) {
return View::modevent(d);
}
template<class View>
forceinline void
DerivedView<View>::update(Space& home, DerivedView<View>& y) {
x.update(home,y.x);
}
template<class View>
forceinline bool
DerivedView<View>::operator <(const DerivedView<View>& y) const {
return base() < y.base();
}
/*
* Tests whether two views are the same
*
*/
template<class ViewA, class ViewB>
forceinline bool
operator ==(const ConstView<ViewA>&, const ConstView<ViewB>&) {
return false;
}
template<class Var, class View>
forceinline bool
operator ==(const ConstView<View>&, const VarImpView<Var>&) {
return false;
}
template<class ViewA, class ViewB>
forceinline bool
operator ==(const ConstView<ViewA>&, const DerivedView<ViewB>&) {
return false;
}
template<class Var, class View>
forceinline bool
operator ==(const VarImpView<Var>&, const ConstView<View>&) {
return false;
}
template<class Var, class View>
forceinline bool
operator ==(const VarImpView<Var>&, const DerivedView<View>&) {
return false;
}
template<class ViewX, class ViewY>
forceinline bool
operator ==(const DerivedView<ViewX>&, const ConstView<ViewY>&) {
return false;
}
template<class View, class Var>
forceinline bool
operator ==(const DerivedView<View>&, const VarImpView<Var>&) {
return false;
}
template<class ViewX, class ViewY>
forceinline bool
operator ==(const DerivedView<ViewX>&, const DerivedView<ViewY>&) {
return false;
}
template<class VarX, class VarY>
forceinline bool
operator ==(const VarImpView<VarX>& x, const VarImpView<VarY>& y) {
return x.varimp() == y.varimp();
}
template<class ViewA, class ViewB>
forceinline bool
operator !=(const ConstView<ViewA>&, const ConstView<ViewB>&) {
return true;
}
template<class Var, class View>
forceinline bool
operator !=(const ConstView<View>&, const VarImpView<Var>&) {
return true;
}
template<class ViewA, class ViewB>
forceinline bool
operator !=(const ConstView<ViewA>&, const DerivedView<ViewB>&) {
return true;
}
template<class Var, class View>
forceinline bool
operator !=(const VarImpView<Var>&, const ConstView<View>&) {
return true;
}
template<class Var, class View>
forceinline bool
operator !=(const VarImpView<Var>&, const DerivedView<View>&) {
return true;
}
template<class ViewX, class ViewY>
forceinline bool
operator !=(const DerivedView<ViewX>&, const ConstView<ViewY>&) {
return true;
}
template<class View, class Var>
forceinline bool
operator !=(const DerivedView<View>&, const VarImpView<Var>&) {
return true;
}
template<class ViewX, class ViewY>
forceinline bool
operator !=(const DerivedView<ViewX>&, const DerivedView<ViewY>&) {
return true;
}
template<class VarX, class VarY>
forceinline bool
operator !=(const VarImpView<VarX>& x, const VarImpView<VarY>& y) {
return x.varimp() != y.varimp();
}
/*
* Testing whether two views share the same variable
*
*/
template<class ViewA, class ViewB>
forceinline bool
shared(const ConstView<ViewA>&, const ConstView<ViewB>&) {
return false;
}
template<class Var, class View>
forceinline bool
shared(const VarImpView<Var>&, const ConstView<View>&) {
return false;
}
template<class ViewA, class ViewB>
forceinline bool
shared(const DerivedView<ViewA>&, const ConstView<ViewB>&) {
return false;
}
template<class View, class Var>
forceinline bool
shared(const ConstView<View>&, const VarImpView<Var>&) {
return false;
}
template<class ViewA, class ViewB>
forceinline bool
shared(const ConstView<ViewA>&, const DerivedView<ViewB>&) {
return false;
}
template<class VarA, class VarB>
forceinline bool
shared(const VarImpView<VarA>& x, const VarImpView<VarB>& y) {
return (static_cast<VarImpBase*>(x.varimp()) ==
static_cast<VarImpBase*>(y.varimp()));
}
template<class Var, class View>
forceinline bool
shared(const VarImpView<Var>& x, const DerivedView<View>& y) {
return (View::varderived() &&
static_cast<VarImpBase*>(x.varimp()) ==
static_cast<VarImpBase*>(y.varimp()));
}
template<class View, class Var>
forceinline bool
shared(const DerivedView<View>& x, const VarImpView<Var>& y) {
return (View::varderived() &&
static_cast<VarImpBase*>(x.varimp()) ==
static_cast<VarImpBase*>(y.varimp()));
}
template<class ViewA, class ViewB>
forceinline bool
shared(const DerivedView<ViewA>& x, const DerivedView<ViewB>& y) {
return (ViewA::varderived() && ViewB::varderived() &&
static_cast<VarImpBase*>(x.varimp()) ==
static_cast<VarImpBase*>(y.varimp()));
}
}
// STATISTICS: kernel-var
Gecode::Advisor
Base-class for advisors.
Definition core.hpp:1292
Gecode::ConstView
Base-class for constant views.
Definition view.hpp:45
Gecode::ConstView::afc
double afc(void) const
Return accumulated failure count.
Definition view.hpp:389
Gecode::ConstView::degree
unsigned int degree(void) const
Return degree (number of subscribed propagators and advisors).
Definition view.hpp:384
Gecode::ConstView::subscribe
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
Definition view.hpp:416
Gecode::ConstView::reschedule
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
Definition view.hpp:427
Gecode::ConstView::operator<
bool operator<(const ConstView &y) const
Whether this view comes before view y (arbitray order).
Definition view.hpp:465
Gecode::ConstView::modevent
static ModEvent modevent(const Delta &d)
Return modification event.
Definition view.hpp:455
Gecode::ConstView< IntView >::med
static ModEventDelta med(ModEvent me)
Definition view.hpp:450
Gecode::ConstView::assigned
bool assigned(void) const
Test whether view is assigned.
Definition view.hpp:411
Gecode::ConstView< IntView >::me
static ModEvent me(const ModEventDelta &med)
Definition view.hpp:445
Gecode::ConstView::VarImpType
View::VarImpType VarImpType
The variable implementation type corresponding to the constant view.
Definition view.hpp:48
Gecode::ConstView::varderived
static bool varderived(void)
Return whether this view is derived from a VarImpView.
Definition view.hpp:394
Gecode::ConstView::cancel
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
Definition view.hpp:423
Gecode::ConstView::update
void update(Space &home, ConstView &y)
Update this view to be a clone of view y.
Definition view.hpp:461
Gecode::ConstView::schedule
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
Definition view.hpp:440
Gecode::ConstView::VarType
View::VarType VarType
The variable type corresponding to the constant view.
Definition view.hpp:50
Gecode::ConstView::varimp
VarImpType * varimp(void) const
Return dummy variable implementation of view.
Definition view.hpp:399
Gecode::Delta
Generic domain change information to be supplied to advisors.
Definition core.hpp:204
Gecode::DerivedView
Base-class for derived views.
Definition view.hpp:230
Gecode::DerivedView::base
View base(void) const
Return view from which this view is derived.
Definition view.hpp:605
Gecode::DerivedView::reschedule
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
Definition view.hpp:661
Gecode::DerivedView::modevent
static ModEvent modevent(const Delta &d)
Return modification event.
Definition view.hpp:676
Gecode::DerivedView::subscribe
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
Definition view.hpp:650
Gecode::DerivedView::x
View x
View from which this view is derived.
Definition view.hpp:238
Gecode::DerivedView::operator<
bool operator<(const DerivedView< View > &y) const
Whether this view comes before view y (arbitray order).
Definition view.hpp:686
Gecode::DerivedView::VarImpType
View::VarImpType VarImpType
The variable implementation type belonging to the View.
Definition view.hpp:233
Gecode::DerivedView::VarType
View::VarType VarType
The variable type belonging to the View.
Definition view.hpp:235
Gecode::DerivedView::varderived
static bool varderived(void)
Return whether this view is derived from a VarImpView.
Definition view.hpp:593
Gecode::DerivedView::DerivedView
DerivedView(void)
Default constructor.
Definition view.hpp:584
Gecode::DerivedView< FloatView >::me
static ModEvent me(const ModEventDelta &med)
Definition view.hpp:639
Gecode::DerivedView::assigned
bool assigned(void) const
Test whether view is assigned.
Definition view.hpp:628
Gecode::DerivedView::varimp
VarImpType * varimp(void) const
Return variable implementation of view.
Definition view.hpp:599
Gecode::DerivedView::schedule
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
Definition view.hpp:634
Gecode::DerivedView::degree
unsigned int degree(void) const
Return degree (number of subscribed propagators).
Definition view.hpp:611
Gecode::DerivedView::update
void update(Space &home, DerivedView< View > &y)
Update this view to be a clone of view y.
Definition view.hpp:681
Gecode::DerivedView::afc
double afc(void) const
Return accumulated failure count.
Definition view.hpp:616
Gecode::DerivedView::cancel
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
Definition view.hpp:656
Gecode::DerivedView< FloatView >::med
static ModEventDelta med(ModEvent)
Definition view.hpp:644
Gecode::Propagator
Base-class for propagators.
Definition core.hpp:1064
Gecode::Space
Computation spaces.
Definition core.hpp:1742
Gecode::View
Gecode::VarImpBase
Base-class for variable implementations.
Definition core.hpp:172
Gecode::VarImpView
Base-class for variable implementation views.
Definition view.hpp:133
Gecode::VarImpView::update
void update(Space &home, VarImpView< Var > &y)
Update this view to be a clone of view y.
Definition view.hpp:567
Gecode::VarImpView< FloatVar >::med
static ModEventDelta med(ModEvent me)
Definition view.hpp:557
Gecode::VarImpView::VarType
Var VarType
The variable type corresponding to the view.
Definition view.hpp:136
Gecode::VarImpView::operator<
bool operator<(const VarImpView &y) const
Whether this view comes before view y (arbitray order).
Definition view.hpp:572
Gecode::VarImpView::varimp
VarImpType * varimp(void) const
Return variable implementation of view.
Definition view.hpp:494
Gecode::VarImpView::degree
unsigned int degree(void) const
Return degree (number of subscribed propagators and advisors).
Definition view.hpp:499
Gecode::VarImpView::VarImpType
Var::VarImpType VarImpType
The variable implementation type corresponding to the view.
Definition view.hpp:138
Gecode::VarImpView< FloatVar >::me
static ModEvent me(const ModEventDelta &med)
Definition view.hpp:552
Gecode::VarImpView::schedule
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
Definition view.hpp:547
Gecode::VarImpView::cancel
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
Definition view.hpp:527
Gecode::VarImpView::varderived
static bool varderived(void)
Return whether this view is derived from a VarImpView.
Definition view.hpp:489
Gecode::VarImpView::VarImpView
VarImpView(void)
Default constructor.
Definition view.hpp:476
Gecode::VarImpView::afc
double afc(void) const
Return accumulated failure count.
Definition view.hpp:504
Gecode::VarImpView::modevent
static ModEvent modevent(const Delta &d)
Return modification event.
Definition view.hpp:562
Gecode::VarImpView::reschedule
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
Definition view.hpp:532
Gecode::VarImpView::assigned
bool assigned(void) const
Test whether view is assigned.
Definition view.hpp:516
Gecode::VarImpView::subscribe
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
Definition view.hpp:521
Gecode::VarImpView::varimp
void varimp(VarImpType *y)
Set variable implementation to y.
Definition view.hpp:484
Gecode::VarImpView::x
VarImpType * x
Pointer to variable implementation.
Definition view.hpp:141
Gecode::Var
Base class for variables.
Definition var.hpp:40
Gecode::ModEventDelta
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
Gecode
Gecode toplevel namespace
Gecode::ME_GEN_NONE
const ModEvent ME_GEN_NONE
Generic modification event: no modification.
Definition core.hpp:67
Gecode::shared
bool shared(ViewArray< ViewX > x, ViewArray< ViewY > y)
Definition array.hpp:1466
Gecode::PropCond
int PropCond
Type for propagation conditions.
Definition core.hpp:72
Gecode::ME_GEN_ASSIGNED
const ModEvent ME_GEN_ASSIGNED
Generic modification event: variable is assigned a value.
Definition core.hpp:69
Gecode::operator==
bool operator==(const FloatVal &x, const FloatVal &y)
Definition val.hpp:294
Gecode::operator!=
bool operator!=(const FloatVal &x, const FloatVal &y)
Definition val.hpp:317
Gecode::ModEvent
int ModEvent
Type for modification events.
Definition core.hpp:62
forceinline
#define forceinline
Definition config.hpp:187