41 #ifndef _ABSTRACTAGGLOMERATIVEDISTANCEMETHOD_H_ 42 #define _ABSTRACTAGGLOMERATIVEDISTANCEMETHOD_H_ 46 #include "../TreeTemplate.h" 122 #if defined(NO_VIRTUAL_COV) 167 virtual std::vector<size_t>
getBestPair() throw (Exception) = 0;
229 #endif //_ABSTRACTAGGLOMERATIVEDISTANCEMETHOD_H_ virtual double computeDistancesFromPair(const std::vector< size_t > &pair, const std::vector< double > &branchLengths, size_t pos)=0
Actualizes the distance matrix according to a given pair and the corresponding branch lengths...
virtual Node * getLeafNode(int id, const std::string &name)
Get a leaf node.
AbstractAgglomerativeDistanceMethod & operator=(const AbstractAgglomerativeDistanceMethod &a)
virtual std::vector< double > computeBranchLengthsForPair(const std::vector< size_t > &pair)=0
Compute the branch lengths for two nodes to agglomerate.
Partial implementation of the AgglomerativeDistanceMethod interface.
virtual void setDistanceMatrix(const DistanceMatrix &matrix)
Set the distance matrix to use.
virtual TreeTemplate< Node > * getTree() const
Get the computed tree, if there is one.
The phylogenetic tree class.
Interface for phylogenetic tree objects.
virtual ~AbstractAgglomerativeDistanceMethod()
Interface for agglomerative distance methods.
AbstractAgglomerativeDistanceMethod(const DistanceMatrix &matrix, bool verbose=true, bool rootTree=false)
virtual void computeTree()
Compute the tree corresponding to the distance matrix.
AbstractAgglomerativeDistanceMethod(const AbstractAgglomerativeDistanceMethod &a)
The phylogenetic node class.
AbstractAgglomerativeDistanceMethod(bool verbose=true, bool rootTree=false)
std::map< size_t, Node * > currentNodes_
virtual void finalStep(int idRoot)=0
Method called when there ar eonly three remaining node to agglomerate, and creates the root node of t...
virtual std::vector< size_t > getBestPair()=0
Get the best pair of nodes to agglomerate.
virtual Node * getParentNode(int id, Node *son1, Node *son2)
Get an inner node.