A toolkit for working with phylogenetic data.
v0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TreeLink Class Reference

#include <genesis/tree/tree/link.hpp>

Detailed Description

Definition at line 51 of file link.hpp.

Public Member Functions

 TreeLink ()
 
 TreeLink (size_t index, TreeLink *next, TreeLink *outer, TreeNode *node, TreeEdge *edge)
 
 TreeLink (TreeLink const &)=delete
 
 TreeLink (TreeLink &&)=delete
 
 ~TreeLink ()=default
 
std::string dump () const
 Return a string containing dump information about this link. More...
 
TreeEdgeedge ()
 Return the TreeEdge of this TreeLink. More...
 
TreeEdge const & edge () const
 Return the TreeEdge of this TreeLink. More...
 
size_t index () const
 Return the index of this Link. More...
 
bool is_inner () const
 Return true iff the node of this link is an inner node. More...
 
bool is_leaf () const
 Return true iff the node of this link is a leaf node. More...
 
TreeLinknext ()
 Return the next TreeLink within the TreeNode of this link. More...
 
TreeLink const & next () const
 Return the next TreeLink within the TreeNode of this link. More...
 
TreeNodenode ()
 Return the TreeNode of this TreeLink. More...
 
TreeNode const & node () const
 Return the TreeNode of this TreeLink. More...
 
TreeLinkoperator= (TreeLink const &)=delete
 
TreeLinkoperator= (TreeLink &&)=delete
 
TreeLinkouter ()
 Return the TreeLink of the adjacent TreeNode. More...
 
TreeLink const & outer () const
 Return the TreeLink of the adjacent TreeNode. More...
 
TreeLinkprev ()
 Return the previous TreeLink within the TreeNode of this link. More...
 
TreeLink const & prev () const
 Return the previous TreeLink within the TreeNode of this link. More...
 
TreeLinkreset_edge (TreeEdge *val)
 
TreeLinkreset_index (size_t val)
 
TreeLinkreset_next (TreeLink *val)
 
TreeLinkreset_node (TreeNode *val)
 
TreeLinkreset_outer (TreeLink *val)
 

Friends

class Tree
 

Constructor & Destructor Documentation

TreeLink ( )
inline

Definition at line 65 of file link.hpp.

TreeLink ( size_t  index,
TreeLink next,
TreeLink outer,
TreeNode node,
TreeEdge edge 
)
inline

Definition at line 73 of file link.hpp.

~TreeLink ( )
default
TreeLink ( TreeLink const &  )
delete
TreeLink ( TreeLink &&  )
delete

Member Function Documentation

std::string dump ( ) const

Return a string containing dump information about this link.

At the moment, a link does not contain any information, so an empty string is returned. This might change in the future, in case links also contain data.

Definition at line 202 of file link.cpp.

TreeEdge & edge ( )

Return the TreeEdge of this TreeLink.

Definition at line 113 of file link.cpp.

TreeEdge const & edge ( ) const

Return the TreeEdge of this TreeLink.

Definition at line 121 of file link.cpp.

size_t index ( ) const

Return the index of this Link.

Definition at line 43 of file link.cpp.

bool is_inner ( ) const

Return true iff the node of this link is an inner node.

Definition at line 191 of file link.cpp.

bool is_leaf ( ) const

Return true iff the node of this link is a leaf node.

Definition at line 183 of file link.cpp.

TreeLink & next ( )

Return the next TreeLink within the TreeNode of this link.

Definition at line 51 of file link.cpp.

TreeLink const & next ( ) const

Return the next TreeLink within the TreeNode of this link.

Definition at line 59 of file link.cpp.

TreeNode & node ( )

Return the TreeNode of this TreeLink.

Definition at line 129 of file link.cpp.

TreeNode const & node ( ) const

Return the TreeNode of this TreeLink.

Definition at line 137 of file link.cpp.

TreeLink& operator= ( TreeLink const &  )
delete
TreeLink& operator= ( TreeLink &&  )
delete
TreeLink & outer ( )

Return the TreeLink of the adjacent TreeNode.

Definition at line 97 of file link.cpp.

TreeLink const & outer ( ) const

Return the TreeLink of the adjacent TreeNode.

Definition at line 105 of file link.cpp.

TreeLink & prev ( )

Return the previous TreeLink within the TreeNode of this link.

The previous link of a given link L is the one whose next-pointer is pointing to L. As this link first has to be found, this function is not as cheap as next().

Definition at line 70 of file link.cpp.

TreeLink const & prev ( ) const

Return the previous TreeLink within the TreeNode of this link.

The previous link of a given link L is the one whose next-pointer is pointing to L. As this link first has to be found, this function is not as cheap as next().

Definition at line 85 of file link.cpp.

TreeLink & reset_edge ( TreeEdge val)

Definition at line 170 of file link.cpp.

TreeLink & reset_index ( size_t  val)

Definition at line 146 of file link.cpp.

TreeLink & reset_next ( TreeLink val)

Definition at line 152 of file link.cpp.

TreeLink & reset_node ( TreeNode val)

Definition at line 164 of file link.cpp.

TreeLink & reset_outer ( TreeLink val)

Definition at line 158 of file link.cpp.

Friends And Related Function Documentation

friend class Tree
friend

Definition at line 59 of file link.hpp.


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