This method has two overwrites:

1. Set the lengths of the branches in the order given by their application-specific end-nodes:

void SetBranchLengths( std::vector<NodeType> const& nodes_branch_ends, std::vector<LengthType> const& lengths);

2. Set a new internally stored vector of branch lengths:

void SetBranchLengths( std::vector<LengthType> const& lengths);

If the tree has no branch lengths, the supplied arguments should be of length M-1, where M is the total number of nodes in the tree (-1, because there is no branch leading to the root).

Arguments

nodes_branch_ends

std::vector<NodeType> const&: a const reference to a new vector of branch lengths, in the order of the nodes in nodes_branch_ends.

lengths

std::vector<LengthType> const&:

For overwrite 1.

a const reference to a new vector of branch lengths, in the order of the nodes in nodes_branch_ends;

For overwrite 2.

a const reference to a new vector of branch lengths, in the order of the end-node ids. In this case (2.), the vector should be of length M-1, where M is the number of nodes in the tree.

Value

void

See also