rel.cpp
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, 2002
*
* 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>
#include <gecode/int/bool.hh>
#include <algorithm>
namespace Gecode {
void
rel(Home home, IntVar x0, IntRelType irt, int n, IntPropLevel) {
using namespace Int;
Limits::check(n,"Int::rel");
GECODE_POST;
IntView x(x0);
switch (irt) {
case IRT_EQ: GECODE_ME_FAIL(x.eq(home,n)); break;
case IRT_NQ: GECODE_ME_FAIL(x.nq(home,n)); break;
case IRT_LQ: GECODE_ME_FAIL(x.lq(home,n)); break;
case IRT_LE: GECODE_ME_FAIL(x.le(home,n)); break;
case IRT_GQ: GECODE_ME_FAIL(x.gq(home,n)); break;
case IRT_GR: GECODE_ME_FAIL(x.gr(home,n)); break;
default: throw UnknownRelation("Int::rel");
}
}
void
rel(Home home, const IntVarArgs& x, IntRelType irt, int n, IntPropLevel) {
using namespace Int;
Limits::check(n,"Int::rel");
GECODE_POST;
switch (irt) {
case IRT_EQ:
for (int i=0; i<x.size(); i++) {
IntView xi(x[i]); GECODE_ME_FAIL(xi.eq(home,n));
}
break;
case IRT_NQ:
for (int i=0; i<x.size(); i++) {
IntView xi(x[i]); GECODE_ME_FAIL(xi.nq(home,n));
}
break;
case IRT_LQ:
for (int i=0; i<x.size(); i++) {
IntView xi(x[i]); GECODE_ME_FAIL(xi.lq(home,n));
}
break;
case IRT_LE:
for (int i=0; i<x.size(); i++) {
IntView xi(x[i]); GECODE_ME_FAIL(xi.le(home,n));
}
break;
case IRT_GQ:
for (int i=0; i<x.size(); i++) {
IntView xi(x[i]); GECODE_ME_FAIL(xi.gq(home,n));
}
break;
case IRT_GR:
for (int i=0; i<x.size(); i++) {
IntView xi(x[i]); GECODE_ME_FAIL(xi.gr(home,n));
}
break;
default:
throw UnknownRelation("Int::rel");
}
}
void
rel(Home home, IntVar x0, IntRelType irt, IntVar x1, IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
switch (irt) {
case IRT_EQ:
if ((vbd(ipl) == IPL_DOM) || (vbd(ipl) == IPL_DEF)) {
GECODE_ES_FAIL((Rel::EqDom<IntView,IntView>::post(home,x0,x1)));
} else {
GECODE_ES_FAIL((Rel::EqBnd<IntView,IntView>::post(home,x0,x1)));
}
break;
case IRT_NQ:
GECODE_ES_FAIL((Rel::Nq<IntView,IntView>::post(home,x0,x1))); break;
case IRT_GQ:
std::swap(x0,x1); // Fall through
case IRT_LQ:
GECODE_ES_FAIL((Rel::Lq<IntView,IntView>::post(home,x0,x1))); break;
case IRT_GR:
std::swap(x0,x1); // Fall through
case IRT_LE:
GECODE_ES_FAIL((Rel::Le<IntView,IntView>::post(home,x0,x1))); break;
default:
throw UnknownRelation("Int::rel");
}
}
void
rel(Home home, const IntVarArgs& x, IntRelType irt, IntVar y,
IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
switch (irt) {
case IRT_EQ:
{
ViewArray<IntView> xv(home,x.size()+1);
xv[x.size()]=y;
for (int i=0; i<x.size(); i++)
xv[i]=x[i];
if ((vbd(ipl) == IPL_DOM) || (vbd(ipl) == IPL_DEF)) {
GECODE_ES_FAIL(Rel::NaryEqDom<IntView>::post(home,xv));
} else {
GECODE_ES_FAIL(Rel::NaryEqBnd<IntView>::post(home,xv));
}
}
break;
case IRT_NQ:
for (int i=0; i<x.size(); i++) {
GECODE_ES_FAIL((Rel::Nq<IntView,IntView>::post(home,x[i],y)));
}
break;
case IRT_GQ:
for (int i=0; i<x.size(); i++) {
GECODE_ES_FAIL((Rel::Lq<IntView,IntView>::post(home,y,x[i])));
}
break;
case IRT_LQ:
for (int i=0; i<x.size(); i++) {
GECODE_ES_FAIL((Rel::Lq<IntView,IntView>::post(home,x[i],y)));
}
break;
case IRT_GR:
for (int i=0; i<x.size(); i++) {
GECODE_ES_FAIL((Rel::Le<IntView,IntView>::post(home,y,x[i])));
}
break;
case IRT_LE:
for (int i=0; i<x.size(); i++) {
GECODE_ES_FAIL((Rel::Le<IntView,IntView>::post(home,x[i],y)));
}
break;
default:
throw UnknownRelation("Int::rel");
}
}
void
rel(Home home, IntVar x0, IntRelType irt, IntVar x1, Reify r,
IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
switch (irt) {
case IRT_EQ:
if ((vbd(ipl) == IPL_DOM) || (vbd(ipl) == IPL_DEF)) {
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReEqDom<IntView,BoolView,RM_EQV>
::post(home,x0,x1,r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReEqDom<IntView,BoolView,RM_IMP>
::post(home,x0,x1,r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReEqDom<IntView,BoolView,RM_PMI>
::post(home,x0,x1,r.var())));
break;
default: throw UnknownReifyMode("Int::rel");
}
} else {
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReEqBnd<IntView,BoolView,RM_EQV>
::post(home,x0,x1,r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReEqBnd<IntView,BoolView,RM_IMP>
::post(home,x0,x1,r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReEqBnd<IntView,BoolView,RM_PMI>
::post(home,x0,x1,r.var())));
break;
default: throw UnknownReifyMode("Int::rel");
}
}
break;
case IRT_NQ:
{
NegBoolView n(r.var());
if (vbd(ipl) == IPL_BND) {
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReEqBnd<IntView,NegBoolView,RM_EQV>
::post(home,x0,x1,n)));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReEqBnd<IntView,NegBoolView,RM_PMI>
::post(home,x0,x1,n)));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReEqBnd<IntView,NegBoolView,RM_IMP>
::post(home,x0,x1,n)));
break;
default: throw UnknownReifyMode("Int::rel");
}
} else {
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReEqDom<IntView,NegBoolView,RM_EQV>
::post(home,x0,x1,n)));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReEqDom<IntView,NegBoolView,RM_PMI>
::post(home,x0,x1,n)));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReEqDom<IntView,NegBoolView,RM_IMP>
::post(home,x0,x1,n)));
break;
default: throw UnknownReifyMode("Int::rel");
}
}
}
break;
case IRT_GQ:
std::swap(x0,x1); // Fall through
case IRT_LQ:
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReLq<IntView,BoolView,RM_EQV>
::post(home,x0,x1,r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReLq<IntView,BoolView,RM_IMP>
::post(home,x0,x1,r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReLq<IntView,BoolView,RM_PMI>
::post(home,x0,x1,r.var())));
break;
default: throw UnknownReifyMode("Int::rel");
}
break;
case IRT_LE:
std::swap(x0,x1); // Fall through
case IRT_GR:
{
NegBoolView n(r.var());
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReLq<IntView,NegBoolView,RM_EQV>
::post(home,x0,x1,n)));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReLq<IntView,NegBoolView,RM_PMI>
::post(home,x0,x1,n)));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReLq<IntView,NegBoolView,RM_IMP>
::post(home,x0,x1,n)));
break;
default: throw UnknownReifyMode("Int::rel");
}
}
break;
default:
throw UnknownRelation("Int::rel");
}
}
void
rel(Home home, IntVar x, IntRelType irt, int n, Reify r,
IntPropLevel ipl) {
using namespace Int;
Limits::check(n,"Int::rel");
GECODE_POST;
switch (irt) {
case IRT_EQ:
if ((vbd(ipl) == IPL_DOM) || (vbd(ipl) == IPL_DEF)) {
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReEqDomInt<IntView,BoolView,RM_EQV>
::post(home,x,n,r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReEqDomInt<IntView,BoolView,RM_IMP>
::post(home,x,n,r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReEqDomInt<IntView,BoolView,RM_PMI>
::post(home,x,n,r.var())));
break;
default: throw UnknownReifyMode("Int::rel");
}
} else {
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReEqBndInt<IntView,BoolView,RM_EQV>
::post(home,x,n,r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReEqBndInt<IntView,BoolView,RM_IMP>
::post(home,x,n,r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReEqBndInt<IntView,BoolView,RM_PMI>
::post(home,x,n,r.var())));
break;
default: throw UnknownReifyMode("Int::rel");
}
}
break;
case IRT_NQ:
{
NegBoolView nb(r.var());
if (vbd(ipl) == IPL_BND) {
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReEqBndInt<IntView,NegBoolView,RM_EQV>
::post(home,x,n,nb)));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReEqBndInt<IntView,NegBoolView,RM_PMI>
::post(home,x,n,nb)));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReEqBndInt<IntView,NegBoolView,RM_IMP>
::post(home,x,n,nb)));
break;
default: throw UnknownReifyMode("Int::rel");
}
} else {
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReEqDomInt<IntView,NegBoolView,RM_EQV>
::post(home,x,n,nb)));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReEqDomInt<IntView,NegBoolView,RM_PMI>
::post(home,x,n,nb)));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReEqDomInt<IntView,NegBoolView,RM_IMP>
::post(home,x,n,nb)));
break;
default: throw UnknownReifyMode("Int::rel");
}
}
}
break;
case IRT_LE:
n--; // Fall through
case IRT_LQ:
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReLqInt<IntView,BoolView,RM_EQV>
::post(home,x,n,r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReLqInt<IntView,BoolView,RM_IMP>
::post(home,x,n,r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReLqInt<IntView,BoolView,RM_PMI>
::post(home,x,n,r.var())));
break;
default: throw UnknownReifyMode("Int::rel");
}
break;
case IRT_GQ:
n--; // Fall through
case IRT_GR:
{
NegBoolView nb(r.var());
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL((Rel::ReLqInt<IntView,NegBoolView,RM_EQV>
::post(home,x,n,nb)));
break;
case RM_IMP:
GECODE_ES_FAIL((Rel::ReLqInt<IntView,NegBoolView,RM_PMI>
::post(home,x,n,nb)));
break;
case RM_PMI:
GECODE_ES_FAIL((Rel::ReLqInt<IntView,NegBoolView,RM_IMP>
::post(home,x,n,nb)));
break;
default: throw UnknownReifyMode("Int::rel");
}
}
break;
default:
throw UnknownRelation("Int::rel");
}
}
void
rel(Home home, const IntVarArgs& x, IntRelType irt,
IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
if ((irt != IRT_NQ) && (x.size() < 2))
return;
switch (irt) {
case IRT_EQ:
{
ViewArray<IntView> xv(home,x);
if ((vbd(ipl) == IPL_DOM) || (vbd(ipl) == IPL_DEF)) {
GECODE_ES_FAIL(Rel::NaryEqDom<IntView>::post(home,xv));
} else {
GECODE_ES_FAIL(Rel::NaryEqBnd<IntView>::post(home,xv));
}
}
break;
case IRT_NQ:
{
ViewArray<IntView> y(home,x);
GECODE_ES_FAIL((Rel::NaryNq<IntView>::post(home,y)));
}
break;
case IRT_LE:
{
ViewArray<IntView> y(home,x);
GECODE_ES_FAIL((Rel::NaryLqLe<IntView,1>::post(home,y)));
}
break;
case IRT_LQ:
{
ViewArray<IntView> y(home,x);
GECODE_ES_FAIL((Rel::NaryLqLe<IntView,0>::post(home,y)));
}
break;
case IRT_GR:
{
ViewArray<IntView> y(home,x.size());
for (int i=0; i<x.size(); i++)
y[i] = x[x.size()-1-i];
GECODE_ES_FAIL((Rel::NaryLqLe<IntView,1>::post(home,y)));
}
break;
case IRT_GQ:
{
ViewArray<IntView> y(home,x.size());
for (int i=0; i<x.size(); i++)
y[i] = x[x.size()-1-i];
GECODE_ES_FAIL((Rel::NaryLqLe<IntView,0>::post(home,y)));
}
break;
default:
throw UnknownRelation("Int::rel");
}
}
void
rel(Home home, const IntVarArgs& x, IntRelType irt, const IntVarArgs& y,
IntPropLevel ipl) {
using namespace Int;
GECODE_POST;
switch (irt) {
case IRT_GR:
{
ViewArray<IntView> xv(home,x), yv(home,y);
GECODE_ES_FAIL((Rel::LexLqLe<IntView,IntView>
::post(home,yv,xv,true)));
}
break;
case IRT_LE:
{
ViewArray<IntView> xv(home,x), yv(home,y);
GECODE_ES_FAIL((Rel::LexLqLe<IntView,IntView>
::post(home,xv,yv,true)));
}
break;
case IRT_GQ:
{
ViewArray<IntView> xv(home,x), yv(home,y);
GECODE_ES_FAIL((Rel::LexLqLe<IntView,IntView>
::post(home,yv,xv,false)));
}
break;
case IRT_LQ:
{
ViewArray<IntView> xv(home,x), yv(home,y);
GECODE_ES_FAIL((Rel::LexLqLe<IntView,IntView>
::post(home,xv,yv,false)));
}
break;
case IRT_EQ:
if (x.size() != y.size()) {
home.fail();
} else if ((vbd(ipl) == IPL_DOM) || (vbd(ipl) == IPL_DEF))
for (int i=0; i<x.size(); i++) {
GECODE_ES_FAIL((Rel::EqDom<IntView,IntView>
::post(home,x[i],y[i])));
}
else
for (int i=0; i<x.size(); i++) {
GECODE_ES_FAIL((Rel::EqBnd<IntView,IntView>
::post(home,x[i],y[i])));
}
break;
case IRT_NQ:
{
ViewArray<IntView> xv(home,x), yv(home,y);
GECODE_ES_FAIL((Rel::LexNq<IntView,IntView>
::post(home,xv,yv)));
}
break;
default:
throw UnknownRelation("Int::rel");
}
}
namespace {
ViewArray<Int::ConstIntView>
viewarray(Space& home, const IntArgs& x) {
ViewArray<Int::ConstIntView> xv(home, x.size());
for (int i=0; i<x.size(); i++) {
Int::Limits::check(x[i],"Int::rel");
xv[i] = Int::ConstIntView(x[i]);
}
return xv;
}
}
void
rel(Home home, const IntVarArgs& x, IntRelType irt, const IntArgs& y,
IntPropLevel) {
using namespace Int;
GECODE_POST;
switch (irt) {
case IRT_GR:
{
ViewArray<IntView> xv(home,x);
ViewArray<ConstIntView> yv(viewarray(home,y));
GECODE_ES_FAIL((Rel::LexLqLe<ConstIntView,IntView>
::post(home,yv,xv,true)));
}
break;
case IRT_LE:
{
ViewArray<IntView> xv(home,x);
ViewArray<ConstIntView> yv(viewarray(home,y));
GECODE_ES_FAIL((Rel::LexLqLe<IntView,ConstIntView>
::post(home,xv,yv,true)));
}
break;
case IRT_GQ:
{
ViewArray<IntView> xv(home,x);
ViewArray<ConstIntView> yv(viewarray(home,y));
GECODE_ES_FAIL((Rel::LexLqLe<ConstIntView,IntView>
::post(home,yv,xv,false)));
}
break;
case IRT_LQ:
{
ViewArray<IntView> xv(home,x);
ViewArray<ConstIntView> yv(viewarray(home,y));
GECODE_ES_FAIL((Rel::LexLqLe<IntView,ConstIntView>
::post(home,xv,yv,false)));
}
break;
case IRT_EQ:
if (x.size() != y.size()) {
home.fail();
} else {
for (int i=0; i<x.size(); i++)
GECODE_ME_FAIL(IntView(x[i]).eq(home,y[i]));
}
break;
case IRT_NQ:
{
ViewArray<IntView> xv(home,x);
ViewArray<ConstIntView> yv(viewarray(home,y));
GECODE_ES_FAIL((Rel::LexNq<IntView,ConstIntView>
::post(home,xv,yv)));
}
break;
default:
throw UnknownRelation("Int::rel");
}
}
void
rel(Home home, const IntArgs& x, IntRelType irt, const IntVarArgs& y,
IntPropLevel ipl) {
rel(home,y,irt,x,ipl);
}
}
// STATISTICS: int-post
Gecode::ArgArrayBase::size
int size(void) const
Return size of array (number of elements).
Definition array.hpp:1607
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::Home::fail
void fail(void)
Mark space as failed.
Definition core.hpp:4039
Gecode::IntArgs
Passing integer arguments.
Definition int.hh:628
Gecode::IntVarArgs
Passing integer variables.
Definition int.hh:656
Gecode::IntVar
Integer variables.
Definition int.hh:371
Gecode::Int::IntView
Integer view for integer variables.
Definition view.hpp:129
Gecode::Int::IntView::gr
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition int.hpp:148
Gecode::Int::IntView::lq
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition int.hpp:121
Gecode::Int::IntView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition int.hpp:130
Gecode::Int::IntView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition int.hpp:139
Gecode::Int::IntView::nq
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition int.hpp:157
Gecode::Int::IntView::eq
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition int.hpp:166
Gecode::Int::NegBoolView
Negated Boolean view.
Definition view.hpp:1574
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::Le::post
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition lq-le.hpp:91
Gecode::Int::Rel::LexLqLe
Lexical ordering propagator.
Definition rel.hh:623
Gecode::Int::Rel::LexNq
Lexical disequality propagator.
Definition rel.hh:657
Gecode::Int::Rel::Lq::post
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition lq-le.hpp:50
Gecode::Int::Rel::NaryEqBnd::post
static ExecStatus post(Home home, ViewArray< View > &x)
Post bounds consistent propagator .
Definition eq.hpp:402
Gecode::Int::Rel::NaryEqDom::post
static ExecStatus post(Home home, ViewArray< View > &x)
Post domain consistent propagator .
Definition eq.hpp:270
Gecode::Int::Rel::NaryLqLe::post
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator for .
Definition lq-le.hpp:208
Gecode::Int::Rel::NaryNq::post
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator .
Definition nq.hpp:118
Gecode::Int::Rel::Nq::post
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition nq.hpp:49
Gecode::Int::Rel::ReEqBndInt
Reified bounds consistent equality with integer propagator.
Definition rel.hh:425
Gecode::Int::Rel::ReEqBnd
Reified binary bounds consistent equality propagator.
Definition rel.hh:372
Gecode::Int::Rel::ReEqDomInt
Reified domain consistent equality with integer propagator.
Definition rel.hh:398
Gecode::Int::Rel::ReEqDom
Reified binary domain consistent equality propagator.
Definition rel.hh:346
Gecode::Int::Rel::ReLqInt
Reified less or equal with integer propagator.
Definition rel.hh:575
Gecode::Int::Rel::ReLq
Reified less or equal propagator.
Definition rel.hh:548
Gecode::Int::UnknownReifyMode
Exception: Unknown reification mode passed as argument
Definition exception.hpp:115
Gecode::Int::UnknownRelation
Exception: Unknown relation passed as argument
Definition exception.hpp:87
Gecode::Reify
Reification specification.
Definition int.hh:876
Gecode::ViewArray
View arrays.
Definition array.hpp:253
GECODE_POST
#define GECODE_POST
Check for failure in a constraint post function.
Definition macros.hpp:40
GECODE_ES_FAIL
#define GECODE_ES_FAIL(es)
Check whether execution status es is failed, and fail space home.
Definition macros.hpp:103
GECODE_ME_FAIL
#define GECODE_ME_FAIL(me)
Check whether modification event me is failed, and fail space home.
Definition macros.hpp:77
Gecode::rel
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
Definition rel.cpp:68
Gecode::IntRelType
IntRelType
Relation types for integers.
Definition int.hh:925
Gecode::IntPropLevel
IntPropLevel
Propagation levels for integer propagators.
Definition int.hh:974
Gecode::IRT_EQ
@ IRT_EQ
Equality ( ).
Definition int.hh:926
Gecode::IRT_NQ
@ IRT_NQ
Disequality ( ).
Definition int.hh:927
Gecode::IRT_GQ
@ IRT_GQ
Greater or equal ( ).
Definition int.hh:930
Gecode::IRT_LE
@ IRT_LE
Less ( ).
Definition int.hh:929
Gecode::IRT_GR
@ IRT_GR
Greater ( ).
Definition int.hh:931
Gecode::IRT_LQ
@ IRT_LQ
Less or equal ( ).
Definition int.hh:928
Gecode::RM_IMP
@ RM_IMP
Implication for reification.
Definition int.hh:862
Gecode::RM_PMI
@ RM_PMI
Inverse implication for reification.
Definition int.hh:869
Gecode::RM_EQV
@ RM_EQV
Equivalence for reification (default).
Definition int.hh:855
Gecode::IPL_DOM
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
Definition int.hh:979
Gecode::IPL_DEF
@ IPL_DEF
Simple propagation levels.
Definition int.hh:976
Gecode::IPL_BND
@ IPL_BND
Bounds propagation.
Definition int.hh:978
bool.hh
rel.hh
Gecode::Int::Limits::check
void check(int n, const char *l)
Check whether n is in range, otherwise throw out of limits with information l.
Definition limits.hpp:46
Gecode::Int
Finite domain integers.
Gecode
Gecode toplevel namespace
Gecode::vbd
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
Definition ipl.hpp:37
Gecode::post
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
Definition filter.cpp:138