46 if (dynamic_cast<CodonFrequenciesSet*>(pfitset) == NULL)
47 throw Exception (
"Bad type for fitness parameters"+ pfitset ->
getName() );
50 addParameters_(
pfitset_->getParameters() );
60 pfitset_->matchParametersValues(parameters);
66 matchParametersValues(
pfitset_->getParameters() );
74 if (phi_i == phi_j) mu=1;
80 mu = -(log(phi_i/phi_j)/(1-(phi_i/phi_j)));
virtual ~AbstractCodonFitnessSubstitutionModel()
virtual const std::vector< double > getFrequencies() const =0
Parametrize a set of state frequencies.
AbstractCodonFitnessSubstitutionModel(FrequenciesSet *pfitset, const std::string &prefix)
virtual std::string getName() const =0
Get the name of the model.
void setFreq(std::map< int, double > &frequencies)
Set equilibrium frequencies.
FrequenciesSet * pfitset_
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...
Abstract class for codon models.
double getCodonsMulRate(size_t i, size_t j) const
Returns the multiplicative rate specific to two codons specified by their number. The respective gene...
void fireParameterChanged(const ParameterList ¶meters)