14 std::shared_ptr<const Alphabet> alpha,
15 std::shared_ptr<const StateMapInterface> stateMap,
16 const std::string& prefix) :
48 for (
size_t i = 0; i <
model.modelsContainer_.size(); ++i)
60 vector<const Matrix<double>* > vM;
86 vector<const Matrix<double>* > vM;
112 vector<const Matrix<double>* > vM;
159 throw Exception(
"AbstractMixedTransitionModel::setVRates bad size of Vdouble argument.");
161 for (
unsigned int i = 0; i < vd.size(); i++)
173 for (
unsigned int i = 0; i <
vRates_.size(); i++)
180 for (
unsigned int i = 0; i <
vRates_.size(); i++)
Partial implementation for Mixed Transition models, defined as a mixture of "simple" substitution mod...
virtual const Matrix< double > & getdPij_dt(double t) const override
AbstractMixedTransitionModel(std::shared_ptr< const Alphabet >, std::shared_ptr< const StateMapInterface > stateMap, const std::string &prefix)
std::vector< double > vProbas_
vector of the probabilities of the models
virtual void setRate(double rate) override
Set the rate of the model and the submodels.
virtual const Matrix< double > & getd2Pij_dt2(double t) const override
virtual void setVRates(const Vdouble &vd) override
Sets the rates of the submodels to be proportional to a given vector, with the constraint that the me...
virtual void normalizeVRates() override
Normalizes the rates of the submodels so that the mean rate of the mixture equals rate_.
AbstractMixedTransitionModel & operator=(const AbstractMixedTransitionModel &)
std::vector< double > vRates_
vector of the rates of the models.
virtual const Matrix< double > & getPij_t(double t) const override
From TransitionModel interface.
std::vector< std::shared_ptr< TransitionModelInterface > > modelsContainer_
vector of pointers to TransitionModels.
Partial implementation of the TransitionModel interface.
RowMatrix< double > d2pijt_
RowMatrix< double > pijt_
These ones are for bookkeeping:
virtual void setRate(double rate) override
Set the rate of the model (must be positive).
RowMatrix< double > dpijt_
double rate_
The rate of the model (default: 1). The generator (and all its vectorial components) is independent o...
AbstractTransitionModel & operator=(const AbstractTransitionModel &model)=default
size_t getNumberOfStates() const override
Get the number of states.
virtual const TransitionModelInterface & model(const std::string &name) const =0
Access the submodel with the given name.
TransitionModelInterface * clone() const =0
Defines the basic types of data flow nodes.
std::vector< double > Vdouble