5 #ifndef BPP_PHYL_TREE_PHYLOTREE_H
6 #define BPP_PHYL_TREE_PHYLOTREE_H
22 class ParametrizablePhyloTree;
37 template<
class T,
class U>
72 std::shared_ptr<PhyloNode>
getPhyloNode(
const std::string& name)
const;
93 void pruneTree(std::vector<std::string> leaves);
101 void scaleTree(std::shared_ptr<PhyloNode> node,
double factor);
143 void addSubTree(std::shared_ptr<PhyloNode> phyloNode,
const Node& node);
The phylogenetic node class.
PhyloTree with Parametrizable Phylo Branches. They SHARE their branch length parameters.
PhyloTree & operator*=(const PhyloTree &phylotree)
Multiplies the lengths of branches of this phylotree by the ones of another phylotree....
void scaleTree(double factor)
Multiply all branch lengths by a given factor.
void addSubTree(std::shared_ptr< PhyloNode > phyloNode, const Node &node)
Concatenate the subtree under a Node (in a TreeTemplate<Node>) to this PhyloTree, under the given phy...
Vdouble getBranchLengths() const
PhyloTree(bool rooted=false)
PhyloTree * clone() const
std::vector< std::string > getAllLeavesNames() const
PhyloTree(AssociationTreeGlobalGraphObserver< T, U > tree)
std::shared_ptr< PhyloNode > getPhyloNode(const std::string &name) const
PhyloTree & operator+=(const PhyloTree &phylotree)
Add the lengths of branches of another phylotree to this one. Just branch ids are considered,...
PhyloTree & operator-=(const PhyloTree &phylotree)
Subtracts the lengths of branches of another phylotree to this one. Just branch ids are considered,...
void setName(const std::string &name)
void pruneTree(std::vector< std::string > leaves)
Prune a tree to a given set of leaf names.
void setBranchLengths(double l)
PhyloTree & operator/=(const PhyloTree &phylotree)
Divides the lengths of branches of this phylotree by the ones of another phylotree....
std::string getName() const
Tree name.
Defines the basic types of data flow nodes.
std::vector< double > Vdouble