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

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

#include <carlTree.h>

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

Public Types

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

Public Member Functions

 PostorderIterator (const tree< T > *t)
 
 PostorderIterator (const tree< T > *t, std::size_t root)
 
PostorderIteratornext ()
 
PostorderIteratorprevious ()
 
template<typename It >
 PostorderIterator (const BaseIterator< T, It, reverse > &ii)
 
 PostorderIterator (const PostorderIterator &ii)
 
 PostorderIterator (PostorderIterator &&ii)
 
PostorderIteratoroperator= (const PostorderIterator &it)
 
PostorderIteratoroperator= (PostorderIterator &&it)
 
virtual ~PostorderIterator () noexcept=default
 
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::PostorderIterator< T, reverse >

Iterator class for post-order iterations over all elements.

Definition at line 246 of file carlTree.h.

Member Typedef Documentation

◆ Base

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

Definition at line 250 of file carlTree.h.

Constructor & Destructor Documentation

◆ PostorderIterator() [1/5]

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

Definition at line 251 of file carlTree.h.

◆ PostorderIterator() [2/5]

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

Definition at line 252 of file carlTree.h.

◆ PostorderIterator() [3/5]

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

Definition at line 286 of file carlTree.h.

◆ PostorderIterator() [4/5]

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

Definition at line 287 of file carlTree.h.

◆ PostorderIterator() [5/5]

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

Definition at line 288 of file carlTree.h.

◆ ~PostorderIterator()

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

Member Function Documentation

◆ curnode()

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

Definition at line 86 of file carlTree.h.

◆ depth()

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

Definition at line 96 of file carlTree.h.

◆ id()

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

Definition at line 99 of file carlTree.h.

◆ isRoot()

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

Definition at line 103 of file carlTree.h.

◆ isValid()

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

Definition at line 106 of file carlTree.h.

◆ next()

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

Definition at line 253 of file carlTree.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ node()

const auto& carl::tree_detail::BaseIterator< T, PostorderIterator< 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, PostorderIterator< T, false > , reverse >::nodes ( ) const
inlineinherited

Definition at line 79 of file carlTree.h.

◆ operator->() [1/2]

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

Definition at line 109 of file carlTree.h.

◆ operator->() [2/2]

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

Definition at line 112 of file carlTree.h.

◆ operator=() [1/2]

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

Definition at line 289 of file carlTree.h.

Here is the call graph for this function:

◆ operator=() [2/2]

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

Definition at line 293 of file carlTree.h.

Here is the call graph for this function:

◆ previous()

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

Definition at line 266 of file carlTree.h.

Here is the call graph for this function:

Field Documentation

◆ current

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

Definition at line 89 of file carlTree.h.

◆ mTree

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

Definition at line 76 of file carlTree.h.


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