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;
150 Node(
int p,
bool failed =
false);
QString getLabel(T *n) const
Get label of node n.
bool isRoot(void) const
Check if this node is the root of a tree.
void setLabel(T *n, const QString &l)
Set label of node n to l.
NodeAllocatorBase< VisualNode > NodeAllocator
T * operator [](int i) const
Return node for index i.
Base class for nodes of the search tree.
unsigned int getNumberOfChildren(void) const
Return the number of children.
NodeAllocatorBase(bool bab)
Constructor.
int getIndex(const NodeAllocator &na) const
Return index of this node.
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.
Node(int p, bool failed=false)
Construct node with parent p.
bool hasLabel(T *n) const
Return whether node n has a label.
struct Gecode::@579::NNF::@61::@62 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.
void setNumberOfChildren(unsigned int n, NodeAllocator &na)
Set the number of children to n and initialize children.
int getParent(void) const
Return the parent.
bool showLabels(void) const
Return branching label flag.
bool bab(void) const
Return branch-and-bound flag.
Node class that supports visual layout
bool isUndetermined(void) const
Return whether this node is undetermined.
int getChild(int n) const
Return index of child no n.
Gecode toplevel namespace