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);
160 int getIndex(
const NodeAllocator& na)
const;
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.
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.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
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.