![]() |
Quetzal-CoaTL
The Coalescence Template Library
|
#include <quetzal/io/newick/extended/from_network.hpp>
Generic algorithm to generate the Newick formula of a tree.
Public Types | |
using | node_type = T |
Type of node being formatted. | |
using | formula_type = std::string |
Type of formula being generated. | |
using | policy_type = Policy |
Type of formula being generated. | |
Public Member Functions | |
Formatter (P1 &&has_parent, P2 &&has_children, F1 &&label, F2 &&branch_length) | |
Constructor. | |
auto | pre_order () |
Operation called in the general DFS algorithm to open a parenthesis if node has children to be visited. | |
auto | in_order () |
Operation called in the general DFS algorithm to add a comma between visited nodes. | |
auto | post_order () |
Operation to be passed to a generic DFS algorithm to open a parenthesis if node has children to be visited. | |
void | clear () |
Clear the formula buffer. | |
formula_type | get () const |
Retrieve the formatted string of the given node in the specified format. | |
|
inline |
Operation to be passed to a generic DFS algorithm to open a parenthesis if node has children to be visited.
node | the node currently visited |
|
inline |
Operation called in the general DFS algorithm to open a parenthesis if node has children to be visited.
node | the node currently visited |