bpp-phyl3 3.0.0
NonHomogeneousTreeLikelihood.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: The Bio++ Development Group
2//
3// SPDX-License-Identifier: CECILL-2.1
4
5#ifndef BPP_PHYL_LEGACY_LIKELIHOOD_NONHOMOGENEOUSTREELIKELIHOOD_H
6#define BPP_PHYL_LEGACY_LIKELIHOOD_NONHOMOGENEOUSTREELIKELIHOOD_H
7
8
9#include "../Model/SubstitutionModelSet.h"
10#include "TreeLikelihood.h"
11
12namespace bpp
13{
26 public virtual TreeLikelihoodInterface
27{
28public:
29 NonHomogeneousTreeLikelihood* clone() const override = 0;
30
31public:
32 std::shared_ptr<const TransitionModelInterface> getModelForSite(int nodeId, size_t siteIndex) const override
33 {
34 return getModelForNode(nodeId);
35 }
36
37 std::shared_ptr<TransitionModelInterface> getModelForSite(int nodeId, size_t siteIndex) override
38 {
39 return getModelForNode(nodeId);
40 }
41
49 virtual std::shared_ptr<const TransitionModelInterface> getModelForNode(int nodeId) const = 0;
50
58 virtual std::shared_ptr<TransitionModelInterface> getModelForNode(int nodeId) = 0;
59
63 virtual std::shared_ptr<const SubstitutionModelSet> getSubstitutionModelSet() const = 0;
64
68 virtual const SubstitutionModelSet& substitutionModelSet() const = 0;
69
73 virtual std::shared_ptr<SubstitutionModelSet> getSubstitutionModelSet() = 0;
74
79
84 virtual void setSubstitutionModelSet(std::shared_ptr<SubstitutionModelSet> model) = 0;
85
90};
91} // end of namespace bpp.
92#endif // BPP_PHYL_LEGACY_LIKELIHOOD_NONHOMOGENEOUSTREELIKELIHOOD_H
Specialization of the TreeLikelihood interface for the branch non-homogeneous and non-stationary mode...
std::shared_ptr< TransitionModelInterface > getModelForSite(int nodeId, size_t siteIndex) override
Get the substitution model associated to a given node and alignment column.
std::shared_ptr< const TransitionModelInterface > getModelForSite(int nodeId, size_t siteIndex) const override
Get the substitution model associated to a given node and alignment column.
NonHomogeneousTreeLikelihood * clone() const override=0
virtual std::shared_ptr< TransitionModelInterface > getModelForNode(int nodeId)=0
Get the substitution model associated to a given node.
virtual ParameterList getRootFrequenciesParameters() const =0
virtual std::shared_ptr< const TransitionModelInterface > getModelForNode(int nodeId) const =0
Get the model associated to a given node.
virtual std::shared_ptr< SubstitutionModelSet > getSubstitutionModelSet()=0
virtual std::shared_ptr< const SubstitutionModelSet > getSubstitutionModelSet() const =0
virtual SubstitutionModelSet & substitutionModelSet()=0
virtual void setSubstitutionModelSet(std::shared_ptr< SubstitutionModelSet > model)=0
Set the substitution models for this instance.
virtual const SubstitutionModelSet & substitutionModelSet() const =0
Substitution models manager for non-homogeneous / non-reversible models of evolution.
The TreeLikelihood interface.
Defines the basic types of data flow nodes.