bpp-phyl3  3.0.0
HomogeneousTreeLikelihood.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_HOMOGENEOUSTREELIKELIHOOD_H
6 #define BPP_PHYL_LEGACY_LIKELIHOOD_HOMOGENEOUSTREELIKELIHOOD_H
7 
8 
9 #include "../../Model/SubstitutionModel.h"
10 #include "TreeLikelihood.h"
11 
12 namespace bpp
13 {
24  public virtual TreeLikelihoodInterface
25 {
26 public:
28 
29 public:
30  std::shared_ptr<const TransitionModelInterface> getModelForSite(int nodeId, size_t siteIndex) const
31  {
32  return getModel();
33  }
34 
35  std::shared_ptr<TransitionModelInterface> getModelForSite(int nodeId, size_t siteIndex)
36  {
37  return getModel();
38  }
39 
43  virtual std::shared_ptr<const TransitionModelInterface> getModel() const = 0;
44 
48  virtual std::shared_ptr<TransitionModelInterface> getModel() = 0;
49 
54  virtual void setModel(std::shared_ptr<TransitionModelInterface> model) = 0;
55 
62  virtual std::shared_ptr<const SubstitutionModelInterface> getSubstitutionModel() const = 0;
63 
73  virtual std::shared_ptr<const SubstitutionModelInterface> getSubstitutionModel(int nodeId, size_t siteIndex) const = 0;
74 };
75 } // end of namespace bpp.
76 #endif // BPP_PHYL_LEGACY_LIKELIHOOD_HOMOGENEOUSTREELIKELIHOOD_H
Specialization of the TreeLikelihood interface for the Homogeneous case.
virtual std::shared_ptr< const TransitionModelInterface > getModel() const =0
std::shared_ptr< TransitionModelInterface > getModelForSite(int nodeId, size_t siteIndex)
Get the substitution model associated to a given node and alignment column.
virtual std::shared_ptr< const SubstitutionModelInterface > getSubstitutionModel() const =0
Get a SubstitutionModel pointer toward the model associated to this instance, if possible.
HomogeneousTreeLikelihood * clone() const =0
std::shared_ptr< const TransitionModelInterface > getModelForSite(int nodeId, size_t siteIndex) const
Get the substitution model associated to a given node and alignment column.
virtual void setModel(std::shared_ptr< TransitionModelInterface > model)=0
virtual std::shared_ptr< TransitionModelInterface > getModel()=0
virtual std::shared_ptr< const SubstitutionModelInterface > getSubstitutionModel(int nodeId, size_t siteIndex) const =0
Get a SubstitutionModel pointer toward the model associated to this instance, if possible.
The TreeLikelihood interface.
Defines the basic types of data flow nodes.