5 #ifndef BPP_PHYL_MODEL_G2001_H
6 #define BPP_PHYL_MODEL_G2001_H
32 std::unique_ptr<DiscreteDistributionInterface>
rDist_;
47 std::unique_ptr<ReversibleSubstitutionModelInterface> model,
48 std::unique_ptr<DiscreteDistributionInterface> rDist,
50 bool normalizeRateChanges =
false) :
82 std::string
getName()
const override {
return "G01"; }
91 rDist_->matchParametersValues(parameters);
108 double getRate()
const override {
return 1.; }
118 for (
size_t i = 0; i <
nbRates_; ++i)
121 for (
size_t j = 0; j <
nbRates_; ++j)
void addParameters_(const ParameterList ¶meters)
void addParameter_(Parameter *parameter)
std::string getNamespace() const override
double getParameterValue(const std::string &name) const override
Galtier's 2001 covarion model.
G2001(const G2001 &model)
std::unique_ptr< DiscreteDistributionInterface > rDist_
G2001 & operator=(const G2001 &model)
std::string nestedRatePrefix_
G2001(std::unique_ptr< ReversibleSubstitutionModelInterface > model, std::unique_ptr< DiscreteDistributionInterface > rDist, double nu=1., bool normalizeRateChanges=false)
Build a new G2001 substitution model.
void setRate(double rate) override
Set the rate of the model (must be positive).
G2001 * clone() const override
const DiscreteDistributionInterface & rateDistribution() const
void fireParameterChanged(const ParameterList ¶meters) override
Re-definition of the super-class method to update the rate distribution too.
void updateRatesModel_() override
Update the rates vector, generator and equilibrium frequencies.
void addRateParameter() override
double getRate() const override
Get the rate.
std::string getName() const override
Get the name of the model.
void setNamespace(const std::string &prefix) override
Partial implementation of the Markov-modulated class of substitution models.
virtual void updateMatrices_()
MarkovModulatedSubstitutionModel & operator=(const MarkovModulatedSubstitutionModel &model)
virtual void fireParameterChanged(const ParameterList ¶meters) override
Tells the model that a parameter value has changed.
RowMatrix< double > ratesExchangeability_
RowMatrix< double > rates_
void setNamespace(const std::string &prefix) override
static const std::shared_ptr< IntervalConstraint > R_PLUS
Defines the basic types of data flow nodes.