|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_TREE_TREE_SUBTREE_H_
2 #define GENESIS_TREE_TREE_SUBTREE_H_
105 :
link_( use_primary ? &
edge.primary_link() : &
edge.secondary_link() )
175 #endif // include guard
TreeNode const & node() const
Get the TreeNode at which the subtree starts.
TreeLink const & link() const
Get the TreeLink that separates the subtree from the rest of the tree.
Subtree & operator=(Subtree const &)=default
Subtree(TreeEdge const &edge, bool use_primary=false)
Construct a Subtree in one of the two directions of a given TreeEdge.
TreeNode & node()
Return the TreeNode of this TreeLink.
Subtree(TreeNode const &node)
Construct a Subtree representing the given TreeNode and the part of the Tree away from its root node.
TreeEdge const & edge() const
Get the TreeEdge that separates the subtree from the rest of the tree.
Reference to a subtree of a Tree.
void invert()
Invert/flip the subtree to represent the other (complementary) part of the tree.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
TreeLink & outer()
Return the TreeLink of the adjacent TreeNode.
TreeEdge & edge()
Return the TreeEdge of this TreeLink.
Subtree(TreeLink const &link)
Construct a Subtree that contains all of the tree except for the part that the outer() link of the gi...