|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_TREE_FORMATS_NEWICK_ELEMENT_H_
2 #define GENESIS_TREE_FORMATS_NEWICK_ELEMENT_H_
152 throw std::logic_error(
"NewickBroker::assign_ranks() was not called before.");
171 throw std::logic_error(
"NewickBroker::is_leaf() was not called before.");
182 throw std::logic_error(
"NewickBroker::is_leaf() was not called before.");
198 #endif // include guard
bool is_inner() const
Return whether this is an inner node, i.e., not a leaf node.
std::string name
Name of the node.
~NewickBrokerElement()=default
NewickBrokerElement()
Constructor, initializes the item values.
bool is_root() const
Return whether this is the root node of the tree.
std::vector< std::string > comments
Arbitrary strings that can be attached to a node, e.g. in Newick format via "[]".
NewickBrokerElement(std::string const &name, long depth)
Constructor, initializes the item values and sets the name and the depth.
std::vector< std::string > values
Numerical values associated with the node, i.e. branch lengths.
NewickBrokerElement & operator=(NewickBrokerElement const &)=default
long rank() const
Returns the rank (number of immediate children) of this node.
std::vector< std::string > tags
Arbitrary strings that can be attached to a node, e.g. in Newick format via "{}".
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
bool is_leaf() const
Return whether this is a leaf node.
long depth
Depth of the node in the tree, i.e. its distance from the root.
Store the information for one element of a Newick tree.
NewickBrokerElement(long depth)
Constructor, initializes the item values and sets the depth.