38 #ifndef GECODE_GIST_SPACENODE_HH 39 #define GECODE_GIST_SPACENODE_HH 44 namespace Gecode {
namespace Gist {
57 static const unsigned int FIRSTBIT = 24;
58 static const unsigned int STATUSMASK = 7<<20;
59 static const unsigned int MAXDISTANCE = (1<<20)-1;
60 static const unsigned int DISTANCEMASK = (1<<20)-1;
78 : solutions(0), failures(0), choices(0), undetermined(1), maxDepth(0) {}
113 void setDistance(
unsigned int d);
116 unsigned int getDistance(
void)
const;
119 void setFlag(
int flag,
bool value);
122 bool getFlag(
int flag)
const;
126 HASOPENCHILDREN = FIRSTBIT,
131 static const int LASTBIT = HASSOLVEDCHILDREN;
135 void setHasOpenChildren(
bool b);
137 void setHasFailedChildren(
bool b);
139 void setHasSolvedChildren(
bool b);
147 bool hadFailures,
bool hadSolutions);
165 const Space* getWorkingSpace(
void)
const;
174 bool isCurrentBest(
BestNode* curBest);
197 bool hasFailedChildren(
void);
199 bool hasSolvedChildren(
void);
201 bool hasOpenChildren(
void);
205 void setNoOfOpenChildren(
int n);
209 bool hasWorkingSpace(
void);
214 const Choice* getChoice(
void);
Node representing stop point.
int solutions
Number of solutions.
SpaceNode * s
The currently best node found, or NULL.
Static reference to the currently best space.
Node representing a branch.
unsigned int nstatus
Status of the node.
int choices
Number of choice nodes.
NodeStatus
Status of nodes in the search tree.
Node representing failure.
Base class for nodes of the search tree.
SpaceNodeFlags
Flags for SpaceNodes.
Node that has not been explored yet.
Statistics for execution of status
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
const unsigned int a_d
Create a clone during recomputation if distance is greater than a_d (adaptive distance) ...
Node representing a solution.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
int undetermined
Number of open, undetermined nodes.
Choice for performing commit
int maxDepth
Maximum depth of the tree.
const unsigned int c_d
Create a clone after every c_d commits (commit distance)
A node of a search tree of Gecode spaces.
Space * copy
A copy used for recomputation, or NULL.
Gecode toplevel namespace
int failures
Number of failures.
ExecStatus purge(Space &home, Propagator &p, TaskArray< OptTask > &t)
Purge optional tasks that are excluded and possibly rewrite propagator.
Statistics about the search tree
Statistics(void)
Constructor.
Node representing ignored stop point.