34#ifndef GECODE_GIST_NODE_HH
35#define GECODE_GIST_NODE_HH
42namespace 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;
146 Node(
int p,
bool failed =
false);
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
bool bab(void) const
Return branch-and-bound flag.
T * best(int i) const
Return index of best node before i.
QString getLabel(T *n) const
Get label of node n.
bool showLabels(void) const
Return branching label flag.
T * operator[](int i) const
Return node for index i.
bool hasLabel(T *n) const
Return whether node n has a label.
void setLabel(T *n, const QString &l)
Set label of node n to l.
void setBest(int i, int b)
Set index of best node before i to b.
void showLabels(bool b)
Set branching label flag.
NodeAllocatorBase(bool bab)
Constructor.
void clearLabel(T *n)
Remove label of node n.
~NodeAllocatorBase(void)
Destructor.
Base class for nodes of the search tree.
void setNumberOfChildren(unsigned int n, NodeAllocator &na)
Set the number of children to n and initialize children.
unsigned int getNumberOfChildren(void) const
Return the number of children.
NodeAllocatorBase< VisualNode > NodeAllocator
Node(int p, bool failed=false)
Construct node with parent p.
int getParent(void) const
Return the parent.
bool isUndetermined(void) const
Return whether this node is undetermined.
int getChild(int n) const
Return index of child no n.
bool isRoot(void) const
Check if this node is the root of a tree.
int getIndex(const NodeAllocator &na) const
Return index of this node.
Node class that supports visual layout
Gecode toplevel namespace