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
const Matrix< double > & getdPij_dt(double t) const override
std::string getName() const override
Get the name of the model.
bool isScalable() const override
returns if model is scalable
size_t subModelNumber_
the number of the submodel
const Matrix< double > & getColumnRightEigenVectors() const override
void normalize() override
Normalize the generator.
bool isNonSingular() const override
std::string mixtName_
The name of the mixture model (for io purpose).
void computeFrequencies(bool yn) override
const Vdouble & getFrequencies() const override
InMixedSubstitutionModel & operator=(const InMixedSubstitutionModel &fmsm)
InMixedSubstitutionModel * clone() const override
Vdouble & getFrequencies_() override
double freq(size_t i) const override
void setNamespace(const std::string &name) override
MixedTransitionModelInterface & mixedModel_()
double getScale() const override
Get the scalar product of diagonal elements of the generator and the frequencies vector....
const Matrix< double > & exchangeabilityMatrix() const override
const SubstitutionModelInterface & substitutionModel() const override
const Matrix< double > & getd2Pij_dt2(double t) const override
void setScalable(bool scalable) override
sets if model is scalable, ie scale can be changed. Default : true, set to false to avoid normalizati...
const MixedTransitionModelInterface & mixedModel() const
void setFreqFromData(const SequenceDataInterface &data, double pseudoCount=0) override
Set equilibrium frequencies equal to the frequencies estimated from the data.
void setDiagonal() override
set the diagonal of the generator such that sum on each line equals 0.
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
const Matrix< double > & getRowLeftEigenVectors() const override
const Matrix< double > & getPij_t(double t) const override
void setScale(double scale) override
Multiplies the current generator by the given scale.
std::unique_ptr< MixedTransitionModelInterface > mixedModelPtr_
The MixedOfTransitionModels.
void setFreq(std::map< int, double > &frequencies) override
Set equilibrium frequencies.
double dPij_dt(size_t i, size_t j, double t) const override
const Vdouble & getIEigenValues() 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.
SubstitutionModelInterface & substitutionModel_() override
double getRate() const override
Get the rate.
const Vdouble & getEigenValues() 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 const Vdouble & getIEigenValues() const =0
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 > & getColumnRightEigenVectors() const =0
virtual void enableEigenDecomposition(bool yn)=0
Set if eigenValues and Vectors must be computed.
virtual const Matrix< double > & generator() const =0
virtual void normalize()=0
Normalize the generator.
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 bool isScalable() const =0
returns if model is scalable
virtual const Vdouble & getEigenValues() const =0
virtual void setDiagonal()=0
set the diagonal of the generator such that sum on each line equals 0.
virtual const Matrix< double > & getRowLeftEigenVectors() const =0
virtual bool isNonSingular() const =0
virtual const Matrix< double > & exchangeabilityMatrix() 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 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 > & getPij_t(double t) const =0
virtual const Vdouble & getFrequencies() const =0
virtual void setFreq(std::map< int, double > &frequencies)=0
Set equilibrium frequencies.
virtual const Matrix< double > & getd2Pij_dt2(double t) const =0
virtual double dPij_dt(size_t i, size_t j, double t) const =0
virtual Vdouble & getFrequencies_()=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
virtual const Matrix< double > & getdPij_dt(double t) const =0
Defines the basic types of data flow nodes.
std::vector< double > Vdouble