45 #include <Bpp/Numeric/Prob/DiscreteDistribution.h> 46 #include <Bpp/Numeric/Parameter.h> 88 addParameters_(
rDist_->getIndependentParameters());
89 addParameter_(
new Parameter(
"G01.nu", nu, &Parameter::R_PLUS));
103 rDist_ =
dynamic_cast<DiscreteDistribution*
>(model.
rDist_->clone());
122 rDist_->matchParametersValues(parameters);
148 double nu = getParameterValue(
"nu");
149 for (
size_t i = 0; i <
nbRates_; i++)
152 for (
size_t j = 0; j <
nbRates_; j++)
virtual void updateMatrices()
void setNamespace(const std::string &prefix)
Galtier's 2001 covarion model.
MarkovModulatedSubstitutionModel & operator=(const MarkovModulatedSubstitutionModel &model)
Interface for reversible substitution models.
void setRate(double rate)
Set the rate of the model (must be positive).
RowMatrix< double > rates_
void setNamespace(const std::string &prefix)
G2001 & operator=(const G2001 &model)
G2001(ReversibleSubstitutionModel *model, DiscreteDistribution *rDist, double nu=1., bool normalizeRateChanges=false)
Build a new G2001 substitution model.
double getRate() const
Get the rate.
DiscreteDistribution * rDist_
G2001(const G2001 &model)
Partial implementation of the Markov-modulated class of substitution models.
const DiscreteDistribution * getRateDistribution() const
virtual void fireParameterChanged(const ParameterList ¶meters)
Tells the model that a parameter value has changed.
RowMatrix< double > ratesExchangeability_
std::string getName() const
Get the name of the model.
std::string nestedRatePrefix_
void fireParameterChanged(const ParameterList ¶meters)
Re-definition of the super-class method to update the rate distribution too.
void updateRatesModel()
Update the rates vector, generator and equilibrium frequencies.