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 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()=default
bool is_root() const
Return whether this is the root node of the tree.
NewickBrokerElement()
Constructor, initializes the item values.
NewickBrokerElement(long depth)
Constructor, initializes the item values and sets the depth.
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
std::vector< std::string > comments
Arbitrary strings that can be attached to a node, e.g. in Newick format via "[]". ...
std::vector< std::string > tags
Arbitrary strings that can be attached to a node, e.g. in Newick format via "{}". ...
bool is_inner() const
Return whether this is an inner node, i.e., not a leaf node.
long rank() const
Returns the rank (number of immediate children) of this node.
std::string name
Name of the node.
Store the information for one element of a Newick tree.
bool is_leaf() const
Return whether this is a leaf node.
NewickBrokerElement & operator=(NewickBrokerElement const &)=default
long depth
Depth of the node in the tree, i.e. its distance from the root.