
Base class for nodes of the search tree. More...
#include <node.hh>
Public Types | |
| typedef NodeAllocatorBase < VisualNode > | NodeAllocator |
Public Member Functions | |
| Node (int p, bool failed=false) | |
| Construct node with parent p. | |
| int | getParent (void) const |
| Return the parent. | |
| VisualNode * | getParent (const NodeAllocator &na) const |
| Return the parent. | |
| VisualNode * | getChild (const NodeAllocator &na, int n) const |
| Return child no n. | |
| int | getIndex (const NodeAllocator &na) const |
| Return index of this node. | |
| bool | isRoot (void) const |
| Check if this node is the root of a 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. | |
Protected Member Functions | |
| bool | isUndetermined (void) const |
| Return whether this node is undetermined. | |
| int | getChild (int n) const |
| Return index of child no n. | |
| Gecode::Gist::Node::Node | ( | int | p, |
| bool | failed = false |
||
| ) | [inline] |
| bool Gecode::Gist::Node::isUndetermined | ( | void | ) | const [inline, protected] |
| int Gecode::Gist::Node::getChild | ( | int | n | ) | const [inline, protected] |
| int Gecode::Gist::Node::getParent | ( | void | ) | const [inline] |
| VisualNode * Gecode::Gist::Node::getParent | ( | const NodeAllocator & | na | ) | const [inline] |
| VisualNode * Gecode::Gist::Node::getChild | ( | const NodeAllocator & | na, |
| int | n | ||
| ) | const [inline] |
| int Gecode::Gist::Node::getIndex | ( | const NodeAllocator & | na | ) | const [inline] |
| bool Gecode::Gist::Node::isRoot | ( | void | ) | const [inline] |
| void Gecode::Gist::Node::setNumberOfChildren | ( | unsigned int | n, |
| NodeAllocator & | na | ||
| ) |
| unsigned int Gecode::Gist::Node::getNumberOfChildren | ( | void | ) | const [inline] |