log_double_t correction(const data_partition& P,const vector<int>& nodes) { if (P.variable_alignment()) { // get the lengths of then internal node int length = P.seqlength(nodes[0]); return pow(P.sequence_length_pr(length), 2); } else return 1; }
efloat_t prior_HMM_rootless_scale(const data_partition& P) { const Tree& T = *P.T; #ifndef NDEBUG assert(P.has_IModel()); check_internal_nodes_connected(*P.A,T); #endif efloat_t Pr = 1; for(int i=T.n_leaves();i<T.n_nodes();i++) { int l = P.seqlength(i); efloat_t temp = P.IModel().lengthp(l); Pr /= (temp*temp); } return Pr; }