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

Iterator class for iterations over all leaf elements. More...

#include <carlTree.h>

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

Public Types

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

Public Member Functions

 LeafIterator (const tree< T > *t)
 
 LeafIterator (const tree< T > *t, std::size_t root)
 
LeafIteratornext ()
 
LeafIteratorprevious ()
 
template<typename It >
 LeafIterator (const BaseIterator< T, It, reverse > &ii)
 
 LeafIterator (const LeafIterator &ii)
 
 LeafIterator (LeafIterator &&ii)
 
LeafIteratoroperator= (const LeafIterator &it)
 
LeafIteratoroperator= (LeafIterator &&it)
 
virtual ~LeafIterator () 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::LeafIterator< T, reverse >

Iterator class for iterations over all leaf elements.

Definition at line 310 of file carlTree.h.

Member Typedef Documentation

◆ Base

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

Definition at line 314 of file carlTree.h.

Constructor & Destructor Documentation

◆ LeafIterator() [1/5]

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

Definition at line 315 of file carlTree.h.

◆ LeafIterator() [2/5]

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

Definition at line 316 of file carlTree.h.

◆ LeafIterator() [3/5]

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

Definition at line 345 of file carlTree.h.

◆ LeafIterator() [4/5]

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

Definition at line 346 of file carlTree.h.

◆ LeafIterator() [5/5]

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

Definition at line 347 of file carlTree.h.

◆ ~LeafIterator()

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

Member Function Documentation

◆ curnode()

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

Definition at line 86 of file carlTree.h.

◆ depth()

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

Definition at line 96 of file carlTree.h.

◆ id()

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

Definition at line 99 of file carlTree.h.

◆ isRoot()

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

Definition at line 103 of file carlTree.h.

◆ isValid()

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

Definition at line 106 of file carlTree.h.

◆ next()

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

Definition at line 317 of file carlTree.h.

Here is the call graph for this function:

◆ node()

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

Definition at line 79 of file carlTree.h.

◆ operator->() [1/2]

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

Definition at line 109 of file carlTree.h.

◆ operator->() [2/2]

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

Definition at line 112 of file carlTree.h.

◆ operator=() [1/2]

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

Definition at line 348 of file carlTree.h.

Here is the call graph for this function:

◆ operator=() [2/2]

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

Definition at line 352 of file carlTree.h.

Here is the call graph for this function:

◆ previous()

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

Definition at line 330 of file carlTree.h.

Here is the call graph for this function:

Field Documentation

◆ current

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

Definition at line 89 of file carlTree.h.

◆ mTree

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

Definition at line 76 of file carlTree.h.


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