1 #ifndef CU_TREEALG__HPP
2 #define CU_TREEALG__HPP
48 "Single Linkage Clustering",
102 : m_tree(
NULL), m_rootedness(rooted), m_tmethod(tmethod) {
126 m_rootedness = rooted;
132 bool r = (m_rootedness == eUnrooted) ?
false :
true;
138 m_rootedness = eMidpointRooted;
139 }
else if (m_rootedness == eMidpointRooted) {
140 m_rootedness = DEF_ROOTED;
144 return (m_rootedness == eMidpointRooted);
173 void midpointRootIfNeeded();
const SeqTree * GetTree() const
static const Rootedness DEF_ROOTED
ETreeMethod GetTreeMethod()
bool useMidpointRooting()
virtual void ComputeTree(SeqTree *tree, pProgressFunction pFunc)=0
void SetRootedness(Rootedness rooted)
virtual void SetDistMat(DistanceMatrix *dm)
void SetMidpointRooting(bool rooting)
virtual string toString()
TreeAlgorithm(Rootedness rooted=DEF_ROOTED, ETreeMethod tmethod=eNoTreeMethod)
virtual long GetNumLoopsForTreeCalc()=0
const DistanceMatrix * GetDistMat() const
SeqTree::sibling_iterator TChildIt
Rootedness GetRootedness()
static const string NO_NAME
void(* pProgressFunction)(int Num, int Total)
const ETreeMethod GLOBAL_DEFAULT_ALGORITHM
string GetTreeAlgorithmName(ETreeMethod algorithm)
const int NUMBER_OF_TREE_ALGORITHMS
bool GetMaxPath(const SeqTree &atree, double &dMax, SeqTree::iterator &end1, SeqTree::iterator &end2)
void MidpointRootSeqTree(const SeqTree &oldTree, SeqTree &newTree)
const string TREE_ALGORITHM_NAMES[]
const double RESET_WITH_TINY_DISTANCE
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
#define NCBI_CDUTILS_EXPORT
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)