13 unique_ptr<SubstitutionModelInterface> originalModel,
21 originalModel_(originalModel->clone()),
22 registerName_(reg.getName()),
24 nbTypes_(reg.getNumberOfSubstitutionTypes()),
25 vRates_(reg.getNumberOfSubstitutionTypes())
55 for (
size_t i = 1; i <=
nbTypes_; i++)
69 for (
size_t i = 0; i <
vRates_.size(); ++i)
78 for (
size_t t = 0; t <
nbTypes_; ++t)
85 const Vuint& v2 = v[i];
86 for (
const auto& j : v2)
void addParameters_(const ParameterList ¶meters)
void addParameter_(Parameter *parameter)
std::string getNamespace() const override
const ParameterList & getParameters() const override
Parameter & getParameter_(const std::string &name)
RowMatrix< double > generator_
The generator matrix of the model.
void setDiagonal()
set the diagonal of the generator such that sum on each line equals 0.
bool isScalable_
If the model is scalable (ie generator can be normalized automatically).
virtual void updateMatrices_()
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
Abstract class of Wrapping model class, where all methods are redirected from model().
const BranchModelInterface & model() const override
BranchModelInterface & model_()
virtual double getValue() const
static const std::shared_ptr< IntervalConstraint > R_PLUS_STAR
virtual void setNamespace(const std::string &prefix)=0
VVVuint vRegStates_
Vector of register state -> vector of from states -> vector of to states (for acceleration purpose)
Vdouble vRates_
vector of the rates of the register types
RegisterRatesSubstitutionModel(std::unique_ptr< SubstitutionModelInterface > originalModel, const SubstitutionRegisterInterface ®, bool isNormalized=false)
Constructor.
size_t getNumberOfStates() const override
Get the number of states.
void updateMatrices_() override
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
const SubstitutionModelInterface & substitutionModel() const override
From AbstractWrappedSubstitutionModel.
virtual const Matrix< double > & generator() const =0
The SubstitutionRegister interface.
virtual std::string getTypeName(size_t type) const =0
Get the name of a given substitution type.
virtual size_t getType(size_t fromState, size_t toState) const =0
Get the substitution type far a given pair of model states.
Defines the basic types of data flow nodes.
std::vector< Vuint > VVuint
std::vector< unsigned int > Vuint