Generated on Fri Oct 19 11:26:00 2018 for Gecode by doxygen 1.6.3

Gecode::Gist::NodeCursor< Node > Class Template Reference

A cursor that can be run over a tree. More...

#include <nodecursor.hh>

List of all members.

Public Member Functions

 NodeCursor (Node *theNode, const typename Node::NodeAllocator &na)
 Construct cursor, initially set to theNode.
Nodenode (void)
 Return current node.
unsigned int alternative (void)
 Return current alternative.
void alternative (unsigned int a)
 Set current alternative.

Protected Member Functions

void node (Node *n)
 Set current node to n.
NodestartNode (void)
 Return start node.

Protected Attributes

const Node::NodeAllocatorna
 The node allocator.

Cursor interface



bool mayMoveUpwards (void)
 Test if the cursor may move to the parent node.
void moveUpwards (void)
 Move cursor to the parent node.
bool mayMoveDownwards (void)
 Test if cursor may move to the first child node.
void moveDownwards (void)
 Move cursor to the first child node.
bool mayMoveSidewards (void)
 Test if cursor may move to the first sibling.
void moveSidewards (void)
 Move cursor to the first sibling.

Detailed Description

template<class Node>
class Gecode::Gist::NodeCursor< Node >

A cursor that can be run over a tree.

Definition at line 43 of file nodecursor.hh.


Constructor & Destructor Documentation

template<class Node>
Gecode::Gist::NodeCursor< Node >::NodeCursor ( Node theNode,
const typename Node::NodeAllocator na 
) [inline]

Construct cursor, initially set to theNode.

Definition at line 38 of file nodecursor.hpp.


Member Function Documentation

template<class Node>
void Gecode::Gist::NodeCursor< Node >::node ( Node n  )  [inline, protected]

Set current node to n.

Definition at line 62 of file nodecursor.hpp.

template<class Node >
Node * Gecode::Gist::NodeCursor< Node >::startNode ( void   )  [inline, protected]

Return start node.

Definition at line 58 of file nodecursor.hpp.

template<class Node>
Node * Gecode::Gist::NodeCursor< Node >::node ( void   )  [inline]

Return current node.

Definition at line 46 of file nodecursor.hpp.

template<class Node >
unsigned int Gecode::Gist::NodeCursor< Node >::alternative ( void   )  [inline]

Return current alternative.

Definition at line 50 of file nodecursor.hpp.

template<class Node >
void Gecode::Gist::NodeCursor< Node >::alternative ( unsigned int  a  )  [inline]

Set current alternative.

Definition at line 54 of file nodecursor.hpp.

template<class Node >
bool Gecode::Gist::NodeCursor< Node >::mayMoveUpwards ( void   )  [inline]

Test if the cursor may move to the parent node.

Reimplemented in Gecode::Gist::NextSolCursor.

Definition at line 66 of file nodecursor.hpp.

template<class Node >
void Gecode::Gist::NodeCursor< Node >::moveUpwards ( void   )  [inline]

Move cursor to the parent node.

Reimplemented in Gecode::Gist::DrawingCursor, and Gecode::Gist::StatCursor.

Definition at line 72 of file nodecursor.hpp.

template<class Node >
bool Gecode::Gist::NodeCursor< Node >::mayMoveDownwards ( void   )  [inline]

Test if cursor may move to the first child node.

Reimplemented in Gecode::Gist::DrawingCursor, Gecode::Gist::LayoutCursor, Gecode::Gist::HideFailedCursor, and Gecode::Gist::NextSolCursor.

Definition at line 89 of file nodecursor.hpp.

template<class Node >
void Gecode::Gist::NodeCursor< Node >::moveDownwards ( void   )  [inline]

Move cursor to the first child node.

Reimplemented in Gecode::Gist::DrawingCursor, Gecode::Gist::NextSolCursor, and Gecode::Gist::StatCursor.

Definition at line 95 of file nodecursor.hpp.

template<class Node >
bool Gecode::Gist::NodeCursor< Node >::mayMoveSidewards ( void   )  [inline]

Test if cursor may move to the first sibling.

Reimplemented in Gecode::Gist::NextSolCursor.

Definition at line 102 of file nodecursor.hpp.

template<class Node >
void Gecode::Gist::NodeCursor< Node >::moveSidewards ( void   )  [inline]

Move cursor to the first sibling.

Reimplemented in Gecode::Gist::DrawingCursor, and Gecode::Gist::NextSolCursor.

Definition at line 109 of file nodecursor.hpp.


Member Data Documentation

template<class Node>
const Node::NodeAllocator& Gecode::Gist::NodeCursor< Node >::na [protected]

The node allocator.

Definition at line 53 of file nodecursor.hh.


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