44 namespace Gecode {
namespace Set {
namespace Precede {
65 }
else if (
x[
alpha].contains(
t)) {
81 }
while ((
beta < n) &&
93 int s0,
int t0,
int b,
int g)
96 for (
int i=
x.size();
i--; )
107 while (alpha < x.
size()) {
108 if (x[alpha].notContains(s)) {
110 }
else if (x[alpha].contains(t)) {
122 int beta = 0, gamma = 0;
125 }
while ((gamma < x.
size()) &&
126 (!x[gamma].notContains(s) || !x[gamma].contains(t)));
129 }
while ((beta < x.
size()) &&
130 (x[beta].notContains(s) || x[beta].contains(t)));
136 if (gamma < x.
size())
149 alpha(p.alpha), beta(p.beta), gamma(p.gamma) {
150 c.update(home, share, p.
c);
163 alpha -=
i; beta -=
i; gamma -=
i;
166 if (gamma <
x.size()) {
181 x[as.advisor().i].cancel(home,as.advisor());
184 return sizeof(*this);
196 Index&
a(static_cast<Index&>(a0));
199 if ((beta <= gamma) && (i < gamma) &&
200 x[i].notContains(s) &&
x[i].contains(
t))
206 }
else if ((i < alpha) || (i > gamma)) {
213 if ((alpha == i) || (beta ==
i))
227 if (alpha < n && (
x[alpha].notContains(s) ||
x[alpha].contains(
t))) {
228 if (
x[alpha].notContains(s)) {
234 while (alpha < beta) {
235 if (
x[alpha].notContains(s)) {
246 }
else if ((beta < n) && (
x[beta].notContains(s) ||
x[beta].contains(
t))) {
Council< Index > c
The advisor council.
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
ExecStatus ES_SUBSUMED(Propagator &p)
Single(Home home, ViewArray< View > &x, int s, int t, int beta, int gamma)
Constructor for posting.
virtual Propagator * copy(Space &home, bool share)
Copy propagator during cloning.
const Gecode::ModEvent ME_SET_BB
Domain operation has changed both greatest lower and least upper bound.
ViewArray< View > x
Array of views.
Base-class for propagators.
const Gecode::PropCond PC_SET_NONE
Propagation condition to be ignored (convenience)
int i
The position of the view in the view array.
ExecStatus updateAlpha(Space &home)
Update the alpha pointer.
Class to iterate over advisors of a council.
Propagation has computed fixpoint.
static ExecStatus post(Home home, ViewArray< View > &x, int s, int t)
Post propagator that s precedes t in x.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
ModEvent exclude(Space &home, View &x, int s)
Prune view x to exclude all values from s.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
void drop_lst(int i)
Drop views from positions i+1 to size()-1 from array.
int n
Number of negative literals for node type.
ExecStatus updateBeta(Space &home)
Update the beta pointer.
void subscribe(Space &home, Propagator &p, IntSet &y)
int alpha
Pointers updated during propagation.
Advisors for views (by position in array)
void drop_fst(int i)
Drop views from positions 0 to i-1 from array.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Single value precedence propagator.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Node * x
Pointer to corresponding Boolean expression node.
Generic domain change information to be supplied to advisors.
void dispose(Space &home, Council< A > &c)
Dispose the advisor.
ModEvent include(Space &home, View &x, int s)
Prune view x to only include values from s.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
bool assigned(View x, int v)
Whether x is assigned to value v.
Propagation has not computed fixpoint.
int size(void) const
Return size of array (number of elements)
virtual PropCost cost(const Space &, const ModEventDelta &) const
Cost function.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Index(Space &home, Propagator &p, Council< Index > &c, int i)
Create index advisor.
Gecode toplevel namespace
int s
The value s must precede t.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.