SparseLibrary  Version 1.6.0
Public Member Functions | Protected Attributes | List of all members
Upscaler< T >::treeIterator Class Reference

Pre-order tree iterator. More...

#include <Upscaler.hpp>

Inheritance diagram for Upscaler< T >::treeIterator:
Inheritance graph
[legend]

Public Member Functions

 treeIterator (Upscaler< T > *_p, const unsigned long int initial, std::vector< bool > *_pp=NULL)
 Base constructor. More...
 
unsigned long int position ()
 
virtual bool next ()
 

Protected Attributes

unsigned long int walk
 Current position of the iterator. More...
 
unsigned long int ID
 Starting position of the iterator. More...
 
std::vector< bool > processed
 Processed[ i ] is true when this iterator has visited its i-th child. More...
 
std::vector< bool > * p_processed
 Pointer to the `processed'-vector actually used. More...
 
Upscaler< T > * p
 Class this iterator works on. More...
 

Detailed Description

template<typename T>
class Upscaler< T >::treeIterator

Pre-order tree iterator.

Constructor & Destructor Documentation

template<typename T>
Upscaler< T >::treeIterator::treeIterator ( Upscaler< T > *  _p,
const unsigned long int  initial,
std::vector< bool > *  _pp = NULL 
)
inline

Base constructor.

Parameters
_pPointer to the base class
initialInitial position in the tree.
_ppPointer to a vector where the visited subtrees may be stored.

References Upscaler< T >::treeIterator::ID, Upscaler< T >::treeIterator::p, Upscaler< T >::treeIterator::p_processed, and Upscaler< T >::treeIterator::processed.

Member Function Documentation

template<typename T>
virtual bool Upscaler< T >::treeIterator::next ( )
inlinevirtual
template<typename T>
unsigned long int Upscaler< T >::treeIterator::position ( )
inline
Returns
Returns the current position.

References Upscaler< T >::treeIterator::walk.

Referenced by Upscaler< T >::determineMinMax(), and Upscaler< T >::getSubTree().

Member Data Documentation

template<typename T>
unsigned long int Upscaler< T >::treeIterator::ID
protected
template<typename T>
Upscaler< T >* Upscaler< T >::treeIterator::p
protected
template<typename T>
std::vector< bool >* Upscaler< T >::treeIterator::p_processed
protected
template<typename T>
std::vector< bool > Upscaler< T >::treeIterator::processed
protected

Processed[ i ] is true when this iterator has visited its i-th child.

May be unused if a pre-allocated vector is given to the iterator instead.

Referenced by Upscaler< T >::treeIterator::treeIterator().

template<typename T>
unsigned long int Upscaler< T >::treeIterator::walk
protected

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