dom.cpp
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Guido Tack <tack@gecode.org>
*
* Contributing authors:
* Gabor Szokoli <szokoli@gecode.org>
*
* Copyright:
* Guido Tack, 2004, 2005
*
* 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/set.hh>
#include <gecode/set/rel.hh>
namespace Gecode {
void
dom(Home home, SetVar s, SetRelType r, int i) {
Set::Limits::check(i, "Set::dom");
IntSet d(i,i);
dom(home, s, r, d);
}
void
dom(Home home, const SetVarArgs& s, SetRelType r, int i) {
Set::Limits::check(i, "Set::dom");
IntSet d(i,i);
dom(home, s, r, d);
}
void
dom(Home home, SetVar s, SetRelType r, int i, int j) {
Set::Limits::check(i, "Set::dom");
Set::Limits::check(j, "Set::dom");
IntSet d(i,j);
dom(home, s, r, d);
}
void
dom(Home home, const SetVarArgs& s, SetRelType r, int i, int j) {
Set::Limits::check(i, "Set::dom");
Set::Limits::check(j, "Set::dom");
IntSet d(i,j);
dom(home, s, r, d);
}
void
dom(Home home, SetVar s, SetRelType r, const IntSet& is) {
Set::Limits::check(is, "Set::dom");
GECODE_POST;
Set::SetView _s(s);
switch (r) {
case SRT_EQ:
{
if (is.ranges() == 1) {
GECODE_ME_FAIL(_s.include(home, is.min(), is.max()));
GECODE_ME_FAIL(_s.intersect(home, is.min(), is.max()));
} else {
IntSetRanges rd1(is);
GECODE_ME_FAIL(_s.includeI(home, rd1));
IntSetRanges rd2(is);
GECODE_ME_FAIL(_s.intersectI(home, rd2));
}
}
break;
case SRT_LQ:
{
Set::ConstSetView cv(home, is);
GECODE_ES_FAIL(
(Set::Rel::Lq<Set::SetView,Set::ConstSetView,false>
::post(home,s,cv)));
}
break;
case SRT_LE:
{
Set::ConstSetView cv(home, is);
GECODE_ES_FAIL(
(Set::Rel::Lq<Set::SetView,Set::ConstSetView,true>
::post(home,s,cv)));
}
break;
case SRT_GQ:
{
Set::ConstSetView cv(home, is);
GECODE_ES_FAIL(
(Set::Rel::Lq<Set::ConstSetView,Set::SetView,false>
::post(home,cv,s)));
}
break;
case SRT_GR:
{
Set::ConstSetView cv(home, is);
GECODE_ES_FAIL(
(Set::Rel::Lq<Set::ConstSetView,Set::SetView,true>
::post(home,cv,s)));
}
break;
case SRT_DISJ:
{
if (is.ranges() == 1) {
GECODE_ME_FAIL(_s.exclude(home, is.min(), is.max()));
} else {
IntSetRanges rd(is);
GECODE_ME_FAIL(_s.excludeI(home, rd));
}
}
break;
case SRT_NQ:
{
Set::ConstSetView cv(home, is);
GECODE_ES_FAIL(
(Set::Rel::DistinctDoit<Set::SetView>::post(home, s,
cv)));
}
break;
case SRT_SUB:
{
if (is.ranges() == 1) {
GECODE_ME_FAIL(_s.intersect(home, is.min(), is.max()));
} else {
IntSetRanges rd(is);
GECODE_ME_FAIL(_s.intersectI(home, rd));
}
}
break;
case SRT_SUP:
{
if (is.ranges() == 1) {
GECODE_ME_FAIL(_s.include(home, is.min(), is.max()));
} else {
IntSetRanges rd(is);
GECODE_ME_FAIL(_s.includeI(home, rd));
}
}
break;
case SRT_CMPL:
{
if (is.ranges() == 1) {
GECODE_ME_FAIL(_s.exclude(home, is.min(), is.max()));
GECODE_ME_FAIL(
_s.include(home,
Set::Limits::min,
is.min()-1) );
GECODE_ME_FAIL(
_s.include(home, is.max()+1,
Set::Limits::max) );
} else {
IntSetRanges rd1(is);
Set::RangesCompl<IntSetRanges > rdC1(rd1);
GECODE_ME_FAIL(_s.includeI(home, rdC1));
IntSetRanges rd2(is);
Set::RangesCompl<IntSetRanges > rdC2(rd2);
GECODE_ME_FAIL(_s.intersectI(home, rdC2));
}
}
break;
default:
throw Set::UnknownRelation("Set::dom");
}
}
void
dom(Home home, const SetVarArgs& s, SetRelType r, const IntSet& is) {
Set::Limits::check(is, "Set::dom");
GECODE_POST;
switch (r) {
case SRT_EQ:
{
if (is.ranges() == 1) {
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
GECODE_ME_FAIL(_s.include(home, is.min(), is.max()));
GECODE_ME_FAIL(_s.intersect(home, is.min(), is.max()));
}
} else {
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
IntSetRanges rd1(is);
GECODE_ME_FAIL(_s.includeI(home, rd1));
IntSetRanges rd2(is);
GECODE_ME_FAIL(_s.intersectI(home, rd2));
}
}
}
break;
case SRT_LQ:
{
Set::ConstSetView cv(home, is);
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
GECODE_ES_FAIL((Set::Rel::Lq<Set::SetView,Set::ConstSetView,false>
::post(home,_s,cv)));
}
}
break;
case SRT_LE:
{
Set::ConstSetView cv(home, is);
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
GECODE_ES_FAIL((Set::Rel::Lq<Set::SetView,Set::ConstSetView,true>
::post(home,_s,cv)));
}
}
break;
case SRT_GQ:
{
Set::ConstSetView cv(home, is);
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
GECODE_ES_FAIL((Set::Rel::Lq<Set::ConstSetView,Set::SetView,false>
::post(home,cv,_s)));
}
}
break;
case SRT_GR:
{
Set::ConstSetView cv(home, is);
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
GECODE_ES_FAIL((Set::Rel::Lq<Set::ConstSetView,Set::SetView,true>
::post(home,cv,_s)));
}
}
break;
case SRT_DISJ:
{
if (is.ranges() == 1) {
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
GECODE_ME_FAIL(_s.exclude(home, is.min(), is.max()));
}
} else {
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
IntSetRanges rd(is);
GECODE_ME_FAIL(_s.excludeI(home, rd));
}
}
}
break;
case SRT_NQ:
{
Set::ConstSetView cv(home, is);
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
GECODE_ES_FAIL((Set::Rel::DistinctDoit<Set::SetView>
::post(home,_s,cv)));
}
}
break;
case SRT_SUB:
{
if (is.ranges() == 1) {
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
GECODE_ME_FAIL(_s.intersect(home, is.min(), is.max()));
}
} else {
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
IntSetRanges rd(is);
GECODE_ME_FAIL(_s.intersectI(home, rd));
}
}
}
break;
case SRT_SUP:
{
if (is.ranges() == 1) {
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
GECODE_ME_FAIL(_s.include(home, is.min(), is.max()));
}
} else {
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
IntSetRanges rd(is);
GECODE_ME_FAIL(_s.includeI(home, rd));
}
}
}
break;
case SRT_CMPL:
{
if (is.ranges() == 1) {
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
GECODE_ME_FAIL(_s.exclude(home, is.min(), is.max()));
GECODE_ME_FAIL(_s.include(home,
Set::Limits::min,
is.min()-1) );
GECODE_ME_FAIL(_s.include(home, is.max()+1,
Set::Limits::max) );
}
} else {
for (int i=s.size(); i--; ) {
Set::SetView _s(s[i]);
IntSetRanges rd1(is);
Set::RangesCompl<IntSetRanges > rdC1(rd1);
GECODE_ME_FAIL(_s.includeI(home, rdC1));
IntSetRanges rd2(is);
Set::RangesCompl<IntSetRanges > rdC2(rd2);
GECODE_ME_FAIL(_s.intersectI(home, rdC2));
}
}
}
break;
default:
throw Set::UnknownRelation("Set::dom");
}
}
void
dom(Home home, SetVar s, SetRelType rt, int i, Reify r) {
Set::Limits::check(i, "Set::dom");
IntSet d(i,i);
dom(home, s, rt, d, r);
}
void
dom(Home home, SetVar s, SetRelType rt, int i, int j, Reify r) {
Set::Limits::check(i, "Set::dom");
Set::Limits::check(j, "Set::dom");
IntSet d(i,j);
dom(home, s, rt, d, r);
}
void
dom(Home home, SetVar s, SetRelType rt, const IntSet& is, Reify r) {
Set::Limits::check(is, "Set::dom");
GECODE_POST;
switch (rt) {
case SRT_EQ:
{
Set::ConstSetView cv(home, is);
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL(
(Set::Rel::ReEq<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_EQV>
::post(home, s, cv, r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL(
(Set::Rel::ReEq<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_IMP>
::post(home, s, cv, r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL(
(Set::Rel::ReEq<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_PMI>
::post(home, s, cv, r.var())));
break;
default: throw Gecode::Int::UnknownReifyMode("Set::dom");
}
}
break;
case SRT_LQ:
{
Set::ConstSetView cv(home, is);
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::SetView,
Set::ConstSetView,RM_EQV,false>::post(home, s, cv, r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::SetView,
Set::ConstSetView,RM_IMP,false>::post(home, s, cv, r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::SetView,
Set::ConstSetView,RM_PMI,false>::post(home, s, cv, r.var())));
break;
default: throw Gecode::Int::UnknownReifyMode("Set::dom");
}
}
break;
case SRT_LE:
{
Set::ConstSetView cv(home, is);
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::SetView,
Set::ConstSetView,RM_EQV,true>::post(home, s, cv, r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::SetView,
Set::ConstSetView,RM_IMP,true>::post(home, s, cv, r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::SetView,
Set::ConstSetView,RM_PMI,true>::post(home, s, cv, r.var())));
break;
default: throw Gecode::Int::UnknownReifyMode("Set::dom");
}
}
break;
case SRT_GQ:
{
Set::ConstSetView cv(home, is);
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::ConstSetView,Set::SetView,RM_EQV,false>
::post(home,cv,s,r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::ConstSetView,Set::SetView,RM_IMP,false>
::post(home,cv,s,r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::ConstSetView,Set::SetView,RM_PMI,false>
::post(home,cv,s,r.var())));
break;
default: throw Gecode::Int::UnknownReifyMode("Set::dom");
}
}
break;
case SRT_GR:
{
Set::ConstSetView cv(home, is);
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::ConstSetView,Set::SetView,RM_EQV,true>
::post(home,cv,s,r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::ConstSetView,Set::SetView,RM_IMP,true>
::post(home,cv,s,r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL(
(Set::Rel::ReLq<Set::ConstSetView,Set::SetView,RM_PMI,true>
::post(home,cv,s,r.var())));
break;
default: throw Gecode::Int::UnknownReifyMode("Set::dom");
}
}
break;
case SRT_NQ:
{
Gecode::Int::NegBoolView notb(r.var());
Set::ConstSetView cv(home, is);
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL(
(Set::Rel::ReEq<Set::SetView,
Set::ConstSetView,Gecode::Int::NegBoolView,RM_EQV>
::post(home, s, cv, notb)));
break;
case RM_IMP:
GECODE_ES_FAIL(
(Set::Rel::ReEq<Set::SetView,
Set::ConstSetView,Gecode::Int::NegBoolView,RM_PMI>
::post(home, s, cv, notb)));
break;
case RM_PMI:
GECODE_ES_FAIL(
(Set::Rel::ReEq<Set::SetView,
Set::ConstSetView,Gecode::Int::NegBoolView,RM_IMP>
::post(home, s, cv, notb)));
break;
default: throw Gecode::Int::UnknownReifyMode("Set::dom");
}
}
break;
case SRT_SUB:
{
Set::ConstSetView cv(home, is);
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL(
(Set::Rel::ReSubset<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_EQV>
::post(home, s, cv, r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL(
(Set::Rel::ReSubset<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_IMP>
::post(home, s, cv, r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL(
(Set::Rel::ReSubset<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_PMI>
::post(home, s, cv, r.var())));
break;
default: throw Gecode::Int::UnknownReifyMode("Set::dom");
}
}
break;
case SRT_SUP:
{
Set::ConstSetView cv(home, is);
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL(
(Set::Rel::ReSubset<Set::ConstSetView,Set::SetView,
Gecode::Int::BoolView,RM_EQV>
::post(home, cv, s, r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL(
(Set::Rel::ReSubset<Set::ConstSetView,Set::SetView,
Gecode::Int::BoolView,RM_IMP>
::post(home, cv, s, r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL(
(Set::Rel::ReSubset<Set::ConstSetView,Set::SetView,
Gecode::Int::BoolView,RM_PMI>
::post(home, cv, s, r.var())));
break;
default: throw Gecode::Int::UnknownReifyMode("Set::dom");
}
}
break;
case SRT_DISJ:
{
// x||y <=> b is equivalent to
// ( y <= complement(x) and x<=complement(y) ) <=> b
// compute complement of is
IntSetRanges dr1(is);
Set::RangesCompl<IntSetRanges > dc1(dr1);
IntSet dcompl(dc1);
Set::ConstSetView cvcompl(home, dcompl);
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL(
(Set::Rel::ReSubset<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_EQV>
::post(home, s, cvcompl, r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL(
(Set::Rel::ReSubset<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_IMP>
::post(home, s, cvcompl, r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL(
(Set::Rel::ReSubset<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_PMI>
::post(home, s, cvcompl, r.var())));
break;
default: throw Gecode::Int::UnknownReifyMode("Set::dom");
}
}
break;
case SRT_CMPL:
{
Set::SetView sv(s);
IntSetRanges dr1(is);
Set::RangesCompl<IntSetRanges> dc1(dr1);
IntSet dcompl(dc1);
Set::ConstSetView cvcompl(home, dcompl);
switch (r.mode()) {
case RM_EQV:
GECODE_ES_FAIL(
(Set::Rel::ReEq<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_EQV>
::post(home, s, cvcompl, r.var())));
break;
case RM_IMP:
GECODE_ES_FAIL(
(Set::Rel::ReEq<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_IMP>
::post(home, s, cvcompl, r.var())));
break;
case RM_PMI:
GECODE_ES_FAIL(
(Set::Rel::ReEq<Set::SetView,
Set::ConstSetView,Gecode::Int::BoolView,RM_PMI>
::post(home, s, cvcompl, r.var())));
break;
default: throw Gecode::Int::UnknownReifyMode("Set::dom");
}
}
break;
default:
throw Set::UnknownRelation("Set::dom");
}
}
void
dom(Home home, SetVar x, SetVar d) {
using namespace Set;
GECODE_POST;
SetView xv(x), dv(d);
if (xv != dv) {
GECODE_ME_FAIL(xv.cardMax(home,dv.cardMax()));
GECODE_ME_FAIL(xv.cardMin(home,dv.cardMin()));
GlbRanges<SetView> lb(dv);
GECODE_ME_FAIL(xv.includeI(home,lb));
LubRanges<SetView> ub(dv);
GECODE_ME_FAIL(xv.intersectI(home,ub));
}
}
void
dom(Home home, const SetVarArgs& x, const SetVarArgs& d) {
using namespace Set;
if (x.size() != d.size())
throw ArgumentSizeMismatch("Set::dom");
for (int i=x.size(); i--; ) {
GECODE_POST;
SetView xv(x[i]), dv(d[i]);
if (xv != dv) {
GECODE_ME_FAIL(xv.cardMax(home,dv.cardMax()));
GECODE_ME_FAIL(xv.cardMin(home,dv.cardMin()));
GlbRanges<SetView> lb(dv);
GECODE_ME_FAIL(xv.includeI(home,lb));
LubRanges<SetView> ub(dv);
GECODE_ME_FAIL(xv.intersectI(home,ub));
}
}
}
}
// STATISTICS: set-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::IntSetRanges
Range iterator for integer sets.
Definition int.hh:292
Gecode::IntSet
Integer sets.
Definition int.hh:174
Gecode::IntSet::min
int min(int i) const
Return minimum of range at position i.
Definition int-set-1.hpp:152
Gecode::IntSet::max
int max(int i) const
Return maximum of range at position i.
Definition int-set-1.hpp:158
Gecode::IntSet::ranges
int ranges(void) const
Return number of ranges of the specification.
Definition int-set-1.hpp:171
Gecode::IntSet::size
unsigned int size(void) const
Return size (cardinality) of set.
Definition int-set-1.hpp:198
Gecode::Int::ArgumentSizeMismatch
Exception: Arguments are of different size
Definition exception.hpp:73
Gecode::Int::BoolView
Boolean view for Boolean variables.
Definition view.hpp:1380
Gecode::Int::NegBoolView
Negated Boolean view.
Definition view.hpp:1574
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::SetVarArgs
Passing set variables.
Definition set.hh:488
Gecode::SetVar
Set variables
Definition set.hh:127
Gecode::Set::ConstSetView
Constant view.
Definition view.hpp:186
Gecode::Set::GlbRanges
Range iterator for the greatest lower bound.
Definition var-imp.hpp:359
Gecode::Set::LubRanges
Range iterator for the least upper bound.
Definition var-imp.hpp:317
Gecode::Set::RangesCompl
A complement iterator spezialized for the BndSet limits.
Definition var-imp.hpp:293
Gecode::Set::Rel::DistinctDoit
Propagator for negated equality
Definition rel.hh:296
Gecode::Set::Rel::DistinctDoit::post
static ExecStatus post(Home home, View0 x, ConstSetView y)
Post propagator .
Definition nq.hpp:99
Gecode::Set::Rel::Lq
Propagator for set less than or equal
Definition rel.hh:208
Gecode::Set::Rel::ReEq
Reified equality propagator
Definition rel.hh:174
Gecode::Set::Rel::ReLq
Reified propagator for set less than or equal
Definition rel.hh:234
Gecode::Set::Rel::ReSubset
Reified subset propagator
Definition rel.hh:115
Gecode::Set::SetView
Set view for set variables
Definition view.hpp:56
Gecode::Set::SetView::intersectI
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
Definition set.hpp:164
Gecode::Set::SetView::include
ModEvent include(Space &home, int i, int j)
Update greatest lower bound to include all elements between and including i and j.
Definition set.hpp:126
Gecode::Set::SetView::cardMin
unsigned int cardMin(void) const
Return minimum cardinality.
Definition set.hpp:82
Gecode::Set::SetView::cardMax
unsigned int cardMax(void) const
Return maximum cardinality.
Definition set.hpp:86
Gecode::Set::SetView::intersect
ModEvent intersect(Space &home, int i, int j)
Update least upper bound to contain at most all elements between and including i and j.
Definition set.hpp:141
Gecode::Set::SetView::excludeI
ModEvent excludeI(Space &home, I &i)
Remove range sequence described by i from least upper bound.
Definition set.hpp:160
Gecode::Set::SetView::exclude
ModEvent exclude(Space &home, int i, int j)
Restrict least upper bound to not contain all elements between and including i and j.
Definition set.hpp:156
Gecode::Set::SetView::includeI
ModEvent includeI(Space &home, I &i)
Include range sequence described by i in greatest lower bound.
Definition set.hpp:151
set.hh
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::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::SetRelType
SetRelType
Common relation types for sets.
Definition set.hh:643
Gecode::SRT_GQ
@ SRT_GQ
Greater or equal ( ).
Definition set.hh:652
Gecode::SRT_CMPL
@ SRT_CMPL
Complement.
Definition set.hh:649
Gecode::SRT_GR
@ SRT_GR
Greater ( ).
Definition set.hh:653
Gecode::SRT_LQ
@ SRT_LQ
Less or equal ( ).
Definition set.hh:650
Gecode::SRT_NQ
@ SRT_NQ
Disequality ( ).
Definition set.hh:645
Gecode::SRT_LE
@ SRT_LE
Less ( ).
Definition set.hh:651
Gecode::SRT_EQ
@ SRT_EQ
Equality ( ).
Definition set.hh:644
Gecode::SRT_SUP
@ SRT_SUP
Superset ( ).
Definition set.hh:647
Gecode::SRT_DISJ
@ SRT_DISJ
Disjoint ( ).
Definition set.hh:648
Gecode::SRT_SUB
@ SRT_SUB
Subset ( ).
Definition set.hh:646
Gecode::Set::Limits::check
void check(int n, const char *l)
Check whether integer n is in range, otherwise throw overflow exception with information l.
Definition limits.hpp:37
Gecode::Set::Limits::min
const int min
Smallest allowed integer in integer set.
Definition set.hh:99
Gecode::Set::Limits::max
const int max
Largest allowed integer in integer set.
Definition set.hh:97
Gecode::Set
Finite integer sets.
Definition var-imp.hpp:137
Gecode
Gecode toplevel namespace
Gecode::dom
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Definition dom.cpp:40
Gecode::post
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
Definition filter.cpp:138
rel.hh