5 #ifndef BPP_PHYL_LIKELIHOOD_PHYLOLIKELIHOODS_MULTIPROCESSSEQUENCEPHYLOLIKELIHOOD_H
6 #define BPP_PHYL_LIKELIHOOD_PHYLOLIKELIHOODS_MULTIPROCESSSEQUENCEPHYLOLIKELIHOOD_H
10 #include "../DataFlow/LikelihoodCalculationSingleProcess.h"
11 #include "../MultiProcessSequenceEvolution.h"
39 std::shared_ptr<MultiProcessSequenceEvolution>
mSeqEvol_;
46 mutable std::vector<std::shared_ptr<LikelihoodCalculationSingleProcess>>
vLikCal_;
50 std::shared_ptr<const AlignmentDataInterface> data,
51 std::shared_ptr<MultiProcessSequenceEvolution> processSeqEvol,
52 std::shared_ptr<CollectionNodes> collNodes,
59 mSeqEvol_(mpspl.mSeqEvol_),
60 vLikCal_(mpspl.vLikCal_)
65 AbstractParametrizableSequencePhyloLikelihood::operator=(mpspl);
80 std::shared_ptr<const AlignmentDataInterface>
getData()
const override
82 return vLikCal_[0]->getData();
87 return vLikCal_[0]->stateMap().getAlphabet();
109 return vLikCal_[p]->getLikelihoodForASite(site);
112 VVdouble getLikelihoodPerSitePerProcess()
const;
124 for (
auto& lik : vLikCal_)
126 if (!lik->isInitialized())
140 void setData(std::shared_ptr<const AlignmentDataInterface> sites,
size_t nData = 0)
override;
Partial implementation of the Likelihood interface for multiple processes.
std::vector< std::shared_ptr< LikelihoodCalculationSingleProcess > > vLikCal_
virtual ~MultiProcessSequencePhyloLikelihood()
MultiProcessSequencePhyloLikelihood(const MultiProcessSequencePhyloLikelihood &mpspl)
size_t getNumberOfSubstitutionProcess() const
Return the number of process used for computation.
bool isInitialized() const override
Sets the computeLikelihoods_ to true.
std::shared_ptr< const AlignmentDataInterface > getData() const override
Get the dataset for which the likelihood must be evaluated.
std::shared_ptr< LikelihoodCalculationSingleProcess > getLikelihoodCalculationForAProcess(size_t p)
virtual VVdouble getPosteriorProbabilitiesPerSitePerProcess() const =0
std::shared_ptr< MultiProcessSequenceEvolution > mSeqEvol_
to avoid the dynamic casts
MultiProcessSequencePhyloLikelihood & operator=(const MultiProcessSequencePhyloLikelihood &mpspl)
DataLik getLikelihoodForASiteForAProcess(size_t site, size_t p) const
Get the likelihood for a site for a process.
std::shared_ptr< const Alphabet > getAlphabet() const override
Get the alphabet associated to the dataset.
Defines the basic types of data flow nodes.
std::vector< Vdouble > VVdouble