bpp-phyl3  3.0.0
AlignedPhyloLikelihoodAutoCorrelation.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
6 
8 #include "HmmLikelihood_DF.h"
9 
10 using namespace std;
11 using namespace bpp;
12 
13 /******************************************************************************/
14 
15 AlignedPhyloLikelihoodAutoCorrelation::AlignedPhyloLikelihoodAutoCorrelation(
16  Context& context,
17  std::shared_ptr<PhyloLikelihoodContainer> pC,
18  const std::vector<size_t>& nPhylo,
19  bool inCollection) :
20  AbstractPhyloLikelihood(context),
22  AbstractPhyloLikelihoodSet(context, pC, {}, inCollection),
24  AbstractAlignedPhyloLikelihoodSet(context, pC, nPhylo, inCollection),
25  hma_(),
26  htm_(),
27  hpep_(),
28  hmm_()
29 {
30  hma_ = make_shared<HmmPhyloAlphabet>(*this);
31 
32  htm_ = make_shared<AutoCorrelationTransitionMatrix>(hma_, "AutoCorr.");
33 
34  hpep_ = make_shared<HmmPhyloEmissionProbabilities>(hma_);
35 
36  hmm_ = shared_ptr<HmmLikelihood_DF>(new HmmLikelihood_DF(this->context(), hma_, htm_, hpep_));
37 
38  addParameters_(htm_->getParameters());
39 }
40 
41 void AlignedPhyloLikelihoodAutoCorrelation::setNamespace(const std::string& nameSpace)
42 {
44  hmm_->setNamespace(nameSpace);
45 }
46 
48 {
50  hmm_->matchParametersValues(parameters);
51  hma_->matchParametersValues(parameters);
52  htm_->matchParametersValues(parameters);
53  hpep_->matchParametersValues(parameters);
54 }
The AlignedPhyloLikelihoodSet abstract class.
void setNamespace(const std::string &prefix) override
The PhyloLikelihoodSet class, to manage a subset of PhyloLikelihoods from a given PhyloLikelihoodCont...
virtual void fireParameterChanged(const ParameterList &params) override
std::shared_ptr< AutoCorrelationTransitionMatrix > htm_
std::shared_ptr< HmmPhyloEmissionProbabilities > hpep_
Context for dataflow node construction.
Definition: DataFlow.h:527
A simple implementation of hidden Markov models recursion, in DataFlow implementation.
Defines the basic types of data flow nodes.