bpp-phyl3 3.0.0
AlignedPhyloLikelihoodHmm.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
7#include "HmmLikelihood_DF.h"
9
10using namespace std;
11using namespace bpp;
12
13/******************************************************************************/
14
15AlignedPhyloLikelihoodHmm::AlignedPhyloLikelihoodHmm(
16 Context& context,
17 std::shared_ptr<PhyloLikelihoodContainer> pC,
18 const std::vector<size_t>& nPhylo,
19 bool inCollection) :
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<FullHmmTransitionMatrix>(hma_, "HMM.");
33
34 hpep_ = make_shared<HmmPhyloEmissionProbabilities>(hma_);
35
36 hmm_ = shared_ptr<HmmLikelihood_DF>(new HmmLikelihood_DF(context, hma_, htm_, hpep_));
37
38 addParameters_(htm_->getParameters());
39}
40
41void AlignedPhyloLikelihoodHmm::setNamespace(const std::string& nameSpace)
42{
44 hmm_->setNamespace(nameSpace);
45}
46
48{
50 // hpep_->update();
51 hmm_->matchParametersValues(parameters);
52}
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
void fireParameterChanged(const ParameterList &parameters) override
std::shared_ptr< HmmLikelihood_DF > hmm_
void setNamespace(const std::string &nameSpace) override
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.