Generated on Mon May 10 06:46:55 2010 for Gecode by doxygen 1.6.3

Gecode::Gist::Node Class Reference

Base class for nodes of the search tree. More...

#include <node.hh>

List of all members.

Public Types

typedef
Support::BlockAllocator
< VisualNode, NodeBlockSize > 
NodeAllocator

Public Member Functions

 Node (void)
 Default constructor.
 ~Node (void)
 Destructor.
NodegetParent (void)
 Return the parent.
NodegetChild (unsigned int n)
 Return child no n.
bool isRoot (void) const
 Check if this node is the root of a tree.
void setNumberOfChildren (unsigned int n)
 Set the number of children to n.
void setChild (unsigned int n, Node *child)
 Set child number n to be child.
void addChild (Node *child)
 Add new child node.
unsigned int getNumberOfChildren (void) const
 Return the number of children.

Protected Member Functions

bool isUndetermined (void) const
 Return whether this node is undetermined.

Detailed Description

Base class for nodes of the search tree.

Definition at line 50 of file node.hh.


Member Typedef Documentation

Definition at line 85 of file node.hh.


Constructor & Destructor Documentation

Gecode::Gist::Node::Node ( void   )  [inline]

Default constructor.

Definition at line 61 of file node.hpp.

Gecode::Gist::Node::~Node ( void   ) 

Destructor.

Definition at line 45 of file node.cpp.


Member Function Documentation

bool Gecode::Gist::Node::isUndetermined ( void   )  const [inline, protected]

Return whether this node is undetermined.

Definition at line 71 of file node.hpp.

Node * Gecode::Gist::Node::getParent ( void   )  [inline]

Return the parent.

Reimplemented in Gecode::Gist::SpaceNode, and Gecode::Gist::VisualNode.

Definition at line 68 of file node.hpp.

Node * Gecode::Gist::Node::getChild ( unsigned int  n  )  [inline]

Return child no n.

Definition at line 74 of file node.hpp.

bool Gecode::Gist::Node::isRoot ( void   )  const [inline]

Check if this node is the root of a tree.

Definition at line 86 of file node.hpp.

void Gecode::Gist::Node::setNumberOfChildren ( unsigned int  n  ) 

Set the number of children to n.

Definition at line 63 of file node.cpp.

void Gecode::Gist::Node::setChild ( unsigned int  n,
Node child 
)

Set child number n to be child.

Definition at line 88 of file node.cpp.

void Gecode::Gist::Node::addChild ( Node child  ) 

Add new child node.

Definition at line 105 of file node.cpp.

unsigned int Gecode::Gist::Node::getNumberOfChildren ( void   )  const [inline]

Return the number of children.

Definition at line 89 of file node.hpp.


Member Data Documentation

The second child or NULL, in case of at most two children.

Definition at line 68 of file node.hh.

The number of children, in case it is greater than 2.

Definition at line 70 of file node.hh.


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