A library for working with phylogenetic and population genetic data.
v0.27.0
TreeLink Class Reference

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

Detailed Description

Definition at line 52 of file tree/tree/link.hpp.

Public Member Functions

 TreeLink ()
 
 TreeLink (size_t index, TreeLink *next, TreeLink *outer, TreeNode *node, TreeEdge *edge)
 
 TreeLink (TreeLink &&)=delete
 
 TreeLink (TreeLink const &)=delete
 
 ~TreeLink ()=default
 
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...
 
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 &&)=delete
 
TreeLinkoperator= (TreeLink const &)=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)
 Reset the internal pointer to the TreeEdge of this TreeLink. More...
 
TreeLinkreset_index (size_t val)
 Reset the internal index of this TreeLink. More...
 
TreeLinkreset_next (TreeLink *val)
 Reset the internal pointer to the next TreeLink of this TreeLink. More...
 
TreeLinkreset_node (TreeNode *val)
 Reset the internal pointer to the TreeNode of this TreeLink. More...
 
TreeLinkreset_outer (TreeLink *val)
 Reset the internal pointer to the outer TreeLink of this TreeLink. More...
 

Friends

class Tree
 

Constructor & Destructor Documentation

◆ TreeLink() [1/4]

TreeLink ( )
inline

Definition at line 66 of file tree/tree/link.hpp.

◆ TreeLink() [2/4]

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

Definition at line 74 of file tree/tree/link.hpp.

◆ ~TreeLink()

~TreeLink ( )
default

◆ TreeLink() [3/4]

TreeLink ( TreeLink const &  )
delete

◆ TreeLink() [4/4]

TreeLink ( TreeLink &&  )
delete

Member Function Documentation

◆ edge() [1/2]

TreeEdge& edge ( )
inline

Return the TreeEdge of this TreeLink.

Definition at line 172 of file tree/tree/link.hpp.

◆ edge() [2/2]

TreeEdge const& edge ( ) const
inline

Return the TreeEdge of this TreeLink.

Definition at line 180 of file tree/tree/link.hpp.

◆ index()

size_t index ( ) const
inline

Return the index of this Link.

Definition at line 100 of file tree/tree/link.hpp.

◆ next() [1/2]

TreeLink& next ( )
inline

Return the next TreeLink within the TreeNode of this link.

Definition at line 108 of file tree/tree/link.hpp.

◆ next() [2/2]

TreeLink const& next ( ) const
inline

Return the next TreeLink within the TreeNode of this link.

Definition at line 116 of file tree/tree/link.hpp.

◆ node() [1/2]

TreeNode& node ( )
inline

Return the TreeNode of this TreeLink.

Definition at line 188 of file tree/tree/link.hpp.

◆ node() [2/2]

TreeNode const& node ( ) const
inline

Return the TreeNode of this TreeLink.

Definition at line 196 of file tree/tree/link.hpp.

◆ operator=() [1/2]

TreeLink& operator= ( TreeLink &&  )
delete

◆ operator=() [2/2]

TreeLink& operator= ( TreeLink const &  )
delete

◆ outer() [1/2]

TreeLink& outer ( )
inline

Return the TreeLink of the adjacent TreeNode.

Definition at line 156 of file tree/tree/link.hpp.

◆ outer() [2/2]

TreeLink const& outer ( ) const
inline

Return the TreeLink of the adjacent TreeNode.

Definition at line 164 of file tree/tree/link.hpp.

◆ prev() [1/2]

TreeLink& prev ( )
inline

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 127 of file tree/tree/link.hpp.

◆ prev() [2/2]

TreeLink const& prev ( ) const
inline

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 143 of file tree/tree/link.hpp.

◆ reset_edge()

TreeLink& reset_edge ( TreeEdge val)
inline

Reset the internal pointer to the TreeEdge of this TreeLink.

This is a helper function that needs to be used with care and only in cases where appropriate.

This function exists to allow building and modifying a Tree without the need for many friend declarations. However, the function should rarely be needed outside of this context.

Definition at line 271 of file tree/tree/link.hpp.

◆ reset_index()

TreeLink& reset_index ( size_t  val)
inline

Reset the internal index of this TreeLink.

This is a helper function that needs to be used with care and only in cases where appropriate. The index is an invariant that needs to be kept, as it needs to match the index in the Tree container.

This function exists to allow building and modifying a Tree without the need for many friend declarations. However, the function should rarely be needed outside of this context.

Definition at line 215 of file tree/tree/link.hpp.

◆ reset_next()

TreeLink& reset_next ( TreeLink val)
inline

Reset the internal pointer to the next TreeLink of this TreeLink.

This is a helper function that needs to be used with care and only in cases where appropriate.

This function exists to allow building and modifying a Tree without the need for many friend declarations. However, the function should rarely be needed outside of this context.

Definition at line 229 of file tree/tree/link.hpp.

◆ reset_node()

TreeLink& reset_node ( TreeNode val)
inline

Reset the internal pointer to the TreeNode of this TreeLink.

This is a helper function that needs to be used with care and only in cases where appropriate.

This function exists to allow building and modifying a Tree without the need for many friend declarations. However, the function should rarely be needed outside of this context.

Definition at line 257 of file tree/tree/link.hpp.

◆ reset_outer()

TreeLink& reset_outer ( TreeLink val)
inline

Reset the internal pointer to the outer TreeLink of this TreeLink.

This is a helper function that needs to be used with care and only in cases where appropriate.

This function exists to allow building and modifying a Tree without the need for many friend declarations. However, the function should rarely be needed outside of this context.

Definition at line 243 of file tree/tree/link.hpp.

Friends And Related Function Documentation

◆ Tree

friend class Tree
friend

Definition at line 60 of file tree/tree/link.hpp.


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