SparseLibrary
Version 1.6.0
|
Pre-order tree iterator. More...
#include <Upscaler.hpp>
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... | |
Pre-order tree iterator.
|
inline |
Base constructor.
_p | Pointer to the base class |
initial | Initial position in the tree. |
_pp | Pointer 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.
|
inlinevirtual |
Reimplemented in Upscaler< T >::treePostOrderIterator, and Upscaler< T >::treeInOrderIterator.
References Upscaler< T >::treeIterator::ID, SBDTree::NO_SUCH_NODE, Upscaler< T >::treeIterator::p, Upscaler< T >::treeIterator::p_processed, and Upscaler< T >::treeIterator::walk.
Referenced by Upscaler< T >::determineMinMax(), and Upscaler< T >::getSubTree().
|
inline |
References Upscaler< T >::treeIterator::walk.
Referenced by Upscaler< T >::determineMinMax(), and Upscaler< T >::getSubTree().
|
protected |
Starting position of the iterator.
Referenced by Upscaler< T >::treeIterator::next(), Upscaler< T >::treeInOrderIterator::treeInOrderIterator(), Upscaler< T >::treeIterator::treeIterator(), and Upscaler< T >::treePostOrderIterator::treePostOrderIterator().
Class this iterator works on.
Referenced by Upscaler< T >::treeIterator::next(), Upscaler< T >::treeInOrderIterator::next(), Upscaler< T >::treePostOrderIterator::next(), and Upscaler< T >::treeIterator::treeIterator().
|
protected |
Pointer to the `processed'-vector actually used.
Can be a pointer to treeIterator::processed, or a user-defined vector instead.
Referenced by Upscaler< T >::treeIterator::next(), Upscaler< T >::treeInOrderIterator::next(), Upscaler< T >::treePostOrderIterator::next(), Upscaler< T >::treeInOrderIterator::treeInOrderIterator(), Upscaler< T >::treeIterator::treeIterator(), and Upscaler< T >::treePostOrderIterator::treePostOrderIterator().
|
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().
|
protected |
Current position of the iterator.
Referenced by Upscaler< T >::treeIterator::next(), Upscaler< T >::treeInOrderIterator::next(), Upscaler< T >::treePostOrderIterator::next(), and Upscaler< T >::treeIterator::position().