34 #ifndef GECODE_GIST_NODE_HH 35 #define GECODE_GIST_NODE_HH 42 namespace Gecode {
namespace Gist {
51 static const int NodeBlockSize = 1<<14;
58 int best[NodeBlockSize];
73 QHash<T*,QString> labels;
82 int allocate(
Space* root);
117 void* childrenOrFirstChild;
128 unsigned int getTag(
void)
const;
130 void setTag(
unsigned int tag);
132 void* getPtr(
void)
const;
134 int getFirstChild(
void)
const;
138 bool isUndetermined(
void)
const;
141 int getChild(
int n)
const;
146 Node(
int p,
bool failed =
false);
149 int getParent(
void)
const;
151 VisualNode* getParent(
const NodeAllocator& na)
const;
153 VisualNode* getChild(
const NodeAllocator& na,
int n)
const;
156 int getIndex(
const NodeAllocator& na)
const;
159 bool isRoot(
void)
const;
162 void setNumberOfChildren(
unsigned int n, NodeAllocator& na);
165 unsigned int getNumberOfChildren(
void)
const;
QString getLabel(T *n) const
Get label of node n.
T * operator[](int i) const
Return node for index i.
void setLabel(T *n, const QString &l)
Set label of node n to l.
NodeAllocatorBase< VisualNode > NodeAllocator
Base class for nodes of the search tree.
NodeAllocatorBase(bool bab)
Constructor.
T * best(int i) const
Return index of best node before i.
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
void clearLabel(T *n)
Remove label of node n.
bool hasLabel(T *n) const
Return whether node n has a label.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
void setBest(int i, int b)
Set index of best node before i to b.
~NodeAllocatorBase(void)
Destructor.
bool showLabels(void) const
Return branching label flag.
bool bab(void) const
Return branch-and-bound flag.
Node class that supports visual layout
Gecode toplevel namespace