Tree(std::vector<NodeType> const& branch_start_nodes, std::vector<NodeType> const& branch_end_nodes, std::vector<LengthType> const& branch_lengths);

Constructs the tree object given a list of branches. The list of branches is specified from the corresponding elements in the three vectors passed as arguments.

Arguments

branch_start_nodes

std::vector<NodeType> const&: starting node for every branch in the tree.

branch_end_nodes

std::vector<NodeType> const&: ending node for every branch in the tree; must be the same length as branch_start_nodes.

branch_lengths

std::vector<LengthType> const&: lengths associated with the branches. Pass an empty vector for branch_lengths for a tree without branch lengths (i.e. only a topology).

See also