max.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>
*
* Copyright:
* Christian Schulte, 2004
*
* 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.
*
*/
#include <gecode/int/rel.hh>
namespace Gecode { namespace Int { namespace Arithmetic {
/*
* Ternary bounds consistent maximum
*
*/
template<class View>
forceinline ExecStatus
prop_max_bnd(Space& home, View x0, View x1, View x2) {
bool mod = false;
do {
mod = false;
{
ModEvent me = x2.lq(home,std::max(x0.max(),x1.max()));
if (me_failed(me)) return ES_FAILED;
mod |= me_modified(me);
}
{
ModEvent me = x2.gq(home,std::max(x0.min(),x1.min()));
if (me_failed(me)) return ES_FAILED;
mod |= me_modified(me);
}
{
ModEvent me = x0.lq(home,x2.max());
if (me_failed(me)) return ES_FAILED;
mod |= me_modified(me);
}
{
ModEvent me = x1.lq(home,x2.max());
if (me_failed(me)) return ES_FAILED;
mod |= me_modified(me);
}
} while (mod);
return ES_OK;
}
template<class View>
forceinline
MaxBnd<View>::MaxBnd(Home home, View x0, View x1, View x2)
: TernaryPropagator<View,PC_INT_BND>(home,x0,x1,x2) {}
template<class View>
ExecStatus
MaxBnd<View>::post(Home home, View x0, View x1, View x2) {
GECODE_ME_CHECK(x2.gq(home,std::max(x0.min(),x1.min())));
GECODE_ME_CHECK(x2.lq(home,std::max(x0.max(),x1.max())));
if (x0 == x1)
return Rel::EqBnd<View,View>::post(home,x0,x2);
if (x0 == x2)
return Rel::Lq<View,View>::post(home,x1,x2);
if (x1 == x2)
return Rel::Lq<View,View>::post(home,x0,x2);
(void) new (home) MaxBnd<View>(home,x0,x1,x2);
return ES_OK;
}
template<class View>
forceinline
MaxBnd<View>::MaxBnd(Space& home, MaxBnd<View>& p)
: TernaryPropagator<View,PC_INT_BND>(home,p) {}
template<class View>
forceinline
MaxBnd<View>::MaxBnd(Space& home, Propagator& p,
View x0, View x1, View x2)
: TernaryPropagator<View,PC_INT_BND>(home,p,x0,x1,x2) {}
template<class View>
Actor*
MaxBnd<View>::copy(Space& home) {
return new (home) MaxBnd<View>(home,*this);
}
template<class View>
ExecStatus
MaxBnd<View>::propagate(Space& home, const ModEventDelta&) {
GECODE_ES_CHECK(prop_max_bnd(home,x0,x1,x2));
if ((x0.max() <= x1.min()) || (x0.max() < x2.min()))
GECODE_REWRITE(*this,(Rel::EqBnd<View,View>::post(home(*this),x1,x2)));
if ((x1.max() <= x0.min()) || (x1.max() < x2.min()))
GECODE_REWRITE(*this,(Rel::EqBnd<View,View>::post(home(*this),x0,x2)));
return x0.assigned() && x1.assigned() && x2.assigned() ?
home.ES_SUBSUMED(*this) : ES_FIX;
}
/*
* Nary bounds consistent maximum
*
*/
template<class View>
forceinline
NaryMaxBnd<View>::NaryMaxBnd(Home home, ViewArray<View>& x, View y)
: NaryOnePropagator<View,PC_INT_BND>(home,x,y) {}
template<class View>
ExecStatus
NaryMaxBnd<View>::post(Home home, ViewArray<View>& x, View y) {
assert(x.size() > 0);
x.unique();
if (x.size() == 1)
return Rel::EqBnd<View,View>::post(home,x[0],y);
if (x.size() == 2)
return MaxBnd<View>::post(home,x[0],x[1],y);
int l = x[0].min();
int u = x[0].max();
for (int i=1; i<x.size(); i++) {
l = std::max(l,x[i].min());
u = std::max(u,x[i].max());
}
GECODE_ME_CHECK(y.gq(home,l));
GECODE_ME_CHECK(y.lq(home,u));
if (x.same(y)) {
// Check whether y occurs in x
for (int i=0; i<x.size(); i++)
GECODE_ES_CHECK((Rel::Lq<View,View>::post(home,x[i],y)));
} else {
(void) new (home) NaryMaxBnd<View>(home,x,y);
}
return ES_OK;
}
template<class View>
forceinline
NaryMaxBnd<View>::NaryMaxBnd(Space& home, NaryMaxBnd<View>& p)
: NaryOnePropagator<View,PC_INT_BND>(home,p) {}
template<class View>
Actor*
NaryMaxBnd<View>::copy(Space& home) {
if (x.size() == 1)
return new (home) Rel::EqBnd<View,View>(home,*this,x[0],y);
if (x.size() == 2)
return new (home) MaxBnd<View>(home,*this,x[0],x[1],y);
return new (home) NaryMaxBnd<View>(home,*this);
}
enum MaxPropStatus {
MPS_ASSIGNED = 1<<0,
MPS_REMOVED = 1<<1,
MPS_NEW_BOUND = 1<<2
};
template<class View>
forceinline ExecStatus
prop_nary_max_bnd(Space& home, Propagator& p,
ViewArray<View>& x, View y, PropCond pc) {
rerun:
assert(x.size() > 0);
int maxmax = x[0].max();
int maxmin = x[0].min();
for (int i=1; i<x.size(); i++) {
maxmax = std::max(x[i].max(),maxmax);
maxmin = std::max(x[i].min(),maxmin);
}
GECODE_ME_CHECK(y.lq(home,maxmax));
GECODE_ME_CHECK(y.gq(home,maxmin));
maxmin = y.min();
maxmax = y.max();
int status = MPS_ASSIGNED;
for (int i=x.size(); i--; ) {
ModEvent me = x[i].lq(home,maxmax);
if (me == ME_INT_FAILED)
return ES_FAILED;
if (me_modified(me) && (x[i].max() != maxmax))
status |= MPS_NEW_BOUND;
if (x[i].max() < maxmin) {
x.move_lst(i,home,p,pc);
status |= MPS_REMOVED;
} else if (!x[i].assigned())
status &= ~MPS_ASSIGNED;
}
if (x.size() == 0)
return ES_FAILED;
if ((status & MPS_REMOVED) != 0)
goto rerun;
if (((status & MPS_ASSIGNED) != 0) && y.assigned())
return home.ES_SUBSUMED(p);
return ((status & MPS_NEW_BOUND) != 0) ? ES_NOFIX : ES_FIX;
}
template<class View>
ExecStatus
NaryMaxBnd<View>::propagate(Space& home, const ModEventDelta&) {
ExecStatus es = prop_nary_max_bnd(home,*this,x,y,PC_INT_BND);
GECODE_ES_CHECK(es);
if (x.size() == 1)
GECODE_REWRITE(*this,(Rel::EqBnd<View,View>::post(home(*this),x[0],y)));
return es;
}
/*
* Ternary domain consistent maximum
*
*/
template<class View>
forceinline
MaxDom<View>::MaxDom(Home home, View x0, View x1, View x2)
: TernaryPropagator<View,PC_INT_DOM>(home,x0,x1,x2) {}
template<class View>
ExecStatus
MaxDom<View>::post(Home home, View x0, View x1, View x2) {
GECODE_ME_CHECK(x2.gq(home,std::max(x0.min(),x1.min())));
GECODE_ME_CHECK(x2.lq(home,std::max(x0.max(),x1.max())));
if (x0 == x1)
return Rel::EqDom<View,View>::post(home,x0,x2);
if (x0 == x2)
return Rel::Lq<View,View>::post(home,x1,x2);
if (x1 == x2)
return Rel::Lq<View,View>::post(home,x0,x2);
(void) new (home) MaxDom<View>(home,x0,x1,x2);
return ES_OK;
}
template<class View>
forceinline
MaxDom<View>::MaxDom(Space& home, MaxDom<View>& p)
: TernaryPropagator<View,PC_INT_DOM>(home,p) {}
template<class View>
forceinline
MaxDom<View>::MaxDom(Space& home, Propagator& p,
View x0, View x1, View x2)
: TernaryPropagator<View,PC_INT_DOM>(home,p,x0,x1,x2) {}
template<class View>
Actor*
MaxDom<View>::copy(Space& home) {
return new (home) MaxDom<View>(home,*this);
}
template<class View>
PropCost
MaxDom<View>::cost(const Space&, const ModEventDelta& med) const {
return PropCost::ternary((View::me(med) == ME_INT_DOM) ?
PropCost::HI : PropCost::LO);
}
template<class View>
ExecStatus
MaxDom<View>::propagate(Space& home, const ModEventDelta& med) {
if (View::me(med) != ME_INT_DOM) {
GECODE_ES_CHECK(prop_max_bnd(home,x0,x1,x2));
if ((x0.max() <= x1.min()) || (x0.max() < x2.min()))
GECODE_REWRITE(*this,(Rel::EqDom<View,View>::post(home(*this),x1,x2)));
if ((x1.max() <= x0.min()) || (x1.max() < x2.min()))
GECODE_REWRITE(*this,(Rel::EqDom<View,View>::post(home(*this),x0,x2)));
return x0.assigned() && x1.assigned() && x2.assigned() ?
home.ES_SUBSUMED(*this) :
home.ES_NOFIX_PARTIAL(*this,View::med(ME_INT_DOM));
}
ViewRanges<View> r0(x0), r1(x1);
Iter::Ranges::Union<ViewRanges<View>,ViewRanges<View> > u(r0,r1);
GECODE_ME_CHECK(x2.inter_r(home,u,false));
if (rtest_nq_dom(x0,x2) == RT_TRUE) {
GECODE_ES_CHECK((Rel::Lq<View,View>::post(Home(home),x0,x2)));
GECODE_REWRITE(*this,(Rel::EqDom<View,View>::post(home(*this),x1,x2)));
}
if (rtest_nq_dom(x1,x2) == RT_TRUE) {
GECODE_ES_CHECK((Rel::Lq<View,View>::post(Home(home),x1,x2)));
GECODE_REWRITE(*this,(Rel::EqDom<View,View>::post(home(*this),x0,x2)));
}
return ES_FIX;
}
/*
* Nary domain consistent maximum
*
*/
template<class View>
forceinline
NaryMaxDom<View>::NaryMaxDom(Home home, ViewArray<View>& x, View y)
: NaryOnePropagator<View,PC_INT_DOM>(home,x,y) {}
template<class View>
ExecStatus
NaryMaxDom<View>::post(Home home, ViewArray<View>& x, View y) {
assert(x.size() > 0);
x.unique();
if (x.size() == 1)
return Rel::EqDom<View,View>::post(home,x[0],y);
if (x.size() == 2)
return MaxDom<View>::post(home,x[0],x[1],y);
int l = x[0].min();
int u = x[0].max();
for (int i=0; i<x.size(); i++) {
l = std::max(l,x[i].min());
u = std::max(u,x[i].max());
}
GECODE_ME_CHECK(y.gq(home,l));
GECODE_ME_CHECK(y.lq(home,u));
if (x.same(y)) {
// Check whether y occurs in x
for (int i=0; i<x.size(); i++)
GECODE_ES_CHECK((Rel::Lq<View,View>::post(home,x[i],y)));
} else {
(void) new (home) NaryMaxDom<View>(home,x,y);
}
return ES_OK;
}
template<class View>
forceinline
NaryMaxDom<View>::NaryMaxDom(Space& home, NaryMaxDom<View>& p)
: NaryOnePropagator<View,PC_INT_DOM>(home,p) {}
template<class View>
Actor*
NaryMaxDom<View>::copy(Space& home) {
if (x.size() == 1)
return new (home) Rel::EqDom<View,View>(home,*this,x[0],y);
if (x.size() == 2)
return new (home) MaxDom<View>(home,*this,x[0],x[1],y);
return new (home) NaryMaxDom<View>(home,*this);
}
template<class View>
PropCost
NaryMaxDom<View>::cost(const Space&, const ModEventDelta& med) const {
if (View::me(med) == ME_INT_DOM)
return PropCost::linear(PropCost::HI, y.size());
else
return PropCost::linear(PropCost::LO, x.size());
}
template<class View>
ExecStatus
NaryMaxDom<View>::propagate(Space& home, const ModEventDelta& med) {
if (View::me(med) != ME_INT_DOM) {
ExecStatus es = prop_nary_max_bnd(home,*this,x,y,PC_INT_DOM);
GECODE_ES_CHECK(es);
return (es == ES_FIX) ?
home.ES_FIX_PARTIAL(*this,View::med(ME_INT_DOM)) :
home.ES_NOFIX_PARTIAL(*this,View::med(ME_INT_DOM));
}
Region r;
ViewRanges<View>* i_x = r.alloc<ViewRanges<View> >(x.size());
for (int i=0; i<x.size(); i++) {
ViewRanges<View> i_xi(x[i]); i_x[i]=i_xi;
}
Iter::Ranges::NaryUnion u(r, i_x, x.size());
GECODE_ME_CHECK(y.inter_r(home,u,false));
for (int i = x.size(); i--; )
if (rtest_nq_dom(x[i],y) == RT_TRUE) {
GECODE_ES_CHECK((Rel::Lq<View,View>::post(Home(home),x[i],y)));
x.move_lst(i,home,*this,PC_INT_DOM);
}
assert(x.size() > 0);
if (x.size() == 1)
GECODE_REWRITE(*this,(Rel::EqDom<View,View>::post(home(*this),x[0],y)));
return ES_FIX;
}
}}}
// STATISTICS: int-prop
Gecode::Actor
Base-class for both propagators and branchers.
Definition core.hpp:628
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::Int::Arithmetic::MaxBnd
Bounds consistent ternary maximum propagator.
Definition arithmetic.hh:131
Gecode::Int::Arithmetic::MaxBnd::MaxBnd
MaxBnd(Space &home, MaxBnd &p)
Constructor for cloning p.
Gecode::Int::Arithmetic::MaxBnd::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition max.hpp:112
Gecode::Int::Arithmetic::MaxBnd::post
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
Definition max.hpp:80
Gecode::Int::Arithmetic::MaxBnd::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition max.hpp:106
Gecode::Int::Arithmetic::MaxDom
Domain consistent ternary maximum propagator.
Definition arithmetic.hh:184
Gecode::Int::Arithmetic::MaxDom::post
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
Definition max.hpp:242
Gecode::Int::Arithmetic::MaxDom::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition max.hpp:281
Gecode::Int::Arithmetic::MaxDom::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition max.hpp:268
Gecode::Int::Arithmetic::MaxDom::MaxDom
MaxDom(Space &home, MaxDom &p)
Constructor for cloning p.
Gecode::Int::Arithmetic::MaxDom::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition max.hpp:274
Gecode::Int::Arithmetic::NaryMaxBnd
Bounds consistent n-ary maximum propagator.
Definition arithmetic.hh:159
Gecode::Int::Arithmetic::NaryMaxBnd::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition max.hpp:166
Gecode::Int::Arithmetic::NaryMaxBnd::NaryMaxBnd
NaryMaxBnd(Space &home, NaryMaxBnd &p)
Constructor for cloning p.
Gecode::Int::Arithmetic::NaryMaxBnd::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition max.hpp:221
Gecode::Int::Arithmetic::NaryMaxBnd::post
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
Definition max.hpp:134
Gecode::Int::Arithmetic::NaryMaxDom
Domain consistent n-ary maximum propagator.
Definition arithmetic.hh:219
Gecode::Int::Arithmetic::NaryMaxDom::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition max.hpp:350
Gecode::Int::Arithmetic::NaryMaxDom::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition max.hpp:360
Gecode::Int::Arithmetic::NaryMaxDom::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition max.hpp:369
Gecode::Int::Arithmetic::NaryMaxDom::post
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
Definition max.hpp:318
Gecode::Int::Arithmetic::NaryMaxDom::NaryMaxDom
NaryMaxDom(Space &home, NaryMaxDom &p)
Constructor for cloning p.
Gecode::Int::Rel::EqBnd
Binary bounds consistent equality propagator.
Definition rel.hh:134
Gecode::Int::Rel::EqBnd::post
static ExecStatus post(Home home, View0 x0, View1 x1)
Post bounds consistent propagator .
Definition eq.hpp:108
Gecode::Int::Rel::EqDom
Binary domain consistent equality propagator.
Definition rel.hh:68
Gecode::Int::Rel::EqDom::post
static ExecStatus post(Home home, View0 x0, View1 x1)
Post domain consistent propagator .
Definition eq.hpp:176
Gecode::Int::Rel::Lq::post
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition lq-le.hpp:50
Gecode::Int::ViewRanges
Range iterator for integer views.
Definition view.hpp:54
Gecode::Iter::Ranges::NaryUnion
Range iterator for union of iterators.
Definition ranges-union.hpp:74
Gecode::Iter::Ranges::Union
Range iterator for computing union (binary).
Definition ranges-union.hpp:44
Gecode::NaryOnePropagator
(n+1)-ary propagator
Definition pattern.hpp:172
Gecode::NaryOnePropagator< View, PC_INT_BND >::x
ViewArray< View > x
Definition pattern.hpp:175
Gecode::NaryOnePropagator< View, PC_INT_BND >::NaryOnePropagator
NaryOnePropagator(Space &home, NaryOnePropagator &p)
Gecode::NaryOnePropagator< View, PC_INT_BND >::y
View y
Definition pattern.hpp:177
Gecode::PropCost
Propagation cost.
Definition core.hpp:486
Gecode::PropCost::ternary
static PropCost ternary(PropCost::Mod m)
Three variables for modifier pcm.
Definition core.hpp:4805
Gecode::PropCost::linear
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
Definition core.hpp:4796
Gecode::PropCost::LO
@ LO
Cheap.
Definition core.hpp:513
Gecode::PropCost::HI
@ HI
Expensive.
Definition core.hpp:514
Gecode::Propagator
Base-class for propagators.
Definition core.hpp:1064
Gecode::Propagator::Space
friend class Space
Definition core.hpp:1066
Gecode::Propagator::med
ModEventDelta med
A set of modification events (used during propagation).
Definition core.hpp:1075
Gecode::Propagator::Propagator
Propagator(Home home)
Constructor for posting.
Definition core.hpp:3498
Gecode::Region
Handle to region.
Definition region.hpp:55
Gecode::Space
Computation spaces.
Definition core.hpp:1742
Gecode::TernaryPropagator
Ternary propagator.
Definition pattern.hpp:113
Gecode::TernaryPropagator< View, PC_INT_BND >::x2
View x2
Definition pattern.hpp:116
Gecode::TernaryPropagator< View, PC_INT_BND >::x1
View x1
Definition pattern.hpp:116
Gecode::TernaryPropagator< View, PC_INT_BND >::x0
View x0
Definition pattern.hpp:116
Gecode::TernaryPropagator< View, PC_INT_BND >::TernaryPropagator
TernaryPropagator(Space &home, TernaryPropagator &p)
Gecode::View
Gecode::ViewArray
View arrays.
Definition array.hpp:253
Gecode::ViewArray::move_lst
void move_lst(int i)
Move view from position size()-1 to position i (truncate array by one).
Definition array.hpp:1236
Gecode::ViewArray::size
int size(void) const
Return size of array (number of elements).
Definition array.hpp:1156
Gecode::Space::ES_NOFIX_PARTIAL
ExecStatus ES_NOFIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has not computed partial fixpoint
Definition core.hpp:3576
Gecode::Space::ES_FIX_PARTIAL
ExecStatus ES_FIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has computed partial fixpoint
Definition core.hpp:3569
Gecode::Space::ES_SUBSUMED
ExecStatus ES_SUBSUMED(Propagator &p)
Definition core.hpp:3563
Gecode::ModEventDelta
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
GECODE_ME_CHECK
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Definition macros.hpp:52
GECODE_REWRITE
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
Definition macros.hpp:116
Gecode::me_failed
bool me_failed(ModEvent me)
Check whether modification event me is failed.
Definition modevent.hpp:54
GECODE_ES_CHECK
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Definition macros.hpp:91
Gecode::me_modified
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
Definition modevent.hpp:59
rel.hh
Gecode::Int::Arithmetic
Numerical (arithmetic) propagators.
Gecode::Int::Arithmetic::prop_nary_max_bnd
ExecStatus prop_nary_max_bnd(Space &home, Propagator &p, ViewArray< View > &x, View y, PropCond pc)
Definition max.hpp:183
Gecode::Int::Arithmetic::prop_max_bnd
ExecStatus prop_max_bnd(Space &home, View x0, View x1, View x2)
Definition max.hpp:45
Gecode::Int::Arithmetic::MaxPropStatus
MaxPropStatus
Status of propagation for nary max.
Definition max.hpp:175
Gecode::Int::Arithmetic::MPS_REMOVED
@ MPS_REMOVED
A view is removed.
Definition max.hpp:177
Gecode::Int::Arithmetic::MPS_NEW_BOUND
@ MPS_NEW_BOUND
Telling has found a new upper bound.
Definition max.hpp:178
Gecode::Int::Arithmetic::MPS_ASSIGNED
@ MPS_ASSIGNED
All views are assigned.
Definition max.hpp:176
Gecode::Int
Finite domain integers.
Gecode::Int::rtest_nq_dom
RelTest rtest_nq_dom(VX x, VY y)
Test whether views x and y are different (use full domain information).
Definition rel-test.hpp:126
Gecode::Int::PC_INT_BND
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Definition var-type.hpp:91
Gecode::Int::ME_INT_FAILED
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
Definition var-type.hpp:52
Gecode::Int::PC_INT_DOM
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Definition var-type.hpp:100
Gecode::Int::ME_INT_DOM
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
Definition var-type.hpp:72
Gecode::Int::RT_TRUE
@ RT_TRUE
Relation does hold.
Definition view.hpp:1737
Gecode
Gecode toplevel namespace
Gecode::mod
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition arithmetic.cpp:360
Gecode::min
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:67
Gecode::ExecStatus
ExecStatus
Definition core.hpp:472
Gecode::ES_OK
@ ES_OK
Execution is okay.
Definition core.hpp:476
Gecode::ES_FIX
@ ES_FIX
Propagation has computed fixpoint.
Definition core.hpp:477
Gecode::ES_FAILED
@ ES_FAILED
Execution has resulted in failure.
Definition core.hpp:474
Gecode::ES_NOFIX
@ ES_NOFIX
Propagation has not computed fixpoint.
Definition core.hpp:475
Gecode::max
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:49
Gecode::PropCond
int PropCond
Type for propagation conditions.
Definition core.hpp:72
Gecode::ModEvent
int ModEvent
Type for modification events.
Definition core.hpp:62
forceinline
#define forceinline
Definition config.hpp:187