38 #ifndef GECODE_GIST_NODE_HH 39 #define GECODE_GIST_NODE_HH 46 namespace Gecode {
namespace Gist {
55 static const int NodeBlockSize = 1<<14;
62 int best[NodeBlockSize];
77 QHash<T*,QString> labels;
86 int allocate(
Space* root);
121 void* childrenOrFirstChild;
132 unsigned int getTag(
void)
const;
134 void setTag(
unsigned int tag);
136 void* getPtr(
void)
const;
138 int getFirstChild(
void)
const;
142 bool isUndetermined(
void)
const;
145 int getChild(
int n)
const;
150 Node(
int p,
bool failed =
false);
153 int getParent(
void)
const;
155 VisualNode* getParent(
const NodeAllocator& na)
const;
157 VisualNode* getChild(
const NodeAllocator& na,
int n)
const;
160 int getIndex(
const NodeAllocator& na)
const;
163 bool isRoot(
void)
const;
166 void setNumberOfChildren(
unsigned int n, NodeAllocator& na);
169 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.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
void clearLabel(T *n)
Remove label of node n.
bool hasLabel(T *n) const
Return whether node n has a label.
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
struct Gecode::@554::NNF::@60::@61 b
For binary nodes (and, or, eqv)