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);
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.
unsigned int getNumberOfChildren(void) const
Return the number of children.
NodeAllocatorBase(bool bab)
Constructor.
int getParent(void) const
Return the parent.
QString getLabel(T *n) const
Get label of node n.
int p
Number of positive literals for node type.
bool isRoot(void) const
Check if this node is the root of a tree.
bool bab(void) const
Return branch-and-bound flag.
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 showLabels(void) const
Return branching label flag.
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.
struct Gecode::@519::NNF::@60::@61 b
For binary nodes (and, or, eqv)
int getIndex(const NodeAllocator &na) const
Return index of this node.
Node class that supports visual layout
T * best(int i) const
Return index of best node before i.
int getChild(int n) const
Return index of child no n.
bool isUndetermined(void) const
Return whether this node is undetermined.
bool hasLabel(T *n) const
Return whether node n has a label.