5 #ifndef BPP_PHYL_MODEL_CODON_CODONADHOCSUBSTITUTIONMODEL_H
6 #define BPP_PHYL_MODEL_CODON_CODONADHOCSUBSTITUTIONMODEL_H
28 std::vector< std::unique_ptr<CoreCodonSubstitutionModelInterface>>
vModel_;
36 std::unique_ptr<CodonFrequencySetInterface>
freqSet_;
51 std::shared_ptr<const GeneticCode> gCode,
52 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod,
53 std::vector<std::unique_ptr<CoreCodonSubstitutionModelInterface>>& vpmodel,
54 const std::string& name);
68 std::shared_ptr<const GeneticCode> gCode,
69 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod1,
70 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod2,
71 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod3,
72 std::vector<std::unique_ptr<CoreCodonSubstitutionModelInterface>>& vpmodel,
73 const std::string& name);
99 model->setNamespace(prefix);
115 void setFreq(std::map<int, double>& frequencies)
override;
Abstract class for substitution models on codons.
void setNamespace(const std::string &prefix) override
Class for substitution models of codons with several layers of codon models.
double getCodonsMulRate(size_t i, size_t j) const override
Returns the multiplicative rate specific to two codons specified by their number. The respective gene...
bool hasCodonFrequencySet() const override
void fireParameterChanged(const ParameterList ¶meterlist) override
Tells the model that a parameter value has changed.
CodonAdHocSubstitutionModel * clone() const override
const CodonFrequencySetInterface & codonFrequencySet() const override
CodonAdHocSubstitutionModel(std::shared_ptr< const GeneticCode > gCode, std::unique_ptr< NucleotideSubstitutionModelInterface > pmod, std::vector< std::unique_ptr< CoreCodonSubstitutionModelInterface >> &vpmodel, const std::string &name)
Build a new CodonAdHocSubstitutionModel object from a pointer to NucleotideSubstitutionModel.
std::vector< std::unique_ptr< CoreCodonSubstitutionModelInterface > > vModel_
size_t getNumberOfModels() const
void setNamespace(const std::string &prefix) override
void setFreq(std::map< int, double > &frequencies) override
Estimation of the parameters of the models so that the equilibrium frequencies match the given ones.
std::unique_ptr< CodonFrequencySetInterface > freqSet_
optional FrequencySet if model is defined through a FrequencySet.
std::string getName() const override
Get the name of the model.
const CoreCodonSubstitutionModelInterface & layerModel(size_t i) const
CodonAdHocSubstitutionModel & operator=(const CodonAdHocSubstitutionModel &model)
virtual ~CodonAdHocSubstitutionModel()
Parametrize a set of state frequencies for codons.
Interface for codon models.
Defines the basic types of data flow nodes.