Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Private Attributes

SgUctTreeIterator Class Reference
[Monte Carlo tree search]

Iterator for traversing a tree depth-first. More...

#include <SgUctTree.h>

List of all members.

Public Member Functions

 SgUctTreeIterator (const SgUctTree &tree)
const SgUctNodeoperator* () const
void operator++ ()
 operator bool () const

Private Attributes

const SgUctTreem_tree
const SgUctNodem_current
std::stack< boost::shared_ptr
< SgUctChildIterator > > 
m_stack
 Stack of child iterators.

Detailed Description

Iterator for traversing a tree depth-first.

Definition at line 1108 of file SgUctTree.h.


Constructor & Destructor Documentation

SgUctTreeIterator::SgUctTreeIterator ( const SgUctTree tree  ) 

Definition at line 442 of file SgUctTree.cpp.


Member Function Documentation

SgUctTreeIterator::operator bool (  )  const

Definition at line 481 of file SgUctTree.cpp.

References m_current.

const SgUctNode & SgUctTreeIterator::operator* (  )  const

Definition at line 448 of file SgUctTree.cpp.

References m_current.

void SgUctTreeIterator::operator++ (  ) 

Definition at line 453 of file SgUctTree.cpp.

References SgUctNode::HasChildren(), m_current, m_stack, m_tree, and SG_ASSERT.


Member Data Documentation

Definition at line 1122 of file SgUctTree.h.

Referenced by operator bool(), operator*(), and operator++().

std::stack<boost::shared_ptr<SgUctChildIterator> > SgUctTreeIterator::m_stack [private]

Stack of child iterators.

The elements are owned by the stack (shared_ptr is only used because auto_ptr should not be used with standard containers)

Definition at line 1127 of file SgUctTree.h.

Referenced by operator++().

Definition at line 1120 of file SgUctTree.h.

Referenced by operator++().


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


Sun Mar 13 2011 Doxygen 1.7.1