rel.hh
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
* Guido Tack <tack@gecode.org>
*
* Contributing authors:
* Gabor Szokoli <szokoli@gecode.org>
*
* Copyright:
* Christian Schulte, 2002
* Guido Tack, 2004
* Gabor Szokoli, 2003
*
* 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.
*
*/
#ifndef __GECODE_INT_REL_HH__
#define __GECODE_INT_REL_HH__
#include <gecode/int.hh>
namespace Gecode { namespace Int { namespace Rel {
/*
* Equality propagators
*
*/
template<class View0,class View1>
class EqDom :
public MixBinaryPropagator<View0,PC_INT_DOM,View1,PC_INT_DOM> {
protected:
using MixBinaryPropagator<View0,PC_INT_DOM,View1,PC_INT_DOM>::x0;
using MixBinaryPropagator<View0,PC_INT_DOM,View1,PC_INT_DOM>::x1;
EqDom(Space& home, EqDom<View0,View1>& p);
public:
EqDom(Home home, View0 x0, View1 x1);
EqDom(Space& home, Propagator& p, View0 x0, View1 x1);
virtual Actor* copy(Space& home);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, View0 x0, View1 x1);
};
template<class View0, class View1>
class EqVal :
public MixBinaryPropagator<View0,PC_INT_VAL,View1,PC_INT_VAL> {
protected:
using MixBinaryPropagator<View0,PC_INT_VAL,View1,PC_INT_VAL>::x0;
using MixBinaryPropagator<View0,PC_INT_VAL,View1,PC_INT_VAL>::x1;
EqVal(Space& home, EqVal<View0,View1>& p);
public:
EqVal(Home home, View0 x0, View1 x1);
EqVal(Space& home, Propagator& p, View0 x0, View1 x1);
virtual Actor* copy(Space& home);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, View0 x0, View1 x1);
};
template<class View0, class View1>
class EqBnd :
public MixBinaryPropagator<View0,PC_INT_BND,View1,PC_INT_BND> {
protected:
using MixBinaryPropagator<View0,PC_INT_BND,View1,PC_INT_BND>::x0;
using MixBinaryPropagator<View0,PC_INT_BND,View1,PC_INT_BND>::x1;
EqBnd(Space& home, EqBnd<View0,View1>& p);
public:
EqBnd(Home home, View0 x0, View1 x1);
EqBnd(Space& home, Propagator& p, View0 x0, View1 x1);
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, View0 x0, View1 x1);
};
template<class View>
class NaryEqDom : public NaryPropagator<View,PC_INT_DOM> {
protected:
using NaryPropagator<View,PC_INT_DOM>::x;
NaryEqDom(Space& home, NaryEqDom<View>& p);
NaryEqDom(Home home, ViewArray<View>&);
public:
virtual Actor* copy(Space& home);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, ViewArray<View>& x);
};
template<class View>
class NaryEqBnd : public NaryPropagator<View,PC_INT_BND> {
protected:
using NaryPropagator<View,PC_INT_BND>::x;
NaryEqBnd(Space& home, NaryEqBnd<View>& p);
NaryEqBnd(Home home, ViewArray<View>&);
public:
virtual Actor* copy(Space& home);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, ViewArray<View>& x);
};
template<class View, int o>
class NaryLqLe : public NaryPropagator<View,PC_INT_NONE> {
protected:
using NaryPropagator<View,PC_INT_NONE>::x;
class Index : public Advisor {
public:
int i;
Index(Space& home, Propagator& p, Council<Index>& c, int i);
Index(Space& home, Index& a);
};
Council<Index> c;
class Pos : public FreeList {
public:
int p;
Pos(int p, Pos* n);
Pos* next(void) const;
void dispose(Space& home);
static void* operator new(size_t s, Space& home);
static void operator delete(void* p);
static void operator delete(void* p, Space& home);
};
Pos* pos;
bool empty(void) const;
int pop(Space& home);
void push(Space& home, int p);
bool run;
int n_subsumed;
static const int n_threshold = 7;
NaryLqLe(Space& home, NaryLqLe<View,o>& p);
NaryLqLe(Home home, ViewArray<View>&);
public:
virtual Actor* copy(Space& home);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual void reschedule(Space& home);
virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
virtual size_t dispose(Space& home);
static ExecStatus post(Home home, ViewArray<View>& x);
};
template<class View>
class NaryNq : public NaryPropagator<View,PC_INT_VAL> {
protected:
using NaryPropagator<View,PC_INT_VAL>::x;
NaryNq(Home home, ViewArray<View>& x);
NaryNq(Space& home, NaryNq<View>& p);
public:
virtual Actor* copy(Space& home);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, ViewArray<View>& x);
virtual size_t dispose(Space& home);
};
template<class View, class CtrlView, ReifyMode rm>
class ReEqDom : public ReBinaryPropagator<View,PC_INT_DOM,CtrlView> {
protected:
using ReBinaryPropagator<View,PC_INT_DOM,CtrlView>::x0;
using ReBinaryPropagator<View,PC_INT_DOM,CtrlView>::x1;
using ReBinaryPropagator<View,PC_INT_DOM,CtrlView>::b;
ReEqDom(Space& home, ReEqDom& p);
ReEqDom(Home home, View x0, View x1, CtrlView b);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, View x0, View x1, CtrlView b);
};
template<class View, class CtrlView, ReifyMode rm>
class ReEqBnd : public ReBinaryPropagator<View,PC_INT_BND,CtrlView> {
protected:
using ReBinaryPropagator<View,PC_INT_BND,CtrlView>::x0;
using ReBinaryPropagator<View,PC_INT_BND,CtrlView>::x1;
using ReBinaryPropagator<View,PC_INT_BND,CtrlView>::b;
ReEqBnd(Space& home, ReEqBnd& p);
ReEqBnd(Home home, View x0, View x1, CtrlView b);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, View x0, View x1, CtrlView b);
};
template<class View, class CtrlView, ReifyMode rm>
class ReEqDomInt : public ReUnaryPropagator<View,PC_INT_DOM,CtrlView> {
protected:
using ReUnaryPropagator<View,PC_INT_DOM,CtrlView>::x0;
using ReUnaryPropagator<View,PC_INT_DOM,CtrlView>::b;
int c;
ReEqDomInt(Space& home, ReEqDomInt& p);
ReEqDomInt(Home home, View x, int c, CtrlView b);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, View x, int c, CtrlView b);
};
template<class View, class CtrlView, ReifyMode rm>
class ReEqBndInt : public ReUnaryPropagator<View,PC_INT_BND,CtrlView> {
protected:
using ReUnaryPropagator<View,PC_INT_BND,CtrlView>::x0;
using ReUnaryPropagator<View,PC_INT_BND,CtrlView>::b;
int c;
ReEqBndInt(Space& home, ReEqBndInt& p);
ReEqBndInt(Home home, View x, int c, CtrlView b);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, View x, int c, CtrlView b);
};
/*
* Disequality propagators
*
*/
template<class V0, class V1>
class Nq : public MixBinaryPropagator<V0,PC_INT_VAL,V1,PC_INT_VAL> {
protected:
using MixBinaryPropagator<V0,PC_INT_VAL,V1,PC_INT_VAL>::x0;
using MixBinaryPropagator<V0,PC_INT_VAL,V1,PC_INT_VAL>::x1;
Nq(Space& home, Nq<V0,V1>& p);
Nq(Home home, V0 x0, V1 x1);
public:
virtual Actor* copy(Space& home);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, V0 x0, V1 x1);
};
/*
* Order propagators
*
*/
template<class V0, class V1>
class Lq : public MixBinaryPropagator<V0,PC_INT_BND,V1,PC_INT_BND> {
protected:
using MixBinaryPropagator<V0,PC_INT_BND,V1,PC_INT_BND>::x0;
using MixBinaryPropagator<V0,PC_INT_BND,V1,PC_INT_BND>::x1;
Lq(Space& home, Lq& p);
Lq(Home home, V0 x0, V1 x1);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, V0 x0, V1 x1);
};
template<class V0, class V1>
class Le : public MixBinaryPropagator<V0,PC_INT_BND,V1,PC_INT_BND> {
protected:
using MixBinaryPropagator<V0,PC_INT_BND,V1,PC_INT_BND>::x0;
using MixBinaryPropagator<V0,PC_INT_BND,V1,PC_INT_BND>::x1;
Le(Space& home, Le& p);
Le(Home home, V0 x0, V1 x1);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, V0 x0, V1 x1);
};
/*
* Reified order propagators
*
*/
template<class View, class CtrlView, ReifyMode rm>
class ReLq : public ReBinaryPropagator<View,PC_INT_BND,CtrlView> {
protected:
using ReBinaryPropagator<View,PC_INT_BND,CtrlView>::x0;
using ReBinaryPropagator<View,PC_INT_BND,CtrlView>::x1;
using ReBinaryPropagator<View,PC_INT_BND,CtrlView>::b;
ReLq(Space& home, ReLq& p);
ReLq(Home home, View x0, View x1, CtrlView b);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, View x0, View x1, CtrlView b);
};
template<class View, class CtrlView, ReifyMode rm>
class ReLqInt : public ReUnaryPropagator<View,PC_INT_BND,CtrlView> {
protected:
using ReUnaryPropagator<View,PC_INT_BND,CtrlView>::x0;
using ReUnaryPropagator<View,PC_INT_BND,CtrlView>::b;
int c;
ReLqInt(Space& home, ReLqInt& p);
ReLqInt(Home home, View x, int c, CtrlView b);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, View x, int c, CtrlView b);
};
template<class VX, class VY>
class LexLqLe : public Propagator {
protected:
ViewArray<VX> x;
ViewArray<VY> y;
bool strict;
LexLqLe(Space& home, LexLqLe<VX,VY>& p);
LexLqLe(Home home, ViewArray<VX>& x, ViewArray<VY>& y, bool strict);
public:
virtual Actor* copy(Space& home);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual void reschedule(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, ViewArray<VX>& x, ViewArray<VY>& y,
bool strict);
virtual size_t dispose(Space& home);
};
template<class VX, class VY>
class LexNq : public Propagator {
protected:
VX x0;
VY y0;
VX x1;
VY y1;
ViewArray<VX> x;
ViewArray<VY> y;
ExecStatus resubscribe(Space& home,
RelTest rt, VX& x0, VY& y0, VX x1, VY y1);
LexNq(Home home, ViewArray<VX>& x, ViewArray<VY>& y);
LexNq(Space& home, LexNq<VX,VY>& p);
public:
virtual Actor* copy(Space& home);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual void reschedule(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, ViewArray<VX>& x, ViewArray<VY>& y);
virtual size_t dispose(Space& home);
};
}}}
#include <gecode/int/rel/eq.hpp>
#include <gecode/int/rel/nq.hpp>
#include <gecode/int/rel/lq-le.hpp>
#include <gecode/int/rel/lex.hpp>
#endif
// STATISTICS: int-prop
Gecode::ActorLink::Space
friend class Space
Definition core.hpp:595
Gecode::ActorLink::Propagator
friend class Propagator
Definition core.hpp:591
Gecode::ActorLink::Actor
friend class Actor
Definition core.hpp:590
Gecode::Advisor::Advisor
Advisor(Space &home, Propagator &p, Council< A > &c)
Constructor for creation.
Definition core.hpp:3831
Gecode::Advisor::Council
friend class Council
Definition core.hpp:1294
Gecode::Delta
Generic domain change information to be supplied to advisors.
Definition core.hpp:204
Gecode::FreeList::FreeList
FreeList(void)
Use uninitialized.
Definition manager.hpp:241
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::Int::ReBinaryPropagator< View, PC_INT_DOM, CtrlView >::ReBinaryPropagator
ReBinaryPropagator(Space &home, ReBinaryPropagator &p)
Gecode::Int::ReBinaryPropagator< View, PC_INT_DOM, CtrlView >::x0
View x0
Definition propagator.hpp:90
Gecode::Int::ReBinaryPropagator< View, PC_INT_DOM, CtrlView >::b
CtrlView b
Definition propagator.hpp:92
Gecode::Int::ReBinaryPropagator< View, PC_INT_DOM, CtrlView >::x1
View x1
Definition propagator.hpp:90
Gecode::Int::ReUnaryPropagator< View, PC_INT_DOM, CtrlView >::b
CtrlView b
Definition propagator.hpp:59
Gecode::Int::ReUnaryPropagator< View, PC_INT_DOM, CtrlView >::ReUnaryPropagator
ReUnaryPropagator(Space &home, ReUnaryPropagator &p)
Gecode::Int::ReUnaryPropagator< View, PC_INT_DOM, CtrlView >::x0
View x0
Definition propagator.hpp:57
Gecode::Int::Rel::EqBnd::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:137
Gecode::Int::Rel::EqBnd::EqBnd
EqBnd(Space &home, EqBnd< View0, View1 > &p)
Constructor for cloning p.
Definition eq.hpp:125
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::EqBnd::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:143
Gecode::Int::Rel::EqDom::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:206
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::EqDom::EqDom
EqDom(Space &home, EqDom< View0, View1 > &p)
Constructor for cloning p.
Definition eq.hpp:194
Gecode::Int::Rel::EqDom::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition eq.hpp:212
Gecode::Int::Rel::EqDom::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:223
Gecode::Int::Rel::EqVal::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function: low unary.
Definition eq.hpp:79
Gecode::Int::Rel::EqVal::post
static ExecStatus post(Home home, View0 x0, View1 x1)
Post value propagation propagator .
Definition eq.hpp:48
Gecode::Int::Rel::EqVal::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:73
Gecode::Int::Rel::EqVal::EqVal
EqVal(Space &home, EqVal< View0, View1 > &p)
Constructor for cloning p.
Definition eq.hpp:61
Gecode::Int::Rel::EqVal::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:85
Gecode::Int::Rel::Le::Le
Le(Space &home, Le &p)
Constructor for cloning p.
Definition lq-le.hpp:103
Gecode::Int::Rel::Le::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lq-le.hpp:108
Gecode::Int::Rel::Le::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lq-le.hpp:114
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::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition lex.hpp:77
Gecode::Int::Rel::LexLqLe::y
ViewArray< VY > y
Definition rel.hh:627
Gecode::Int::Rel::LexLqLe::x
ViewArray< VX > x
View arrays.
Definition rel.hh:626
Gecode::Int::Rel::LexLqLe::post
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y, bool strict)
Post propagator for lexical order between x and y.
Definition lex.hpp:241
Gecode::Int::Rel::LexLqLe::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear).
Definition lex.hpp:64
Gecode::Int::Rel::LexLqLe::LexLqLe
LexLqLe(Space &home, LexLqLe< VX, VY > &p)
Constructor for cloning p.
Definition lex.hpp:50
Gecode::Int::Rel::LexLqLe::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lex.hpp:87
Gecode::Int::Rel::LexLqLe::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lex.hpp:58
Gecode::Int::Rel::LexLqLe::reschedule
virtual void reschedule(Space &home)
Schedule function.
Definition lex.hpp:70
Gecode::Int::Rel::LexLqLe::strict
bool strict
Determines whether propagator is strict or not.
Definition rel.hh:629
Gecode::Int::Rel::LexNq::y0
VY y0
View currently subscribed to.
Definition rel.hh:662
Gecode::Int::Rel::LexNq::resubscribe
ExecStatus resubscribe(Space &home, RelTest rt, VX &x0, VY &y0, VX x1, VY y1)
Update subscription.
Definition lex.hpp:376
Gecode::Int::Rel::LexNq::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition lex.hpp:367
Gecode::Int::Rel::LexNq::x0
VX x0
View currently subscribed to.
Definition rel.hh:660
Gecode::Int::Rel::LexNq::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lex.hpp:305
Gecode::Int::Rel::LexNq::reschedule
virtual void reschedule(Space &home)
Schedule function.
Definition lex.hpp:287
Gecode::Int::Rel::LexNq::x1
VX x1
View currently subscribed to.
Definition rel.hh:664
Gecode::Int::Rel::LexNq::x
ViewArray< VX > x
Views not yet subscribed to.
Definition rel.hh:668
Gecode::Int::Rel::LexNq::LexNq
LexNq(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Constructor for posting.
Definition lex.hpp:266
Gecode::Int::Rel::LexNq::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lex.hpp:409
Gecode::Int::Rel::LexNq::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition lex.hpp:281
Gecode::Int::Rel::LexNq::y1
VY y1
View currently subscribed to.
Definition rel.hh:666
Gecode::Int::Rel::LexNq::post
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Post propagator .
Definition lex.hpp:332
Gecode::Int::Rel::LexNq::y
ViewArray< VY > y
Views not yet subscribed to.
Definition rel.hh:670
Gecode::Int::Rel::Lq::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lq-le.hpp:71
Gecode::Int::Rel::Lq::post
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition lq-le.hpp:50
Gecode::Int::Rel::Lq::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lq-le.hpp:65
Gecode::Int::Rel::Lq::Lq
Lq(Space &home, Lq &p)
Constructor for cloning p.
Definition lq-le.hpp:60
Gecode::Int::Rel::NaryEqBnd::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:429
Gecode::Int::Rel::NaryEqBnd::post
static ExecStatus post(Home home, ViewArray< View > &x)
Post bounds consistent propagator .
Definition eq.hpp:402
Gecode::Int::Rel::NaryEqBnd::NaryEqBnd
NaryEqBnd(Space &home, NaryEqBnd< View > &p)
Constructor for cloning p.
Definition eq.hpp:424
Gecode::Int::Rel::NaryEqBnd::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:444
Gecode::Int::Rel::NaryEqBnd::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition eq.hpp:435
Gecode::Int::Rel::NaryEqDom::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:313
Gecode::Int::Rel::NaryEqDom::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition eq.hpp:303
Gecode::Int::Rel::NaryEqDom::NaryEqDom
NaryEqDom(Space &home, NaryEqDom< View > &p)
Constructor for cloning p.
Definition eq.hpp:292
Gecode::Int::Rel::NaryEqDom::post
static ExecStatus post(Home home, ViewArray< View > &x)
Post domain consistent propagator .
Definition eq.hpp:270
Gecode::Int::Rel::NaryEqDom::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:297
Gecode::Int::Rel::NaryLqLe::Index::Index
Index(Space &home, Propagator &p, Council< Index > &c, int i)
Create index advisor.
Definition lq-le.hpp:129
Gecode::Int::Rel::NaryLqLe::Index::i
int i
The position of the view in the view array.
Definition rel.hh:237
Gecode::Int::Rel::NaryLqLe::Pos
Positions in view array that have to be propagated.
Definition rel.hh:246
Gecode::Int::Rel::NaryLqLe::Pos::p
int p
Position of view in view array.
Definition rel.hh:249
Gecode::Int::Rel::NaryLqLe::Pos::Pos
Pos(int p, Pos *n)
Initialize with position p and next position n.
Definition lq-le.hpp:142
Gecode::Int::Rel::NaryLqLe::Pos::dispose
void dispose(Space &home)
Free memory for this position.
Definition lq-le.hpp:169
Gecode::Int::Rel::NaryLqLe::Pos::next
Pos * next(void) const
Return next position.
Definition lq-le.hpp:147
Gecode::Int::Rel::NaryLqLe::empty
bool empty(void) const
Whether no more positions must be propagated.
Definition lq-le.hpp:176
Gecode::Int::Rel::NaryLqLe::push
void push(Space &home, int p)
Push a new position p to be propagated.
Definition lq-le.hpp:181
Gecode::Int::Rel::NaryLqLe::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lq-le.hpp:291
Gecode::Int::Rel::NaryLqLe::c
Council< Index > c
The advisor council.
Definition rel.hh:244
Gecode::Int::Rel::NaryLqLe::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition lq-le.hpp:323
Gecode::Int::Rel::NaryLqLe::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition lq-le.hpp:317
Gecode::Int::Rel::NaryLqLe::n_threshold
static const int n_threshold
Compact during cloning when more advisors than that are subsumed.
Definition rel.hh:289
Gecode::Int::Rel::NaryLqLe::run
bool run
Whether the propagator is currently running.
Definition rel.hh:285
Gecode::Int::Rel::NaryLqLe::n_subsumed
int n_subsumed
Number of already subsumed advisors (or views).
Definition rel.hh:287
Gecode::Int::Rel::NaryLqLe::reschedule
virtual void reschedule(Space &home)
Schedule function.
Definition lq-le.hpp:368
Gecode::Int::Rel::NaryLqLe::post
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator for .
Definition lq-le.hpp:208
Gecode::Int::Rel::NaryLqLe::advise
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition lq-le.hpp:336
Gecode::Int::Rel::NaryLqLe::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lq-le.hpp:374
Gecode::Int::Rel::NaryLqLe::NaryLqLe
NaryLqLe(Space &home, NaryLqLe< View, o > &p)
Constructor for cloning p.
Definition lq-le.hpp:282
Gecode::Int::Rel::NaryLqLe::pos
Pos * pos
Stack of positions.
Definition rel.hh:277
Gecode::Int::Rel::NaryLqLe::pop
int pop(Space &home)
Pop a position to be propagated and return it.
Definition lq-le.hpp:189
Gecode::Int::Rel::NaryNq::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition nq.hpp:151
Gecode::Int::Rel::NaryNq::NaryNq
NaryNq(Home home, ViewArray< View > &x)
Constructor for posting.
Definition nq.hpp:96
Gecode::Int::Rel::NaryNq::post
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator .
Definition nq.hpp:118
Gecode::Int::Rel::NaryNq::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition nq.hpp:112
Gecode::Int::Rel::NaryNq::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition nq.hpp:158
Gecode::Int::Rel::NaryNq::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Definition nq.hpp:101
Gecode::Int::Rel::Nq::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary).
Definition nq.hpp:75
Gecode::Int::Rel::Nq::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition nq.hpp:81
Gecode::Int::Rel::Nq::post
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Definition nq.hpp:49
Gecode::Int::Rel::Nq::Nq
Nq(Space &home, Nq< V0, V1 > &p)
Constructor for cloning p.
Definition nq.hpp:64
Gecode::Int::Rel::Nq::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition nq.hpp:69
Gecode::Int::Rel::ReEqBndInt::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:751
Gecode::Int::Rel::ReEqBndInt::c
int c
Integer constant to check.
Definition rel.hh:431
Gecode::Int::Rel::ReEqBndInt::post
static ExecStatus post(Home home, View x, int c, CtrlView b)
Post bounds consistent propagator .
Definition eq.hpp:721
Gecode::Int::Rel::ReEqBndInt::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:757
Gecode::Int::Rel::ReEqBndInt::ReEqBndInt
ReEqBndInt(Space &home, ReEqBndInt &p)
Constructor for cloning p.
Definition eq.hpp:746
Gecode::Int::Rel::ReEqBnd::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:601
Gecode::Int::Rel::ReEqBnd::post
static ExecStatus post(Home home, View x0, View x1, CtrlView b)
Post bounds consistent propagator .
Definition eq.hpp:568
Gecode::Int::Rel::ReEqBnd::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:595
Gecode::Int::Rel::ReEqBnd::ReEqBnd
ReEqBnd(Space &home, ReEqBnd &p)
Constructor for cloning p.
Definition eq.hpp:590
Gecode::Int::Rel::ReEqDomInt::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:680
Gecode::Int::Rel::ReEqDomInt::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:674
Gecode::Int::Rel::ReEqDomInt::post
static ExecStatus post(Home home, View x, int c, CtrlView b)
Post domain consistent propagator .
Definition eq.hpp:644
Gecode::Int::Rel::ReEqDomInt::ReEqDomInt
ReEqDomInt(Space &home, ReEqDomInt &p)
Constructor for cloning p.
Definition eq.hpp:669
Gecode::Int::Rel::ReEqDomInt::c
int c
Integer constant to check.
Definition rel.hh:404
Gecode::Int::Rel::ReEqDom::ReEqDom
ReEqDom(Space &home, ReEqDom &p)
Constructor for cloning p.
Definition eq.hpp:516
Gecode::Int::Rel::ReEqDom::post
static ExecStatus post(Home home, View x0, View x1, CtrlView b)
Post domain consistent propagator .
Definition eq.hpp:494
Gecode::Int::Rel::ReEqDom::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:527
Gecode::Int::Rel::ReEqDom::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:521
Gecode::Int::Rel::ReLqInt::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lq-le.hpp:542
Gecode::Int::Rel::ReLqInt::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lq-le.hpp:536
Gecode::Int::Rel::ReLqInt::ReLqInt
ReLqInt(Space &home, ReLqInt &p)
Constructor for cloning p.
Definition lq-le.hpp:531
Gecode::Int::Rel::ReLqInt::c
int c
Integer constant to check.
Definition rel.hh:581
Gecode::Int::Rel::ReLqInt::post
static ExecStatus post(Home home, View x, int c, CtrlView b)
Post propagator for .
Definition lq-le.hpp:502
Gecode::Int::Rel::ReLq::ReLq
ReLq(Space &home, ReLq &p)
Constructor for cloning p.
Definition lq-le.hpp:454
Gecode::Int::Rel::ReLq::post
static ExecStatus post(Home home, View x0, View x1, CtrlView b)
Post propagator for .
Definition lq-le.hpp:420
Gecode::Int::Rel::ReLq::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lq-le.hpp:459
Gecode::Int::Rel::ReLq::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lq-le.hpp:465
Gecode::MixBinaryPropagator< View0, PC_INT_DOM, View1, PC_INT_DOM >::x1
View1 x1
Definition pattern.hpp:209
Gecode::MixBinaryPropagator< View0, PC_INT_DOM, View1, PC_INT_DOM >::MixBinaryPropagator
MixBinaryPropagator(Space &home, MixBinaryPropagator &p)
Definition pattern.hpp:597
Gecode::MixBinaryPropagator< View0, PC_INT_DOM, View1, PC_INT_DOM >::x0
View0 x0
Definition pattern.hpp:207
Gecode::NaryPropagator< View, PC_INT_DOM >::x
ViewArray< View > x
Definition pattern.hpp:145
Gecode::NaryPropagator< View, PC_INT_DOM >::NaryPropagator
NaryPropagator(Space &home, NaryPropagator &p)
Gecode::PropCost
Propagation cost.
Definition core.hpp:486
Gecode::Propagator::Space
friend class Space
Definition core.hpp:1066
Gecode::Propagator::Advisor
friend class Advisor
Definition core.hpp:1068
Gecode::Propagator::Council
friend class Council
Definition core.hpp:1069
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::View
Gecode::ViewArray
View arrays.
Definition array.hpp:253
int.hh
Gecode::ModEventDelta
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
eq.hpp
lq-le.hpp
nq.hpp
lex.hpp
Gecode::Int::Rel
Simple relation propagators.
Gecode::Int
Finite domain integers.
Gecode::Int::PC_INT_VAL
const Gecode::PropCond PC_INT_VAL
Propagate when a view becomes assigned (single value).
Definition var-type.hpp:82
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::PC_INT_NONE
const Gecode::PropCond PC_INT_NONE
Propagation condition to be ignored (convenience).
Definition var-type.hpp:74
Gecode::Int::PC_INT_DOM
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Definition var-type.hpp:100
Gecode::Int::RelTest
RelTest
Result of testing relation.
Definition view.hpp:1734
Gecode
Gecode toplevel namespace
Gecode::ExecStatus
ExecStatus
Definition core.hpp:472