Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgUctTreeIterator Class Reference
[Monte Carlo tree search]

#include <SgUctTree.h>

List of all members.

Detailed Description

Iterator for traversing a tree depth-first.

Definition at line 1067 of file SgUctTree.h.

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 > > 
 Stack of child iterators.

Constructor & Destructor Documentation

SgUctTreeIterator::SgUctTreeIterator ( const SgUctTree tree  ) 

Definition at line 436 of file SgUctTree.cpp.

Member Function Documentation

const SgUctNode & SgUctTreeIterator::operator * (  )  const

Definition at line 442 of file SgUctTree.cpp.

References m_current.

SgUctTreeIterator::operator bool (  )  const

Definition at line 475 of file SgUctTree.cpp.

References m_current.

void SgUctTreeIterator::operator++ (  ) 

Definition at line 447 of file SgUctTree.cpp.

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

Member Data Documentation

const SgUctNode* SgUctTreeIterator::m_current [private]

Definition at line 1081 of file SgUctTree.h.

Referenced by operator *(), operator bool(), 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 1087 of file SgUctTree.h.

Referenced by operator++().

const SgUctTree& SgUctTreeIterator::m_tree [private]

Definition at line 1079 of file SgUctTree.h.

Referenced by operator++().

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

17 Jun 2010 Doxygen 1.4.7