20 std::shared_ptr<const Alphabet> alpha) :
23 exp_(), p_(size_, size_), freqSet_(nullptr)
30 std::shared_ptr<const Alphabet> alpha,
31 std::unique_ptr<FrequencySetInterface> freqSet,
35 exp_(), p_(size_, size_), freqSet_(std::move(freqSet))
51 for (
unsigned int i = 0; i <
size_; ++i)
57 for (
unsigned int i = 0; i <
size_; ++i)
59 for (
unsigned int j = 0; j <
size_; ++j)
68 for (
unsigned int i = 1; i <
size_; ++i)
74 for (
unsigned int i = 0; i <
size_; ++i)
78 for (
unsigned int i = 1; i <
size_; ++i)
80 for (
unsigned int j = 0; j <
size_; ++j)
85 for (
unsigned int i = 0; i < (
size_ - 1); ++i)
90 for (
unsigned int i = 0; i <
size_; ++i)
94 for (
unsigned int i = 1; i <
size_; ++i)
98 for (
unsigned int i = 0; i < (
size_ - 1); ++i)
100 for (
unsigned int j = 1; j <
size_; ++j)
105 for (
unsigned int i = 1; i <
size_; ++i)
146 for (
unsigned int i = 0; i <
size_; i++)
148 for (
unsigned int j = 0; j <
size_; j++)
159 for (
unsigned int i = 0; i <
size_; i++)
161 for (
unsigned int j = 0; j <
size_; j++)
172 for (
unsigned int i = 0; i <
size_; i++)
174 for (
unsigned int j = 0; j <
size_; j++)
188 freq_[(size_t)i.first] = i.second;
void addParameters_(const ParameterList ¶meters)
bool matchParametersValues(const ParameterList ¶meters) override
Partial implementation of the ReversibleSubstitutionModel interface.
RowMatrix< double > generator_
The generator matrix of the model.
Vdouble eigenValues_
The vector of eigen values.
RowMatrix< double > exchangeability_
The exchangeability matrix of the model, defined as . When the model is reversible,...
RowMatrix< double > leftEigenVectors_
The matrix made of left eigen vectors (by row) if rightEigenVectors_ is non-singular.
RowMatrix< double > rightEigenVectors_
The matrix made of right eigen vectors (by column).
size_t size_
The number of states.
Vdouble freq_
The vector of equilibrium frequencies.
std::shared_ptr< const StateMapInterface > getStateMap() const override
double rate_
The rate of the model (default: 1). The generator (and all its vectorial components) is independent o...
This class implements a state map where all resolved states are modeled.
double Pij_t(size_t i, size_t j, double d) const override
std::unique_ptr< FrequencySetInterface > freqSet_
const Matrix< double > & getd2Pij_dt2(double d) const override
void setFreq(std::map< int, double > &freq) override
Set equilibrium frequencies.
double d2Pij_dt2(size_t i, size_t j, double d) const override
EquiprobableSubstitutionModel(std::shared_ptr< const Alphabet > alpha)
Build a simple equiprobable model, with original equilibrium frequencies.
double dPij_dt(size_t i, size_t j, double d) const override
void updateMatrices_() override
const Matrix< double > & getdPij_dt(double d) const override
const Matrix< double > & getPij_t(double d) const override
Defines the basic types of data flow nodes.
ExtendedFloat exp(const ExtendedFloat &ef)
ExtendedFloat pow(const ExtendedFloat &ef, double exp)