Hi all!
In Bpp-phyl, I have an issue building and using a DRHomogeneousTreeLikelihood object, because after having created such a DRHTL object with some data and a suitable model of evolution, when I call the computeTreeLikelihood() method on this object, it segfaults in the computeSubTreeLikelihoodPrefix() step because of the absence of a proper rootFreqs_ vector. I can see it is still a zero-sized vector at that moment.
A DRHTL object being also an implementation of an AbstractHomogeneousTreeLikelihood object, it first calls the constructor of AHTL, but the line we need is never to be found in this constructor: it is
rootFreqs_ = model_->getFrequencies();
only found in AHTL::computeAllTransitionProbabilities() and in AHTL::applyParameters(), but none of these are called in the chain of operations triggered by the constructor of the DRHTL object...
Best,
JB
P.S. The documentation says that the "full" DRHTL constructor (i.e. the one with a dataset corresponding to the leaves of the tree provided as an argument) also "computes the corresponding likelihood". It seems untrue because the constructor only goes through the init_(); and setData(data); steps. After these two steps minusLogLik_ is still -1, and you have to call DRHTL::computeTreeLikelihood() to get the likelihood value.