Gecode::Gist::Node Class Reference

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.

## Detailed Description

Base class for nodes of the search tree.

Definition at line 106 of file node.hh.

## Member Typedef Documentation

## NodeAllocator

typedef NodeAllocatorBase<VisualNode> Gecode::Gist::Node::NodeAllocator

Definition at line 143 of file node.hh.

## Constructor & Destructor Documentation

## Node()

Gecode::Gist::Node::Node | ( | int | p,
|  | bool | failed = false )

inline

Construct node with parent p.

Definition at line 175 of file node.hpp.

## Member Function Documentation

## isUndetermined()

bool Gecode::Gist::Node::isUndetermined | ( | void |  | ) | const

inline protected

Return whether this node is undetermined.

Definition at line 192 of file node.hpp.

## getChild() [1/2]

int Gecode::Gist::Node::getChild | ( | int | n | ) | const

inline protected

Return index of child no n.

Definition at line 195 of file node.hpp.

## getParent() [1/2]

int Gecode::Gist::Node::getParent | ( | void |  | ) | const

inline

Return the parent.

Definition at line 182 of file node.hpp.

## getParent() [2/2]

VisualNode * Gecode::Gist::Node::getParent | ( | const NodeAllocator & | na | ) | const

inline

Return the parent.

Definition at line 187 of file node.hpp.

## getChild() [2/2]

VisualNode * Gecode::Gist::Node::getChild | ( | const NodeAllocator & | na,
|  | int | n ) const

inline

Return child no n.

Definition at line 206 of file node.hpp.

## getIndex()

int Gecode::Gist::Node::getIndex | ( | const NodeAllocator & | na | ) | const

inline

Return index of this node.

Definition at line 227 of file node.hpp.

## isRoot()

bool Gecode::Gist::Node::isRoot | ( | void |  | ) | const

inline

Check if this node is the root of a tree.

Definition at line 211 of file node.hpp.

## setNumberOfChildren()

void Gecode::Gist::Node::setNumberOfChildren | ( | unsigned int | n,
|  | NodeAllocator & | na )

Set the number of children to n and initialize children.

Definition at line 42 of file node.cpp.

## getNumberOfChildren()

unsigned int Gecode::Gist::Node::getNumberOfChildren | ( | void |  | ) | const

inline

Return the number of children.

Definition at line 214 of file node.hpp.

The documentation for this class was generated from the following files:

- gecode/gist/node.hh
- gecode/gist/node.cpp
- gecode/gist/node.hpp