45 #include "../TreeTemplate.h" 73 PGMA(
bool weighted =
true) :
84 PGMA(
const DistanceMatrix& matrix,
bool weighted =
true,
bool verbose =
true) throw (Exception) :
108 std::vector<size_t>
getBestPair() throw (Exception);
virtual Node * getParentNode(int id, Node *son1, Node *son2)
Get an inner node.
TreeTemplate< Node > * getTree() const
Get the computed tree, if there is one.
Partial implementation of the AgglomerativeDistanceMethod interface.
virtual void setDistanceMatrix(const DistanceMatrix &matrix)
Set the distance matrix to use.
The phylogenetic tree class.
std::vector< size_t > getBestPair()
Get the best pair of nodes to agglomerate.
double computeDistancesFromPair(const std::vector< size_t > &pair, const std::vector< double > &branchLengths, size_t pos)
Actualizes the distance matrix according to a given pair and the corresponding branch lengths...
virtual void computeTree()
Compute the tree corresponding to the distance matrix.
Inner data structure for WPGMA and UPGMA distance methods.
std::string getName() const
The phylogenetic node class.
std::vector< double > computeBranchLengthsForPair(const std::vector< size_t > &pair)
Compute the branch lengths for two nodes to agglomerate.
Compute WPGMA and UPGMA trees from a distance matrix.
virtual Node * getLeafNode(int id, const std::string &name)
Get a leaf node.
void setWeighted(bool weighted)
PGMA(const DistanceMatrix &matrix, bool weighted=true, bool verbose=true)
Create a (U/W)PGMA object instance.
void setDistanceMatrix(const DistanceMatrix &matrix)
Set the distance matrix to use.
void finalStep(int idRoot)
Method called when there ar eonly three remaining node to agglomerate, and creates the root node of t...