40 #include "../FrequenciesSet/NucleotideFrequenciesSet.h" 50 const std::string& prefix) :
52 AbstractParameterAliasable(prefix),
58 throw Exception(
"Bad type for equilibrium frequencies " + pfreq->
getName());
60 if (dynamic_cast<CodonFromUniqueFrequenciesSet*>(pCFS)
65 vector<FrequenciesSet*> vFS;
66 if (dynamic_cast<FixedCodonFrequenciesSet*>(pCFS)) {
67 for (
unsigned int i = 0; i < 3; i++)
72 for (
unsigned int i = 0; i < 3; i++)
85 posfreqset_->setNamespace(prefix + pfreq->getNamespace());
105 matchParametersValues(
posfreqset_->getParameters());
113 for (
size_t k = 0; k < 3; k++)
115 if ((i2 % 4) != (j2 % 4))
virtual const FrequenciesSet & getFrequenciesSetForLetter(size_t i) const =0
WordFrequenciesSet * posfreqset_
Position dependent version of Codon Frequencies Set.
const CodonAlphabet * getAlphabet() const =0
the Frequencies in codons are the product of Independent Frequencies in letters with the frequencies ...
virtual void setFrequencies(const std::vector< double > &frequencies)=0
Set the parameters in order to match a given set of frequencies.
virtual const std::vector< double > getFrequencies() const =0
Parametrize a set of state frequencies.
Parametrize a set of state frequencies for codons.
Frequencies in words computed from the frequencies on letters. The parameters are the parameters of t...
Nucleotide FrequenciesSet using three independent parameters (theta, theta1, theta2) to modelize the ...
virtual std::string getName() const =0
virtual ~AbstractCodonPhaseFrequenciesSubstitutionModel()
FrequenciesSet useful for homogeneous and stationary models, nucleotide implementation.
void setFreq(std::map< int, double > &frequencies)
Set equilibrium frequencies.
AbstractCodonPhaseFrequenciesSubstitutionModel(FrequenciesSet *pfreq, const std::string &prefix)
Build a AbstractCodonPhaseFrequenciesSubstitutionModel instance.
virtual void setFrequenciesFromAlphabetStatesFrequencies(const std::map< int, double > &frequencies)=0
Set the Frequencies from the one of the map which keys match with a letter of the Alphabet...
void fireParameterChanged(const ParameterList ¶meters)
Abstract class for codon models.
virtual const GeneticCode * getGeneticCode() const =0
virtual CodonSubstitutionModel * clone() const =0
double getCodonsMulRate(size_t, size_t) const
Returns the multiplicative rate specific to two codons specified by their number. The respective gene...