carl  24.04
Computer ARithmetic Library
carl::tree_detail::PreorderIterator< T, reverse > Struct Template Reference

Iterator class for pre-order iterations over all elements. More...

#include <carlTree.h>

Inheritance diagram for carl::tree_detail::PreorderIterator< T, reverse >:
Collaboration diagram for carl::tree_detail::PreorderIterator< T, reverse >:

Public Types

using Base = BaseIterator< T, PreorderIterator< T, reverse >, reverse >
 

Public Member Functions

 PreorderIterator (const tree< T > *t)
 
 PreorderIterator (const tree< T > *t, std::size_t root)
 
PreorderIteratornext ()
 
PreorderIteratorprevious ()
 
template<typename It , bool rev>
 PreorderIterator (const BaseIterator< T, It, rev > &ii)
 
 PreorderIterator (const PreorderIterator &ii)
 
 PreorderIterator (PreorderIterator &&ii)
 
PreorderIteratoroperator= (const PreorderIterator &it)
 
PreorderIteratoroperator= (PreorderIterator &&it)
 
virtual ~PreorderIterator () noexcept=default
 
PreorderIteratorskipChildren ()
 
const auto & nodes () const
 
const auto & node (std::size_t id) const
 
const auto & curnode () const
 
std::size_t depth () const
 
std::size_t id () const
 
bool isRoot () const
 
bool isValid () const
 
T * operator-> ()
 
T const * operator-> () const
 

Data Fields

std::size_t current
 

Protected Attributes

const tree< T > * mTree
 

Detailed Description

template<typename T, bool reverse = false>
struct carl::tree_detail::PreorderIterator< T, reverse >

Iterator class for pre-order iterations over all elements.

Definition at line 176 of file carlTree.h.

Member Typedef Documentation

◆ Base

template<typename T , bool reverse = false>
using carl::tree_detail::PreorderIterator< T, reverse >::Base = BaseIterator<T,PreorderIterator<T,reverse>, reverse>

Definition at line 180 of file carlTree.h.

Constructor & Destructor Documentation

◆ PreorderIterator() [1/5]

template<typename T , bool reverse = false>
carl::tree_detail::PreorderIterator< T, reverse >::PreorderIterator ( const tree< T > *  t)
inline

Definition at line 181 of file carlTree.h.

◆ PreorderIterator() [2/5]

template<typename T , bool reverse = false>
carl::tree_detail::PreorderIterator< T, reverse >::PreorderIterator ( const tree< T > *  t,
std::size_t  root 
)
inline

Definition at line 182 of file carlTree.h.

◆ PreorderIterator() [3/5]

template<typename T , bool reverse = false>
template<typename It , bool rev>
carl::tree_detail::PreorderIterator< T, reverse >::PreorderIterator ( const BaseIterator< T, It, rev > &  ii)
inline

Definition at line 212 of file carlTree.h.

◆ PreorderIterator() [4/5]

template<typename T , bool reverse = false>
carl::tree_detail::PreorderIterator< T, reverse >::PreorderIterator ( const PreorderIterator< T, reverse > &  ii)
inline

Definition at line 213 of file carlTree.h.

◆ PreorderIterator() [5/5]

template<typename T , bool reverse = false>
carl::tree_detail::PreorderIterator< T, reverse >::PreorderIterator ( PreorderIterator< T, reverse > &&  ii)
inline

Definition at line 214 of file carlTree.h.

◆ ~PreorderIterator()

template<typename T , bool reverse = false>
virtual carl::tree_detail::PreorderIterator< T, reverse >::~PreorderIterator ( )
virtualdefaultnoexcept

Member Function Documentation

◆ curnode()

const auto& carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::curnode ( ) const
inlineinherited

Definition at line 86 of file carlTree.h.

◆ depth()

std::size_t carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::depth ( ) const
inlineinherited

Definition at line 96 of file carlTree.h.

◆ id()

std::size_t carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::id ( ) const
inlineinherited

Definition at line 99 of file carlTree.h.

◆ isRoot()

bool carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::isRoot ( ) const
inlineinherited

Definition at line 103 of file carlTree.h.

◆ isValid()

bool carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::isValid ( ) const
inlineinherited

Definition at line 106 of file carlTree.h.

◆ next()

template<typename T , bool reverse = false>
PreorderIterator& carl::tree_detail::PreorderIterator< T, reverse >::next ( )
inline

Definition at line 183 of file carlTree.h.

Here is the call graph for this function:

◆ node()

const auto& carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::node ( std::size_t  id) const
inlineinherited

Definition at line 82 of file carlTree.h.

◆ nodes()

const auto& carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::nodes ( ) const
inlineinherited

Definition at line 79 of file carlTree.h.

◆ operator->() [1/2]

T* carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::operator-> ( )
inlineinherited

Definition at line 109 of file carlTree.h.

◆ operator->() [2/2]

T const* carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::operator-> ( ) const
inlineinherited

Definition at line 112 of file carlTree.h.

◆ operator=() [1/2]

template<typename T , bool reverse = false>
PreorderIterator& carl::tree_detail::PreorderIterator< T, reverse >::operator= ( const PreorderIterator< T, reverse > &  it)
inline

Definition at line 215 of file carlTree.h.

Here is the call graph for this function:

◆ operator=() [2/2]

template<typename T , bool reverse = false>
PreorderIterator& carl::tree_detail::PreorderIterator< T, reverse >::operator= ( PreorderIterator< T, reverse > &&  it)
inline

Definition at line 219 of file carlTree.h.

Here is the call graph for this function:

◆ previous()

template<typename T , bool reverse = false>
PreorderIterator& carl::tree_detail::PreorderIterator< T, reverse >::previous ( )
inline

Definition at line 197 of file carlTree.h.

Here is the call graph for this function:

◆ skipChildren()

template<typename T , bool reverse = false>
PreorderIterator& carl::tree_detail::PreorderIterator< T, reverse >::skipChildren ( )
inline

Definition at line 225 of file carlTree.h.

Here is the call graph for this function:

Field Documentation

◆ current

std::size_t carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::current
inherited

Definition at line 89 of file carlTree.h.

◆ mTree

const tree<T>* carl::tree_detail::BaseIterator< T, PreorderIterator< T, false > , reverse >::mTree
protectedinherited

Definition at line 76 of file carlTree.h.


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