bpp-phyl3  3.0.0
YNGP_M.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_MODEL_CODON_YNGP_M_H
6 #define BPP_PHYL_MODEL_CODON_YNGP_M_H
7 
9 
10 #include "../AbstractBiblioMixedTransitionModel.h"
11 #include "../FrequencySet/CodonFrequencySet.h"
12 #include "../MixtureOfASubstitutionModel.h"
13 
14 namespace bpp
15 {
29 class YNGP_M :
31  public virtual TransitionModelInterface
32 {
33 protected:
38 
43  size_t synfrom_, synto_;
44 
45 public:
46  YNGP_M(const std::string& name) :
49  synfrom_(),
50  synto_()
51  {}
52 
53  YNGP_M(const YNGP_M& mod2) :
56  synfrom_(mod2.synfrom_),
57  synto_(mod2.synto_)
58  {
59  mixedSubModelPtr_ = dynamic_cast<const MixtureOfASubstitutionModel*>(&mixedModel());
60  }
61 
62  virtual YNGP_M* clone() const override = 0;
63 
64  YNGP_M& operator=(const YNGP_M& mod2)
65  {
67 
68  mixedSubModelPtr_ = dynamic_cast<const MixtureOfASubstitutionModel*>(&mixedModel());
69 
70  synfrom_ = mod2.synfrom_;
71  synto_ = mod2.synto_;
72 
73  return *this;
74  }
75 };
76 } // end of namespace bpp.
77 #endif // BPP_PHYL_MODEL_CODON_YNGP_M_H
Abstract class for mixture models based on the bibliography.
AbstractBiblioMixedTransitionModel & operator=(const AbstractBiblioMixedTransitionModel &model)
const MixedTransitionModelInterface & mixedModel() const
Interface for all transition models.
Abstract generic class for The Yang et al (2000) M substitution models for codons....
Definition: YNGP_M.h:32
YNGP_M(const std::string &name)
Definition: YNGP_M.h:46
size_t synto_
Definition: YNGP_M.h:43
YNGP_M(const YNGP_M &mod2)
Definition: YNGP_M.h:53
YNGP_M & operator=(const YNGP_M &mod2)
Definition: YNGP_M.h:64
const MixtureOfASubstitutionModel * mixedSubModelPtr_
Definition: YNGP_M.h:37
virtual YNGP_M * clone() const override=0
size_t synfrom_
indexes of 2 codons states between which the substitution is synonymous, to set a basis to the homoge...
Definition: YNGP_M.h:43
Defines the basic types of data flow nodes.