bool.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>
*
* Copyright:
* Christian Schulte, 2002
* Guido Tack, 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.
*
*/
#ifndef __GECODE_INT_BOOL_HH__
#define __GECODE_INT_BOOL_HH__
#include <gecode/int.hh>
namespace Gecode { namespace Int { namespace Bool {
/*
* Base Classes
*
*/
template<class BVA, class BVB>
class BoolBinary : public Propagator {
protected:
BVA x0;
BVB x1;
BoolBinary(Home home, BVA b0, BVB b1);
BoolBinary(Space& home, BoolBinary& p);
BoolBinary(Space& home, Propagator& p,
BVA b0, BVB b1);
public:
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual void reschedule(Space& home);
virtual size_t dispose(Space& home);
};
template<class BVA, class BVB, class BVC>
class BoolTernary : public Propagator {
protected:
BVA x0;
BVB x1;
BVC x2;
BoolTernary(Home home, BVA b0, BVB b1, BVC b2);
BoolTernary(Space& home, BoolTernary& p);
public:
BoolTernary(Space& home, Propagator& p,
BVA b0, BVB b1, BVC b2);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual void reschedule(Space& home);
virtual size_t dispose(Space& home);
};
template<class BVA, class BVB>
class Eq : public BoolBinary<BVA,BVB> {
protected:
using BoolBinary<BVA,BVB>::x0;
using BoolBinary<BVA,BVB>::x1;
Eq(Home home, BVA b0, BVB b1);
Eq(Space& home, Eq& p);
public:
Eq(Space& home, Propagator& p,
BVA b0, BVB b1);
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, BVA x0, BVB x1);
};
template<class BV>
class NaryEq : public NaryPropagator<BV,PC_BOOL_VAL> {
protected:
using NaryPropagator<BV,PC_BOOL_VAL>::x;
NaryEq(Home home, ViewArray<BV>& x);
NaryEq(Space& home, NaryEq& 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<BV>& x);
};
template<class BV>
class Lq : public BoolBinary<BV,BV> {
protected:
using BoolBinary<BV,BV>::x0;
using BoolBinary<BV,BV>::x1;
Lq(Home home, BV b0, BV b1);
Lq(Space& home, Lq& p);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, BV b0, BV b1);
};
template<class VX>
class NaryLq : public NaryPropagator<VX,PC_BOOL_NONE> {
protected:
using NaryPropagator<VX,PC_BOOL_NONE>::x;
bool run;
int n_zero;
int n_one;
Council<Advisor> c;
NaryLq(Home home, ViewArray<VX>& x);
NaryLq(Space& home, NaryLq<VX>& p);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, ViewArray<VX>& x);
virtual size_t dispose(Space& home);
};
template<class BV>
class Le {
public:
static ExecStatus post(Home home, BV b0, BV b1);
};
template<class BVA, class BVB>
class BinOrTrue : public BoolBinary<BVA,BVB> {
protected:
using BoolBinary<BVA,BVB>::x0;
using BoolBinary<BVA,BVB>::x1;
BinOrTrue(Home home, BVA b0, BVB b1);
BinOrTrue(Space& home, BinOrTrue& p);
public:
BinOrTrue(Space& home, Propagator& p,
BVA b0, BVB b1);
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, BVA b0, BVB b1);
};
template<class BV>
class TerOrTrue : public BoolBinary<BV,BV> {
protected:
using BoolBinary<BV,BV>::x0;
using BoolBinary<BV,BV>::x1;
BV x2;
TerOrTrue(Home home, BV b0, BV b1, BV b2);
TerOrTrue(Space& home, TerOrTrue& p);
public:
TerOrTrue(Space& home, Propagator& p,
BV b0, BV b1, BV b2);
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, BV b0, BV b1, BV b2);
virtual size_t dispose(Space& home);
};
template<class BV>
class QuadOrTrue : public BoolBinary<BV,BV> {
protected:
using BoolBinary<BV,BV>::x0;
using BoolBinary<BV,BV>::x1;
BV x2;
BV x3;
QuadOrTrue(Home home, BV b0, BV b1, BV b2, BV b3);
QuadOrTrue(Space& home, QuadOrTrue& p);
public:
QuadOrTrue(Space& home, Propagator& p,
BV b0, BV b1, BV b2, BV b3);
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, BV b0, BV b1, BV b2, BV b3);
virtual size_t dispose(Space& home);
};
template<class BVA, class BVB, class BVC>
class Or : public BoolTernary<BVA,BVB,BVC> {
protected:
using BoolTernary<BVA,BVB,BVC>::x0;
using BoolTernary<BVA,BVB,BVC>::x1;
using BoolTernary<BVA,BVB,BVC>::x2;
Or(Home home, BVA b0, BVB b1, BVC b2);
Or(Space& home, Or& p);
public:
Or(Space& home, Propagator& p, BVA b0, BVB b1, BVC b2);
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2);
};
template<class VX,class VY>
class NaryOr
: public MixNaryOnePropagator<VX,PC_BOOL_NONE,VY,PC_BOOL_VAL> {
protected:
using MixNaryOnePropagator<VX,PC_BOOL_NONE,VY,PC_BOOL_VAL>::x;
using MixNaryOnePropagator<VX,PC_BOOL_NONE,VY,PC_BOOL_VAL>::y;
int n_zero;
Council<Advisor> c;
NaryOr(Home home, ViewArray<VX>& x, VY y);
NaryOr(Space& home, NaryOr<VX,VY>& p);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
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, VY y);
virtual size_t dispose(Space& home);
};
template<class BV>
class NaryOrTrue : public BinaryPropagator<BV,PC_BOOL_VAL> {
protected:
using BinaryPropagator<BV,PC_BOOL_VAL>::x0;
using BinaryPropagator<BV,PC_BOOL_VAL>::x1;
ViewArray<BV> x;
ExecStatus resubscribe(Space& home, BV& x0, BV x1);
NaryOrTrue(Home home, ViewArray<BV>& x);
NaryOrTrue(Space& home, NaryOrTrue<BV>& 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<BV>& b);
virtual size_t dispose(Space& home);
};
template<class BVA, class BVB, class BVC>
class Eqv : public BoolTernary<BVA,BVB,BVC> {
protected:
using BoolTernary<BVA,BVB,BVC>::x0;
using BoolTernary<BVA,BVB,BVC>::x1;
using BoolTernary<BVA,BVB,BVC>::x2;
Eqv(Space& home, Eqv& p);
Eqv(Home home, BVA b0 ,BVB b1, BVC b2);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2);
};
class NaryEqv : public BinaryPropagator<BoolView,PC_BOOL_VAL> {
protected:
using BinaryPropagator<BoolView,PC_BOOL_VAL>::x0;
using BinaryPropagator<BoolView,PC_BOOL_VAL>::x1;
ViewArray<BoolView> x;
int pm2;
void resubscribe(Space& home, BoolView& x0);
NaryEqv(Home home, ViewArray<BoolView>& x, int pm2);
NaryEqv(Space& home, NaryEqv& p);
public:
GECODE_INT_EXPORT
virtual Actor* copy(Space& home);
GECODE_INT_EXPORT
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
GECODE_INT_EXPORT
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
GECODE_INT_EXPORT
static ExecStatus post(Home home, ViewArray<BoolView>& x, int pm2);
virtual size_t dispose(Space& home);
};
template<class VX, class VY>
class Clause : public Propagator {
protected:
ViewArray<VX> x;
ViewArray<VY> y;
VX z;
int n_zero;
class Tagged : public Advisor {
public:
const bool x;
Tagged(Space& home, Propagator& p, Council<Tagged>& c, bool x);
Tagged(Space& home, Tagged& a);
};
Council<Tagged> c;
void cancel(Space& home);
Clause(Home home, ViewArray<VX>& x, ViewArray<VY>& y, VX z);
Clause(Space& home, Clause<VX,VY>& p);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
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,
VX z);
virtual size_t dispose(Space& home);
};
template<class VX, class VY>
class ClauseTrue
: public MixBinaryPropagator<VX,PC_BOOL_VAL,VY,PC_BOOL_VAL> {
protected:
using MixBinaryPropagator<VX,PC_BOOL_VAL,VY,PC_BOOL_VAL>::x0;
using MixBinaryPropagator<VX,PC_BOOL_VAL,VY,PC_BOOL_VAL>::x1;
ViewArray<VX> x;
ViewArray<VY> y;
ClauseTrue(Home home, ViewArray<VX>& x, ViewArray<VY>& y);
ClauseTrue(Space& home, ClauseTrue<VX,VY>& 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<VX>& x, ViewArray<VY>& y);
virtual size_t dispose(Space& home);
};
template<class V0, class V1, class V2, PropCond pc>
class IteBase : public Propagator {
protected:
BoolView b;
V0 x0; V1 x1; V2 x2;
IteBase(Space& home, IteBase& p);
IteBase(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
public:
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual void reschedule(Space& home);
virtual size_t dispose(Space& home);
};
template<class V0, class V1, class V2>
class IteBnd : public IteBase<V0,V1,V2,PC_INT_BND> {
protected:
using IteBase<V0,V1,V2,PC_INT_BND>::b;
using IteBase<V0,V1,V2,PC_INT_BND>::x0;
using IteBase<V0,V1,V2,PC_INT_BND>::x1;
using IteBase<V0,V1,V2,PC_INT_BND>::x2;
IteBnd(Space& home, IteBnd& p);
IteBnd(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
public:
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
};
template<class V0, class V1, class V2>
class IteDom : public IteBase<V0,V1,V2,PC_INT_DOM> {
protected:
using IteBase<V0,V1,V2,PC_INT_DOM>::b;
using IteBase<V0,V1,V2,PC_INT_DOM>::x0;
using IteBase<V0,V1,V2,PC_INT_DOM>::x1;
using IteBase<V0,V1,V2,PC_INT_DOM>::x2;
IteDom(Space& home, IteDom& p);
IteDom(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
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, BoolView b, V0 x0, V1 x1, V2 x2);
};
}}}
#include <gecode/int/bool/base.hpp>
#include <gecode/int/bool/eq.hpp>
#include <gecode/int/bool/lq.hpp>
#include <gecode/int/bool/or.hpp>
#include <gecode/int/bool/eqv.hpp>
#include <gecode/int/bool/clause.hpp>
#include <gecode/int/bool/ite.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::BinaryPropagator< BV, PC_BOOL_VAL >::x0
BV x0
Definition pattern.hpp:87
Gecode::BinaryPropagator< BV, PC_BOOL_VAL >::BinaryPropagator
BinaryPropagator(Space &home, BinaryPropagator &p)
Gecode::BinaryPropagator< BV, PC_BOOL_VAL >::x1
BV x1
Definition pattern.hpp:87
Gecode::Delta
Generic domain change information to be supplied to advisors.
Definition core.hpp:204
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::Int::BoolView
Boolean view for Boolean variables.
Definition view.hpp:1380
Gecode::Int::Bool::BinOrTrue::BinOrTrue
BinOrTrue(Home home, BVA b0, BVB b1)
Constructor for posting.
Definition or.hpp:103
Gecode::Int::Bool::BinOrTrue::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:148
Gecode::Int::Bool::BinOrTrue::post
static ExecStatus post(Home home, BVA b0, BVB b1)
Post propagator .
Definition or.hpp:125
Gecode::Int::Bool::BinOrTrue::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:119
Gecode::Int::Bool::BoolBinary::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition base.hpp:80
Gecode::Int::Bool::BoolBinary::reschedule
virtual void reschedule(Space &home)
Schedule function.
Definition base.hpp:73
Gecode::Int::Bool::BoolBinary::x1
BVB x1
Boolean view Constructor for posting.
Definition bool.hh:58
Gecode::Int::Bool::BoolBinary::BoolBinary
BoolBinary(Home home, BVA b0, BVB b1)
Definition base.hpp:42
Gecode::Int::Bool::BoolBinary::x0
BVA x0
Boolean view.
Definition bool.hh:57
Gecode::Int::Bool::BoolBinary::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary).
Definition base.hpp:67
Gecode::Int::Bool::BoolTernary::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary).
Definition base.hpp:123
Gecode::Int::Bool::BoolTernary::BoolTernary
BoolTernary(Home home, BVA b0, BVB b1, BVC b2)
Definition base.hpp:94
Gecode::Int::Bool::BoolTernary::x1
BVB x1
Boolean view.
Definition bool.hh:80
Gecode::Int::Bool::BoolTernary::x0
BVA x0
Boolean view.
Definition bool.hh:79
Gecode::Int::Bool::BoolTernary::x2
BVC x2
Boolean view Constructor for posting.
Definition bool.hh:81
Gecode::Int::Bool::BoolTernary::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition base.hpp:137
Gecode::Int::Bool::BoolTernary::reschedule
virtual void reschedule(Space &home)
Schedule function.
Definition base.hpp:129
Gecode::Int::Bool::ClauseTrue::post
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Post propagator .
Definition clause.hpp:106
Gecode::Int::Bool::ClauseTrue::ClauseTrue
ClauseTrue(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Constructor for posting.
Definition clause.hpp:43
Gecode::Int::Bool::ClauseTrue::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition clause.hpp:131
Gecode::Int::Bool::ClauseTrue::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary).
Definition clause.hpp:53
Gecode::Int::Bool::ClauseTrue::x
ViewArray< VX > x
Views not yet subscribed to.
Definition bool.hh:552
Gecode::Int::Bool::ClauseTrue::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition clause.hpp:67
Gecode::Int::Bool::ClauseTrue::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition clause.hpp:173
Gecode::Int::Bool::ClauseTrue::y
ViewArray< VY > y
Views not yet subscribed to (origin from negative variables).
Definition bool.hh:554
Gecode::Int::Bool::Clause::Tagged::Tagged
Tagged(Space &home, Propagator &p, Council< Tagged > &c, bool x)
Create tagged advisor.
Definition clause.hpp:193
Gecode::Int::Bool::Clause::Tagged::x
const bool x
Whether advises a view for x or y.
Definition bool.hh:506
Gecode::Int::Bool::Clause::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition clause.hpp:345
Gecode::Int::Bool::Clause::z
VX z
Result.
Definition bool.hh:499
Gecode::Int::Bool::Clause::post
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y, VX z)
Post propagator .
Definition clause.hpp:246
Gecode::Int::Bool::Clause::x
ViewArray< VX > x
Positive views.
Definition bool.hh:495
Gecode::Int::Bool::Clause::advise
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition clause.hpp:316
Gecode::Int::Bool::Clause::reschedule
virtual void reschedule(Space &home)
Schedule function.
Definition clause.hpp:327
Gecode::Int::Bool::Clause::n_zero
int n_zero
The number of views assigned to zero in x and y.
Definition bool.hh:501
Gecode::Int::Bool::Clause::Clause
Clause(Home home, ViewArray< VX > &x, ViewArray< VY > &y, VX z)
Constructor for posting.
Definition clause.hpp:204
Gecode::Int::Bool::Clause::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition clause.hpp:307
Gecode::Int::Bool::Clause::c
Council< Tagged > c
The advisor council.
Definition bool.hh:513
Gecode::Int::Bool::Clause::y
ViewArray< VY > y
Positive views (origin from negative variables).
Definition bool.hh:497
Gecode::Int::Bool::Clause::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition clause.hpp:238
Gecode::Int::Bool::Clause::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary).
Definition clause.hpp:287
Gecode::Int::Bool::Clause::cancel
void cancel(Space &home)
Cancel subscriptions.
Definition clause.hpp:293
Gecode::Int::Bool::Eq::post
static ExecStatus post(Home home, BVA x0, BVB x1)
Post propagator .
Definition eq.hpp:60
Gecode::Int::Bool::Eq::Eq
Eq(Home home, BVA b0, BVB b1)
Constructor for posting.
Definition eq.hpp:38
Gecode::Int::Bool::Eq::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:54
Gecode::Int::Bool::Eq::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:84
Gecode::Int::Bool::Eqv::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eqv.hpp:87
Gecode::Int::Bool::Eqv::post
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator (equivalence).
Definition eqv.hpp:48
Gecode::Int::Bool::Eqv::Eqv
Eqv(Space &home, Eqv &p)
Constructor for cloning p.
Definition eqv.hpp:43
Gecode::Int::Bool::Eqv::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eqv.hpp:81
Gecode::Int::Bool::IteBase::IteBase
IteBase(Space &home, IteBase &p)
Constructor for cloning p.
Definition ite.hpp:52
Gecode::Int::Bool::IteBase::x2
V2 x2
Definition bool.hh:585
Gecode::Int::Bool::IteBase::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low ternary).
Definition ite.hpp:62
Gecode::Int::Bool::IteBase::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition ite.hpp:77
Gecode::Int::Bool::IteBase::b
BoolView b
View for condition.
Definition bool.hh:583
Gecode::Int::Bool::IteBase::x0
V0 x0
Views.
Definition bool.hh:585
Gecode::Int::Bool::IteBase::x1
V1 x1
Definition bool.hh:585
Gecode::Int::Bool::IteBase::reschedule
virtual void reschedule(Space &home)
Schedule function.
Definition ite.hpp:68
Gecode::Int::Bool::IteBnd::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition ite.hpp:100
Gecode::Int::Bool::IteBnd::IteBnd
IteBnd(Space &home, IteBnd &p)
Constructor for cloning p.
Definition ite.hpp:95
Gecode::Int::Bool::IteBnd::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition ite.hpp:119
Gecode::Int::Bool::IteBnd::post
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2)
Post if-then-else propagator.
Definition ite.hpp:106
Gecode::Int::Bool::IteDom::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high ternary).
Definition ite.hpp:189
Gecode::Int::Bool::IteDom::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition ite.hpp:198
Gecode::Int::Bool::IteDom::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition ite.hpp:170
Gecode::Int::Bool::IteDom::IteDom
IteDom(Space &home, IteDom &p)
Constructor for cloning p.
Definition ite.hpp:165
Gecode::Int::Bool::IteDom::post
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2)
Post if-then-else propagator.
Definition ite.hpp:176
Gecode::Int::Bool::Le
Boolean less propagator.
Definition bool.hh:223
Gecode::Int::Bool::Le::post
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Definition lq.hpp:228
Gecode::Int::Bool::Lq::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lq.hpp:53
Gecode::Int::Bool::Lq::post
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Definition lq.hpp:59
Gecode::Int::Bool::Lq::Lq
Lq(Home home, BV b0, BV b1)
Constructor for posting.
Definition lq.hpp:43
Gecode::Int::Bool::Lq::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lq.hpp:76
Gecode::Int::Bool::NaryEq::post
static ExecStatus post(Home home, ViewArray< BV > &x)
Post propagator .
Definition eq.hpp:131
Gecode::Int::Bool::NaryEq::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:165
Gecode::Int::Bool::NaryEq::NaryEq
NaryEq(Home home, ViewArray< BV > &x)
Constructor for posting.
Definition eq.hpp:115
Gecode::Int::Bool::NaryEq::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary).
Definition eq.hpp:159
Gecode::Int::Bool::NaryEq::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:125
Gecode::Int::Bool::NaryEqv::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eqv.cpp:81
Gecode::Int::Bool::NaryEqv::resubscribe
void resubscribe(Space &home, BoolView &x0)
Update subscription.
Definition eqv.hpp:178
Gecode::Int::Bool::NaryEqv::NaryEqv
NaryEqv(Home home, ViewArray< BoolView > &x, int pm2)
Constructor for posting.
Definition eqv.hpp:158
Gecode::Int::Bool::NaryEqv::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition eqv.hpp:172
Gecode::Int::Bool::NaryEqv::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary).
Definition eqv.cpp:44
Gecode::Int::Bool::NaryEqv::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eqv.cpp:49
Gecode::Int::Bool::NaryEqv::pm2
int pm2
Parity information mod 2.
Definition bool.hh:460
Gecode::Int::Bool::NaryEqv::x
ViewArray< BoolView > x
Views not yet subscribed to.
Definition bool.hh:458
Gecode::Int::Bool::NaryEqv::post
static ExecStatus post(Home home, ViewArray< BoolView > &x, int pm2)
Post propagator .
Definition eqv.cpp:54
Gecode::Int::Bool::NaryLq::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lq.hpp:126
Gecode::Int::Bool::NaryLq::n_one
int n_one
The number of views assigned to one in x.
Definition bool.hh:191
Gecode::Int::Bool::NaryLq::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary).
Definition lq.hpp:158
Gecode::Int::Bool::NaryLq::post
static ExecStatus post(Home home, ViewArray< VX > &x)
Post propagator .
Definition lq.hpp:132
Gecode::Int::Bool::NaryLq::NaryLq
NaryLq(Home home, ViewArray< VX > &x)
Constructor for posting.
Definition lq.hpp:110
Gecode::Int::Bool::NaryLq::n_zero
int n_zero
The number of views assigned to zero in x.
Definition bool.hh:189
Gecode::Int::Bool::NaryLq::run
bool run
Whether the propagator is currently running.
Definition bool.hh:187
Gecode::Int::Bool::NaryLq::c
Council< Advisor > c
The advisor council.
Definition bool.hh:193
Gecode::Int::Bool::NaryLq::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lq.hpp:184
Gecode::Int::Bool::NaryLq::advise
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition lq.hpp:164
Gecode::Int::Bool::NaryLq::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition lq.hpp:174
Gecode::Int::Bool::NaryOrTrue::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:718
Gecode::Int::Bool::NaryOrTrue::resubscribe
ExecStatus resubscribe(Space &home, BV &x0, BV x1)
Update subscription.
Definition or.hpp:694
Gecode::Int::Bool::NaryOrTrue::post
static ExecStatus post(Home home, ViewArray< BV > &b)
Post propagator .
Definition or.hpp:663
Gecode::Int::Bool::NaryOrTrue::x
ViewArray< BV > x
Views not yet subscribed to.
Definition bool.hh:398
Gecode::Int::Bool::NaryOrTrue::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:634
Gecode::Int::Bool::NaryOrTrue::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary).
Definition or.hpp:621
Gecode::Int::Bool::NaryOrTrue::NaryOrTrue
NaryOrTrue(Home home, ViewArray< BV > &x)
Constructor for posting.
Definition or.hpp:613
Gecode::Int::Bool::NaryOrTrue::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition or.hpp:687
Gecode::Int::Bool::NaryOr::reschedule
virtual void reschedule(Space &home)
Schedule function.
Definition or.hpp:815
Gecode::Int::Bool::NaryOr::advise
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition or.hpp:805
Gecode::Int::Bool::NaryOr::NaryOr
NaryOr(Home home, ViewArray< VX > &x, VY y)
Constructor for posting.
Definition or.hpp:736
Gecode::Int::Bool::NaryOr::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:752
Gecode::Int::Bool::NaryOr::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:839
Gecode::Int::Bool::NaryOr::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary).
Definition or.hpp:799
Gecode::Int::Bool::NaryOr::n_zero
int n_zero
The number of views assigned to zero in x.
Definition bool.hh:361
Gecode::Int::Bool::NaryOr::c
Council< Advisor > c
The advisor council.
Definition bool.hh:363
Gecode::Int::Bool::NaryOr::post
static ExecStatus post(Home home, ViewArray< VX > &x, VY y)
Post propagator .
Definition or.hpp:769
Gecode::Int::Bool::NaryOr::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition or.hpp:828
Gecode::Int::Bool::Or::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:526
Gecode::Int::Bool::Or::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:477
Gecode::Int::Bool::Or::post
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator .
Definition or.hpp:494
Gecode::Int::Bool::Or::Or
Or(Home home, BVA b0, BVB b1, BVC b2)
Constructor for posting.
Definition or.hpp:461
Gecode::Int::Bool::QuadOrTrue::QuadOrTrue
QuadOrTrue(Home home, BV b0, BV b1, BV b2, BV b3)
Constructor for posting.
Definition or.hpp:285
Gecode::Int::Bool::QuadOrTrue::x2
BV x2
Boolean view without subscription.
Definition bool.hh:300
Gecode::Int::Bool::QuadOrTrue::x3
BV x3
Boolean view without subscription.
Definition bool.hh:302
Gecode::Int::Bool::QuadOrTrue::post
static ExecStatus post(Home home, BV b0, BV b1, BV b2, BV b3)
Post propagator .
Definition or.hpp:330
Gecode::Int::Bool::QuadOrTrue::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition or.hpp:290
Gecode::Int::Bool::QuadOrTrue::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:337
Gecode::Int::Bool::QuadOrTrue::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:314
Gecode::Int::Bool::TerOrTrue::TerOrTrue
TerOrTrue(Home home, BV b0, BV b1, BV b2)
Constructor for posting.
Definition or.hpp:181
Gecode::Int::Bool::TerOrTrue::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:208
Gecode::Int::Bool::TerOrTrue::x2
BV x2
Boolean view without subscription.
Definition bool.hh:269
Gecode::Int::Bool::TerOrTrue::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition or.hpp:186
Gecode::Int::Bool::TerOrTrue::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:227
Gecode::Int::Bool::TerOrTrue::post
static ExecStatus post(Home home, BV b0, BV b1, BV b2)
Post propagator .
Definition or.hpp:220
Gecode::MixBinaryPropagator< VX, PC_BOOL_VAL, VY, PC_BOOL_VAL >::x1
VY x1
Definition pattern.hpp:209
Gecode::MixBinaryPropagator< VX, PC_BOOL_VAL, VY, PC_BOOL_VAL >::MixBinaryPropagator
MixBinaryPropagator(Space &home, MixBinaryPropagator &p)
Definition pattern.hpp:597
Gecode::MixBinaryPropagator< VX, PC_BOOL_VAL, VY, PC_BOOL_VAL >::x0
VX x0
Definition pattern.hpp:207
Gecode::MixNaryOnePropagator< VX, PC_BOOL_NONE, VY, PC_BOOL_VAL >::MixNaryOnePropagator
MixNaryOnePropagator(Space &home, MixNaryOnePropagator &p)
Definition pattern.hpp:733
Gecode::MixNaryOnePropagator< VX, PC_BOOL_NONE, VY, PC_BOOL_VAL >::x
ViewArray< VX > x
Definition pattern.hpp:275
Gecode::MixNaryOnePropagator< VX, PC_BOOL_NONE, VY, PC_BOOL_VAL >::y
VY y
Definition pattern.hpp:277
Gecode::NaryPropagator< BV, PC_BOOL_VAL >::x
ViewArray< BV > x
Definition pattern.hpp:145
Gecode::NaryPropagator< BV, PC_BOOL_VAL >::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::ViewArray
View arrays.
Definition array.hpp:253
clause.hpp
eqv.hpp
int.hh
GECODE_INT_EXPORT
#define GECODE_INT_EXPORT
Definition int.hh:81
Gecode::ModEventDelta
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
base.hpp
eq.hpp
ite.hpp
lq.hpp
Gecode::Int::Bool
Boolean propagators.
Gecode::Int
Finite domain integers.
Gecode::Int::PC_BOOL_NONE
const Gecode::PropCond PC_BOOL_NONE
Propagation condition to be ignored (convenience).
Definition var-type.hpp:118
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_BOOL_VAL
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value).
Definition var-type.hpp:126
Gecode::Int::PC_INT_DOM
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Definition var-type.hpp:100
Gecode
Gecode toplevel namespace
Gecode::ExecStatus
ExecStatus
Definition core.hpp:472
or.hpp