5#ifndef BPP_PHYL_MODEL_INMIXEDSUBSTITUTIONMODEL_H
6#define BPP_PHYL_MODEL_INMIXEDSUBSTITUTIONMODEL_H
49 std::unique_ptr<MixedTransitionModelInterface>
mixedModel,
50 const std::string& subModelName,
51 const std::string& mixtDesc);
54 std::unique_ptr<MixedTransitionModelInterface>
mixedModel,
55 size_t subModelNumber,
56 const std::string& mixtDesc);
140 void setFreq(std::map<int, double>& frequencies)
override
friend class InMixedSubstitutionModel
void addParameter_(Parameter *parameter)
void setNamespace(const std::string &prefix)
std::string getNamespace() const override
const TransitionModelInterface & transitionModel() const
const BranchModelInterface & model() const override
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
virtual void addRateParameter()=0
SubModel taken from a MixedTransitionModel, kept in the context of the MixedTransitionModel (see From...
double Pij_t(size_t i, size_t j, double t) const override
std::string getName() const override
Get the name of the model.
const Vdouble & getEigenValues() const override
const Matrix< double > & getColumnRightEigenVectors() const override
bool isScalable() const override
returns if model is scalable
size_t subModelNumber_
the number of the submodel
const Matrix< double > & exchangeabilityMatrix() const override
const Vdouble & getIEigenValues() const override
void normalize() override
Normalize the generator.
MixedTransitionModelInterface & mixedModel_()
bool isNonSingular() const override
std::string mixtName_
The name of the mixture model (for io purpose).
const SubstitutionModelInterface & substitutionModel() const override
void computeFrequencies(bool yn) override
Set if equilibrium frequencies should be computed from the generator.
Vdouble & getFrequencies_() override
InMixedSubstitutionModel & operator=(const InMixedSubstitutionModel &fmsm)
double freq(size_t i) const override
void setNamespace(const std::string &name) override
double getScale() const override
Get the scalar product of diagonal elements of the generator and the frequencies vector....
void setScalable(bool scalable) override
sets if model is scalable, ie scale can be changed. Default : true, set to false to avoid normalizati...
const Matrix< double > & getPij_t(double t) const override
void setFreqFromData(const SequenceDataInterface &data, double pseudoCount=0) override
Set equilibrium frequencies equal to the frequencies estimated from the data.
InMixedSubstitutionModel * clone() const override
void setDiagonal() override
set the diagonal of the generator such that sum on each line equals 0.
const Matrix< double > & getd2Pij_dt2(double t) const override
SubstitutionModelInterface & substitutionModel_() override
const Matrix< double > & getRowLeftEigenVectors() const override
double Qij(size_t i, size_t j) const override
Methods to supersede SubstitutionModel methods.
const Matrix< double > & generator() const override
size_t getSubModelNumber() const
void addRateParameter() override
void setScale(double scale) override
Multiplies the current generator by the given scale.
std::unique_ptr< MixedTransitionModelInterface > mixedModelPtr_
The MixedOfTransitionModels.
const MixedTransitionModelInterface & mixedModel() const
void setFreq(std::map< int, double > &frequencies) override
Set equilibrium frequencies.
double dPij_dt(size_t i, size_t j, double t) const override
bool computeFrequencies() const override
void setRate(double rate) override
Set the rate of the model (must be positive).
bool isDiagonalizable() const override
double d2Pij_dt2(size_t i, size_t j, double t) const override
double getInitValue(size_t i, int state) const override
void enableEigenDecomposition(bool yn) override
Set if eigenValues and Vectors must be computed.
bool enableEigenDecomposition() override
Tell if eigenValues and Vectors must be computed.
const Vdouble & getFrequencies() const override
double getRate() const override
Get the rate.
const Matrix< double > & getdPij_dt(double t) const override
double Sij(size_t i, size_t j) const override
void fireParameterChanged(const ParameterList ¶meters) override
Methods to supersede AbstractSubstitutionnModel methods.
Interface for Transition models, defined as a mixture of "simple" transition models.
virtual TransitionModelInterface & nModel_(size_t i)=0
static const std::shared_ptr< IntervalConstraint > R_PLUS_STAR
virtual bool matchParametersValues(const ParameterList ¶meters)=0
virtual void setNamespace(const std::string &prefix)=0
Interface for all substitution models.
virtual bool isDiagonalizable() const =0
virtual void setScalable(bool scalable)=0
sets if model is scalable, ie scale can be changed. Default : true, set to false to avoid normalizati...
virtual const Matrix< double > & generator() const =0
virtual void enableEigenDecomposition(bool yn)=0
Set if eigenValues and Vectors must be computed.
virtual void normalize()=0
Normalize the generator.
virtual const Vdouble & getIEigenValues() const =0
virtual double getScale() const =0
Get the scalar product of diagonal elements of the generator and the frequencies vector....
virtual double Sij(size_t i, size_t j) const =0
virtual const Matrix< double > & getColumnRightEigenVectors() const =0
virtual bool isScalable() const =0
returns if model is scalable
virtual const Matrix< double > & exchangeabilityMatrix() const =0
virtual const Matrix< double > & getRowLeftEigenVectors() const =0
virtual void setDiagonal()=0
set the diagonal of the generator such that sum on each line equals 0.
virtual bool isNonSingular() const =0
virtual void setScale(double scale)=0
Multiplies the current generator by the given scale.
virtual double Qij(size_t i, size_t j) const =0
A method for computing all necessary matrices.
virtual const Vdouble & getEigenValues() const =0
virtual Vdouble & getFrequencies_()=0
virtual const Matrix< double > & getPij_t(double t) const =0
virtual const Matrix< double > & getdPij_dt(double t) const =0
virtual const Vdouble & getFrequencies() const =0
virtual double Pij_t(size_t i, size_t j, double t) const =0
virtual double freq(size_t i) const =0
virtual double d2Pij_dt2(size_t i, size_t j, double t) const =0
virtual const Matrix< double > & getd2Pij_dt2(double t) const =0
virtual void setFreq(std::map< int, double > &frequencies)=0
Set equilibrium frequencies.
virtual double dPij_dt(size_t i, size_t j, double t) const =0
virtual void setFreqFromData(const SequenceDataInterface &data, double pseudoCount=0)=0
Set equilibrium frequencies equal to the frequencies estimated from the data.
virtual bool computeFrequencies() const =0
Defines the basic types of data flow nodes.
std::vector< double > Vdouble