A library for working with phylogenetic and population genetic data.
v0.27.0
IteratorLevelorder< is_const > Class Template Reference

#include <genesis/tree/iterator/levelorder.hpp>

Detailed Description

template<bool is_const = true>
class genesis::tree::IteratorLevelorder< is_const >

Definition at line 61 of file tree/iterator/levelorder.hpp.

Public Member Functions

 IteratorLevelorder ()
 
 IteratorLevelorder (IteratorLevelorder &&)=default
 
 IteratorLevelorder (IteratorLevelorder const &)=default
 
 IteratorLevelorder (LinkType &link)
 
 IteratorLevelorder (NodeType &node)
 
 IteratorLevelorder (Subtree const &subtree)
 
 IteratorLevelorder (TreeType &tree)
 
 ~IteratorLevelorder ()=default
 
int depth () const
 
EdgeTypeedge () const
 
bool is_first_iteration () const
 
LinkTypelink () const
 
NodeTypenode () const
 
bool operator!= (const self_type &other) const
 
self_type operator* ()
 
self_type operator++ ()
 
self_type operator++ (int)
 
IteratorLevelorderoperator= (IteratorLevelorder &&)=default
 
IteratorLevelorderoperator= (IteratorLevelorder const &)=default
 
bool operator== (const self_type &other) const
 
LinkTypestart_link () const
 
NodeTypestart_node () const
 

Public Types

using EdgeType = typename std::conditional< is_const, TreeEdge const, TreeEdge >::type
 
using iterator_category = std::forward_iterator_tag
 
using LinkType = typename std::conditional< is_const, TreeLink const, TreeLink >::type
 
using NodeType = typename std::conditional< is_const, TreeNode const, TreeNode >::type
 
using self_type = IteratorLevelorder< is_const >
 
using TreeType = typename std::conditional< is_const, Tree const, Tree >::type
 

Constructor & Destructor Documentation

◆ IteratorLevelorder() [1/7]

IteratorLevelorder ( )
inline

Definition at line 87 of file tree/iterator/levelorder.hpp.

◆ IteratorLevelorder() [2/7]

IteratorLevelorder ( TreeType tree)
inlineexplicit

Definition at line 93 of file tree/iterator/levelorder.hpp.

◆ IteratorLevelorder() [3/7]

IteratorLevelorder ( NodeType node)
inlineexplicit

Definition at line 97 of file tree/iterator/levelorder.hpp.

◆ IteratorLevelorder() [4/7]

IteratorLevelorder ( LinkType link)
inlineexplicit

Definition at line 101 of file tree/iterator/levelorder.hpp.

◆ IteratorLevelorder() [5/7]

IteratorLevelorder ( Subtree const &  subtree)
inlineexplicit

Definition at line 112 of file tree/iterator/levelorder.hpp.

◆ ~IteratorLevelorder()

~IteratorLevelorder ( )
default

◆ IteratorLevelorder() [6/7]

IteratorLevelorder ( IteratorLevelorder< is_const > const &  )
default

◆ IteratorLevelorder() [7/7]

IteratorLevelorder ( IteratorLevelorder< is_const > &&  )
default

Member Function Documentation

◆ depth()

int depth ( ) const
inline

Definition at line 181 of file tree/iterator/levelorder.hpp.

◆ edge()

EdgeType& edge ( ) const
inline

Definition at line 196 of file tree/iterator/levelorder.hpp.

◆ is_first_iteration()

bool is_first_iteration ( ) const
inline

Definition at line 176 of file tree/iterator/levelorder.hpp.

◆ link()

LinkType& link ( ) const
inline

Definition at line 186 of file tree/iterator/levelorder.hpp.

◆ node()

NodeType& node ( ) const
inline

Definition at line 191 of file tree/iterator/levelorder.hpp.

◆ operator!=()

bool operator!= ( const self_type other) const
inline

Definition at line 167 of file tree/iterator/levelorder.hpp.

◆ operator*()

self_type operator* ( )
inline

Definition at line 134 of file tree/iterator/levelorder.hpp.

◆ operator++() [1/2]

self_type operator++ ( )
inline

Definition at line 139 of file tree/iterator/levelorder.hpp.

◆ operator++() [2/2]

self_type operator++ ( int  )
inline

Definition at line 155 of file tree/iterator/levelorder.hpp.

◆ operator=() [1/2]

IteratorLevelorder& operator= ( IteratorLevelorder< is_const > &&  )
default

◆ operator=() [2/2]

IteratorLevelorder& operator= ( IteratorLevelorder< is_const > const &  )
default

◆ operator==()

bool operator== ( const self_type other) const
inline

Definition at line 162 of file tree/iterator/levelorder.hpp.

◆ start_link()

LinkType& start_link ( ) const
inline

Definition at line 201 of file tree/iterator/levelorder.hpp.

◆ start_node()

NodeType& start_node ( ) const
inline

Definition at line 206 of file tree/iterator/levelorder.hpp.

Member Typedef Documentation

◆ EdgeType

using EdgeType = typename std::conditional< is_const, TreeEdge const, TreeEdge >::type

Definition at line 74 of file tree/iterator/levelorder.hpp.

◆ iterator_category

using iterator_category = std::forward_iterator_tag

Definition at line 77 of file tree/iterator/levelorder.hpp.

◆ LinkType

using LinkType = typename std::conditional< is_const, TreeLink const, TreeLink >::type

Definition at line 72 of file tree/iterator/levelorder.hpp.

◆ NodeType

using NodeType = typename std::conditional< is_const, TreeNode const, TreeNode >::type

Definition at line 73 of file tree/iterator/levelorder.hpp.

◆ self_type

using self_type = IteratorLevelorder< is_const >

Definition at line 76 of file tree/iterator/levelorder.hpp.

◆ TreeType

using TreeType = typename std::conditional< is_const, Tree const, Tree >::type

Definition at line 71 of file tree/iterator/levelorder.hpp.


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