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,
80 std::shared_ptr<const AlignmentDataInterface>
getData()
const override
87 return vLikCal_[0]->stateMap().getAlphabet();
109 return vLikCal_[p]->getLikelihoodForASite(site);
126 if (!lik->isInitialized())
140 void setData(std::shared_ptr<const AlignmentDataInterface> sites,
size_t nData = 0)
override;
AbstractParametrizableSequencePhyloLikelihood & operator=(const AbstractParametrizableSequencePhyloLikelihood &apspl)
Partial implementation of the Likelihood interface for multiple processes.
std::vector< std::shared_ptr< LikelihoodCalculationSingleProcess > > vLikCal_
virtual ~MultiProcessSequencePhyloLikelihood()
std::shared_ptr< const AlignmentDataInterface > getData() const override
Get the dataset for which the likelihood must be evaluated.
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.
void setData(std::shared_ptr< const AlignmentDataInterface > sites, size_t nData=0) override
Set the dataset for which the likelihood must be evaluated.
virtual VVdouble getPosteriorProbabilitiesPerSitePerProcess() const =0
std::shared_ptr< MultiProcessSequenceEvolution > mSeqEvol_
to avoid the dynamic casts
MultiProcessSequencePhyloLikelihood & operator=(const MultiProcessSequencePhyloLikelihood &mpspl)
std::shared_ptr< const Alphabet > getAlphabet() const override
Get the alphabet associated to the dataset.
std::shared_ptr< LikelihoodCalculationSingleProcess > getLikelihoodCalculationForAProcess(size_t p)
DataLik getLikelihoodForASiteForAProcess(size_t site, size_t p) const
Get the likelihood for a site for a process.
VVdouble getLikelihoodPerSitePerProcess() const
MultiProcessSequencePhyloLikelihood(std::shared_ptr< const AlignmentDataInterface > data, std::shared_ptr< MultiProcessSequenceEvolution > processSeqEvol, std::shared_ptr< CollectionNodes > collNodes, size_t nSeqEvol=0, size_t nData=0)
Defines the basic types of data flow nodes.
std::vector< Vdouble > VVdouble