19 shared_ptr<const BinaryAlphabet> alpha,
89 case 0:
return (1 -
pi0_) * (1 -
exp_);
116 case 1:
return -1 * (1 -
pi0_) *
exp_;
141 case 0:
return -1 * (1 -
pi0_) *
exp_;
198 std::shared_ptr<IntervalConstraint> bounds(
new IntervalConstraint(lb, ub,
true,
true));
void addParameter_(Parameter *parameter)
std::string getNamespace() const override
double getParameterValue(const std::string &name) const override
Parameter & getParameter_(const std::string &name)
Partial implementation of the ReversibleSubstitutionModel interface.
RowMatrix< double > generator_
The generator matrix of the model.
Vdouble eigenValues_
The vector of eigen values.
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).
Vdouble freq_
The vector of equilibrium frequencies.
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.
virtual void setConstraint(std::shared_ptr< ConstraintInterface > constraint)
Map the states of a given alphabet which have a model state.
const Matrix< double > & getd2Pij_dt2(double d) const
double dPij_dt(size_t i, size_t j, double d) const
void setMuBounds(double lb, double ub)
TwoParameterBinarySubstitutionModel(std::shared_ptr< const BinaryAlphabet > alpha, double mu=1., double pi0=0.5)
double d2Pij_dt2(size_t i, size_t j, double d) const
void updateMatrices_()
Compute and diagonalize the matrix, and fill the eigenValues_, leftEigenVectors_ and rightEigenVecto...
const Matrix< double > & getdPij_dt(double d) const
const Matrix< double > & getPij_t(double d) const
double Pij_t(size_t i, size_t j, double d) const
Defines the basic types of data flow nodes.
ExtendedFloat exp(const ExtendedFloat &ef)