49 const Tree* treeP = &tree;
60 numberOfAncestors_ = 0;
61 branchLengths_.clear();
64 nodeNumberOfSons_.clear();
70 if (copy)
delete ttreeP;
86 const Node* son = (*node)[
static_cast<int>(i)];
92 computeForSubtree_(son, subHeight, subDepth);
95 if (subHeight > height) height = subHeight;
96 if (subDepth > depth ) depth = subDepth ;
102 branchLengths_.push_back(log(0));
104 nodeHeights_.push_back(height);
105 nodeDepths_.push_back(depth);
virtual N * getRootNode()
virtual bool hasDistanceToFather() const
Tell is this node has a distance to the father.
The phylogenetic tree class.
Interface for phylogenetic tree objects.
void setTree(const Tree &tree)
Compute statistics for a given input tree.
virtual bool isLeaf() const
virtual double getDistanceToFather() const
Get the distance to the father node is there is one, otherwise throw a NodeException.
The phylogenetic node class.
virtual size_t getNumberOfSons() const
void computeForSubtree_(const Node *node, double &height, size_t &depth)