5 #ifndef BPP_PHYL_MODEL_ONECHANGEREGISTERTRANSITIONMODEL_H
6 #define BPP_PHYL_MODEL_ONECHANGEREGISTERTRANSITIONMODEL_H
9 #include "../Mapping/SubstitutionRegister.h"
61 std::unique_ptr<SubstitutionModelInterface> originalModel,
74 std::unique_ptr<SubstitutionModelInterface> originalModel,
76 std::vector<size_t> vNumRegs);
117 double Pij_t (
size_t i,
size_t j,
double t)
const override;
118 double dPij_dt (
size_t i,
size_t j,
double t)
const override;
119 double d2Pij_dt2(
size_t i,
size_t j,
double t)
const override;
127 double freq(
size_t i)
const override
147 virtual void setFreq(std::map<int, double>& m)
override
Virtual class of a Transition Model related to a given SubstitutionModel.
const TransitionModelInterface & transitionModel() const override
const BranchModelInterface & model() const override
TransitionModelInterface & transitionModel_() override
virtual void fireParameterChanged(const ParameterList ¶meters) override
AbstractFromSubstitutionModelTransitionModel & operator=(const AbstractFromSubstitutionModelTransitionModel &fmsm)
AbstractParameterAliasable & operator=(const AbstractParameterAliasable &ap)
Abstract class of Wrapping model class, where all methods are redirected from model().
virtual const FrequencySetInterface & frequencySet() const =0
virtual void setRate(double rate)=0
Set the rate of the model (must be positive).
virtual double getRate() const =0
Get the rate.
virtual double getInitValue(size_t i, int state) const =0
Parametrize a set of state frequencies.
From a model, compute transition probabilities given there is at least a change of a category (ie a n...
double Pij_t(size_t i, size_t j, double t) const override
const Matrix< double > & getd2Pij_dt2(double t) const override
std::unique_ptr< AnonymousSubstitutionModel > modelChanged_
const Matrix< double > & getPij_t(double t) const override
OneChangeRegisterTransitionModel(std::unique_ptr< SubstitutionModelInterface > originalModel, const SubstitutionRegisterInterface ®, size_t numReg)
RowMatrix< uint > noChangedStates_
double freq(size_t i) const override
OneChangeRegisterTransitionModel * clone() const override
const Matrix< double > & getdPij_dt(double t) const override
const Vdouble & getFrequencies() const override
virtual void setFreq(std::map< int, double > &m) override
Set equilibrium frequencies.
double getInitValue(size_t i, int state) const override
virtual ~OneChangeRegisterTransitionModel()
double getRate() const override
Get the rate.
void setRate(double rate) override
Set the rate of the model (must be positive).
void setFreqFromData(const SequenceDataInterface &data, double pseudoCount) override
Set equilibrium frequencies equal to the frequencies estimated from the data.
void fireParameterChanged(const ParameterList ¶meters) override
const FrequencySetInterface & frequencySet() const override
const std::string & getRegisterName() const
const std::vector< size_t > & getRegisterNumbers() const
double d2Pij_dt2(size_t i, size_t j, double t) const override
double dPij_dt(size_t i, size_t j, double t) const override
std::string getName() const override
Get the name of the model.
OneChangeRegisterTransitionModel & operator=(const OneChangeRegisterTransitionModel &fmsm)
std::string registerName_
std::vector< size_t > vNumRegs_
OneChangeRegisterTransitionModel(const OneChangeRegisterTransitionModel &fmsm)
The SubstitutionRegister interface.
virtual double freq(size_t i) const =0
virtual const Vdouble & getFrequencies() const =0
virtual void setFreq(std::map< int, double > &frequencies)=0
Set equilibrium frequencies.
virtual void setFreqFromData(const SequenceDataInterface &data, double pseudoCount=0)=0
Set equilibrium frequencies equal to the frequencies estimated from the data.
Defines the basic types of data flow nodes.
std::vector< double > Vdouble