40namespace Gecode {
namespace Set {
namespace Precede {
61 }
else if (
x[
alpha].contains(
t)) {
77 }
while ((
beta <
n) &&
89 int s0,
int t0,
int b,
int g)
92 for (
int i=
x.
size(); i--; )
94 x[i].subscribe(home,*
new (home)
Index(home,*
this,
c,i));
103 while (alpha <
x.size()) {
104 if (
x[alpha].notContains(s)) {
106 }
else if (
x[alpha].contains(
t)) {
118 int beta = 0, gamma = 0;
121 }
while ((gamma <
x.size()) &&
125 }
while ((beta <
x.size()) &&
132 if (gamma <
x.size())
145 alpha(
p.alpha), beta(
p.beta), gamma(
p.gamma) {
159 alpha -= i; beta -= i; gamma -= i;
162 if (gamma <
x.size()) {
177 x[as.advisor().i].cancel(home,as.advisor());
180 return sizeof(*this);
201 if ((beta <= gamma) && (i < gamma) &&
202 x[i].notContains(s) &&
x[i].contains(
t))
208 }
else if ((i < alpha) || (i > gamma)) {
215 if ((alpha == i) || (beta == i))
229 if (alpha <
n && (
x[alpha].notContains(s) ||
x[alpha].contains(
t))) {
230 if (
x[alpha].notContains(s)) {
236 while (alpha < beta) {
237 if (
x[alpha].notContains(s)) {
248 }
else if ((beta <
n) && (
x[beta].notContains(s) ||
x[beta].contains(
t))) {
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Class to iterate over advisors of a council.
int size(void) const
Return size of array (number of elements)
Generic domain change information to be supplied to advisors.
Home class for posting propagators
Index(Space &home, Propagator &p, Council< Index > &c, int i)
Create index advisor.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Propagator * copy(Space &home)
Copy propagator during cloning.
virtual void reschedule(Space &home)
Schedule function.
Single(Home home, ViewArray< View > &x, int s, int t, int beta, int gamma)
Constructor for posting.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual PropCost cost(const Space &, const ModEventDelta &) const
Cost function.
static ExecStatus post(Home home, ViewArray< View > &x, int s, int t)
Post propagator that s precedes t in x.
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
Base-class for propagators.
bool notContains(int i) const
Test whether i is not in the least upper bound.
bool contains(int i) const
Test whether i is in greatest lower bound.
Advisors for views (by position in array)
Index(Space &home, Propagator &p, Council< Index > &c, int i)
Create index advisor.
Single value precedence propagator.
int alpha
Pointers updated during propagation.
ExecStatus updateBeta(Space &home)
Update the beta pointer.
Council< Index > c
The advisor council.
int s
The value s must precede t.
Single(Home home, ViewArray< View > &x, int s, int t, int beta, int gamma)
Constructor for posting.
ExecStatus updateAlpha(Space &home)
Update the alpha pointer.
struct Gecode::Space::@61::@63 c
Data available only during copying.
ExecStatus ES_SUBSUMED(Propagator &p)
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
bool assigned(View x, int v)
Whether x is assigned to value v.
const Gecode::ModEvent ME_SET_BB
Domain operation has changed both greatest lower and least upper bound.
const Gecode::PropCond PC_SET_NONE
Propagation condition to be ignored (convenience)
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_NOFIX
Propagation has not computed fixpoint.
Post propagator for SetVar x