34 #ifndef GECODE_GIST_SPACENODE_HH 35 #define GECODE_GIST_SPACENODE_HH 40 namespace Gecode {
namespace Gist {
53 static const unsigned int FIRSTBIT = 24;
54 static const unsigned int STATUSMASK = 7<<20;
55 static const unsigned int MAXDISTANCE = (1<<20)-1;
56 static const unsigned int DISTANCEMASK = (1<<20)-1;
74 : solutions(0), failures(0), choices(0), undetermined(1), maxDepth(0) {}
109 void setDistance(
unsigned int d);
112 unsigned int getDistance(
void)
const;
115 void setFlag(
int flag,
bool value);
118 bool getFlag(
int flag)
const;
122 HASOPENCHILDREN = FIRSTBIT,
127 static const int LASTBIT = HASSOLVEDCHILDREN;
131 void setHasOpenChildren(
bool b);
133 void setHasFailedChildren(
bool b);
135 void setHasSolvedChildren(
bool b);
143 bool hadFailures,
bool hadSolutions);
161 const Space* getWorkingSpace(
void)
const;
170 bool isCurrentBest(
BestNode* curBest);
193 bool hasFailedChildren(
void);
195 bool hasSolvedChildren(
void);
197 bool hasOpenChildren(
void);
201 void setNoOfOpenChildren(
int n);
205 bool hasWorkingSpace(
void);
210 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::@593::NNF::@62::@63 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.