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

Iterator class for iterations over all elements of a certain depth. More...

#include <carlTree.h>

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

Public Types

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

Public Member Functions

 DepthIterator (const tree< T > *t)
 
 DepthIterator (const tree< T > *t, std::size_t root, std::size_t _depth)
 
DepthIteratornext ()
 
DepthIteratorprevious ()
 
template<typename It >
 DepthIterator (const BaseIterator< T, It, reverse > &ii)
 
 DepthIterator (const DepthIterator &ii)
 
 DepthIterator (DepthIterator &&ii)
 
DepthIteratoroperator= (const DepthIterator &it)
 
DepthIteratoroperator= (DepthIterator &&it)
 
virtual ~DepthIterator () 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 depth
 
std::size_t current
 

Protected Attributes

const tree< T > * mTree
 

Detailed Description

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

Iterator class for iterations over all elements of a certain depth.

Definition at line 369 of file carlTree.h.

Member Typedef Documentation

◆ Base

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

Definition at line 373 of file carlTree.h.

Constructor & Destructor Documentation

◆ DepthIterator() [1/5]

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

Definition at line 375 of file carlTree.h.

◆ DepthIterator() [2/5]

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

Definition at line 376 of file carlTree.h.

Here is the call graph for this function:

◆ DepthIterator() [3/5]

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

Definition at line 428 of file carlTree.h.

◆ DepthIterator() [4/5]

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

Definition at line 429 of file carlTree.h.

◆ DepthIterator() [5/5]

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

Definition at line 430 of file carlTree.h.

◆ ~DepthIterator()

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

Member Function Documentation

◆ curnode()

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

Definition at line 86 of file carlTree.h.

◆ depth()

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

Definition at line 96 of file carlTree.h.

◆ id()

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

Definition at line 99 of file carlTree.h.

◆ isRoot()

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

Definition at line 103 of file carlTree.h.

◆ isValid()

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

Definition at line 106 of file carlTree.h.

◆ next()

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

Definition at line 388 of file carlTree.h.

Here is the call graph for this function:

◆ node()

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

Definition at line 79 of file carlTree.h.

◆ operator->() [1/2]

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

Definition at line 109 of file carlTree.h.

◆ operator->() [2/2]

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

Definition at line 112 of file carlTree.h.

◆ operator=() [1/2]

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

Definition at line 431 of file carlTree.h.

Here is the call graph for this function:

◆ operator=() [2/2]

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

Definition at line 436 of file carlTree.h.

Here is the call graph for this function:

◆ previous()

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

Definition at line 407 of file carlTree.h.

Here is the call graph for this function:

Field Documentation

◆ current

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

Definition at line 89 of file carlTree.h.

◆ depth

template<typename T , bool reverse = false>
std::size_t carl::tree_detail::DepthIterator< T, reverse >::depth

Definition at line 374 of file carlTree.h.

◆ mTree

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

Definition at line 76 of file carlTree.h.


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