38 #ifndef __GECODE_SEARCH_META_NO_GOODS_HH__ 39 #define __GECODE_SEARCH_META_NO_GOODS_HH__ 43 namespace Gecode {
namespace Search {
namespace Meta {
100 :
NGL(home,share,ngl) {}
111 while ((
l != NULL) &&
l->leaf()) {
112 l->subscribe(home,*
this);
n++;
113 notice = notice ||
l->notice();
117 l->subscribe(home,*
this);
n++;
119 while (!notice && (
l != NULL)) {
120 notice = notice ||
l->notice();
130 assert(
p.root != NULL);
133 for (
NGL* pc =
p.root; pc != NULL; pc = pc->next()) {
149 unsigned long int n_nogood = 0;
152 while ((
n > s) && (
p.ds[
n-1].truealt() == 0U))
161 while ((s <
n) && (
p.ds[s].truealt() > 0U))
163 if (
p.ds[s].rightmost()) {
165 home.
trycommit(*
p.ds[s].choice(),
p.ds[s].truealt());
169 for (
unsigned int a=0U;
a<
p.ds[s].truealt();
a++) {
177 if (
NGL*
l = home.
ngl(*
p.ds[s].choice(),
p.ds[s].truealt())) {
191 ((
n-s == 1) && (
c != &nn)));
197 for (
int i=s;
i<
n;
i++) {
199 for (
unsigned int a=0U;
a<
p.ds[
i].truealt();
a++) {
208 c =
c->add(
l,
true);
ll =
c;
212 if (
NGL*
l = home.
ngl(*
p.ds[
i].choice(),
p.ds[
i].truealt())) {
214 }
else if (!
p.ds[
i].rightmost()) {
virtual void subscribe(Space &home, Propagator &p)=0
Subscribe propagator p to all views of the no-good literal.
Actor must always be disposed.
long long int ll(int x)
Cast x into a long long int.
Status
The status of a no-good literal.
Base-class for propagators.
Base-class for both propagators and branchers.
#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.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Execution has resulted in failure.
bool failed(void) const
Check whether space is failed.
ModEventDelta med
A set of modification events (used during propagation)
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
NGL * next(void) const
Return pointer to next literal.
struct Gecode::@511::NNF::@54::@56 a
For atomic nodes.
virtual bool notice(void) const
Whether dispose must always be called (returns false)
void trycommit(const Choice &c, unsigned int a, CommitStatistics &stat=unused_commit)
If possible, commit choice c for alternative a.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Gecode toplevel namespace
int ModEventDelta
Modification event deltas.
Home class for posting propagators
NGL * ngl(const Choice &c, unsigned int a)
Create no-good literal for choice c and alternative a.
No-good literal recorded during search.