|
bpp-phyl3 3.0.0
|
Wrapping model interface. More...
#include <Bpp/Phyl/Model/WrappedModel.h>
Inheritance diagram for bpp::WrappedModelInterface:
Collaboration diagram for bpp::WrappedModelInterface:Public Member Functions | |
| WrappedModelInterface () | |
| virtual | ~WrappedModelInterface () |
| virtual const BranchModelInterface & | model () const =0 |
| BranchModelInterface * | clone () const =0 |
| virtual std::string | getName () const =0 |
| Get the name of the model. More... | |
| virtual const std::vector< int > & | getAlphabetStates () const =0 |
| virtual const StateMapInterface & | stateMap () const =0 |
| virtual std::shared_ptr< const StateMapInterface > | getStateMap () const =0 |
| virtual std::vector< size_t > | getModelStates (int code) const =0 |
| Get the state in the model corresponding to a particular state in the alphabet. More... | |
| virtual std::vector< size_t > | getModelStates (const std::string &code) const =0 |
| Get the state in the model corresponding to a particular state in the alphabet. More... | |
| virtual int | getAlphabetStateAsInt (size_t index) const =0 |
| virtual std::string | getAlphabetStateAsChar (size_t index) const =0 |
| virtual const Alphabet & | alphabet () const =0 |
| virtual std::shared_ptr< const Alphabet > | getAlphabet () const =0 |
| virtual const FrequencySetInterface & | frequencySet () const =0 |
| virtual size_t | getNumberOfStates () const =0 |
| Get the number of states. More... | |
| virtual double | getInitValue (size_t i, int state) const =0 |
| virtual const Eigen::VectorXd & | Lik_t (const Eigen::VectorXd &values, double t) const =0 |
| virtual const Eigen::VectorXd & | dLik_dt (const Eigen::VectorXd &values, double t) const =0 |
| virtual const Eigen::VectorXd & | d2Lik_dt2 (const Eigen::VectorXd &values, double t) const =0 |
| virtual double | getRate () const =0 |
| Get the rate. More... | |
| virtual void | setRate (double rate)=0 |
| Set the rate of the model (must be positive). More... | |
| virtual void | addRateParameter ()=0 |
| virtual size_t | getNumberOfIndependentParameters () const=0 |
| virtual void | aliasParameters (const std::string &p1, const std::string &p2)=0 |
| virtual void | aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose)=0 |
| virtual void | unaliasParameters (const std::string &p1, const std::string &p2)=0 |
| virtual const ParameterList & | getIndependentParameters () const=0 |
| virtual std::vector< std::string > | getAlias (const std::string &name) const=0 |
| virtual std::map< std::string, std::string > | getAliases () const=0 |
| virtual bool | hasParameter (const std::string &name) const=0 |
| virtual const ParameterList & | getParameters () const=0 |
| virtual const Parameter & | parameter (const std::string &name) const=0 |
| virtual double | getParameterValue (const std::string &name) const=0 |
| virtual void | setAllParametersValues (const ParameterList ¶meters)=0 |
| virtual void | setParameterValue (const std::string &name, double value)=0 |
| virtual void | setParametersValues (const ParameterList ¶meters)=0 |
| virtual bool | matchParametersValues (const ParameterList ¶meters)=0 |
| virtual void | removeConstraint (const std::string &name)=0 |
| virtual void | setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint)=0 |
| virtual size_t | getNumberOfParameters () const=0 |
| virtual void | setNamespace (const std::string &prefix)=0 |
| virtual std::string | getNamespace () const=0 |
| virtual std::string | getParameterNameWithoutNamespace (const std::string &name) const=0 |
Protected Member Functions | |
| virtual ParameterList & | getParameters_ ()=0 |
Wrapping model interface.
Definition at line 17 of file WrappedModel.h.
|
inline |
Definition at line 21 of file WrappedModel.h.
|
inlinevirtual |
Definition at line 22 of file WrappedModel.h.
|
pure virtualinherited |
Implemented in bpp::AbstractBiblioTransitionModel, bpp::AbstractFromSubstitutionModelTransitionModel, bpp::AbstractTransitionModel, bpp::FromMixtureSubstitutionModel, bpp::G2001, bpp::InMixedSubstitutionModel, bpp::MultinomialFromTransitionModel, bpp::RegisterRatesSubstitutionModel, bpp::TransitionFromTransitionModel, and bpp::TS98.
Referenced by bpp::AbstractBiblioTransitionModel::addRateParameter(), bpp::AbstractFromSubstitutionModelTransitionModel::addRateParameter(), bpp::FromMixtureSubstitutionModel::addRateParameter(), bpp::InMixedSubstitutionModel::addRateParameter(), bpp::MultinomialFromTransitionModel::addRateParameter(), bpp::TransitionFromTransitionModel::addRateParameter(), and bpp::BppOSubstitutionModelFormat::updateParameters_().
|
pure virtualinherited |
Implemented in bpp::AbstractTransitionModel, bpp::AbstractWrappedModel, bpp::MarkovModulatedSubstitutionModel, and bpp::RegisterRatesSubstitutionModel.
Referenced by bpp::SubstitutionModelSet::addModel(), bpp::AbstractWrappedModel::alphabet(), bpp::NonHomogeneousSubstitutionProcess::createHomogeneousSubstitutionProcess(), bpp::NonHomogeneousSubstitutionProcess::createNonHomogeneousSubstitutionProcess(), and bpp::SENCA::setFreq().
|
pure virtualinherited |
Implements bpp::ParameterAliasable.
Implemented in bpp::BinarySubstitutionModel, bpp::CodonDistanceSubstitutionModel, bpp::F84, bpp::HKY85, bpp::LG10_EX_EHO::EmbeddedModel, bpp::LG10_EX_EHO, bpp::TwoParameterBinarySubstitutionModel, bpp::TransitionModelInterface, bpp::AnonymousSubstitutionModel, bpp::CodonAdHocSubstitutionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonSameAARateSubstitutionModel, bpp::DFP07, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::GY94, bpp::KCM, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::KroneckerCodonDistanceSubstitutionModel, bpp::MG94, bpp::RELAX, bpp::SENCA, bpp::TripletSubstitutionModel, bpp::YN98, bpp::YNGP_M1, bpp::YNGP_M10, bpp::YNGP_M2, bpp::YNGP_M3, bpp::YNGP_M7, bpp::YNGP_M8, bpp::YNGP_M9, bpp::D1WalkSubstitutionModel, bpp::EquiprobableSubstitutionModel, bpp::FromMixtureSubstitutionModel, bpp::G2001, bpp::InMixedSubstitutionModel, bpp::KroneckerWordSubstitutionModel, bpp::MixtureOfASubstitutionModel, bpp::MixtureOfATransitionModel, bpp::MixtureOfSubstitutionModels, bpp::MixtureOfTransitionModels, bpp::MultinomialFromTransitionModel, bpp::F81, bpp::gBGC, bpp::GTR, bpp::JCnuc, bpp::K80, bpp::L95, bpp::RN95, bpp::RN95s, bpp::SSR, bpp::T92, bpp::TN93, bpp::YpR_Sym, bpp::YpR_Gen, bpp::OneChangeRegisterTransitionModel, bpp::OneChangeTransitionModel, bpp::POMO, bpp::Coala, bpp::DSO78, bpp::JCprot, bpp::JTT92, bpp::LG08, bpp::LGL08_CAT::EmbeddedModel, bpp::LGL08_CAT, bpp::LLG08_EHO::EmbeddedModel, bpp::LLG08_EHO, bpp::LLG08_EX2::EmbeddedModel, bpp::LLG08_EX2, bpp::LLG08_EX3::EmbeddedModel, bpp::LLG08_EX3, bpp::LLG08_UL2::EmbeddedModel, bpp::LLG08_UL2, bpp::LLG08_UL3::EmbeddedModel, bpp::LLG08_UL3, bpp::UserProteinSubstitutionModel, bpp::WAG01, bpp::RE08, bpp::RE08Nucleotide, bpp::RE08Protein, bpp::RE08Codon, bpp::RegisterRatesSubstitutionModel, bpp::TransitionFromTransitionModel, bpp::TS98, bpp::WordSubstitutionModel, bpp::AbstractMixedTransitionModel, bpp::AbstractReversibleSubstitutionModel, bpp::AbstractCodonSubstitutionModel, bpp::AbstractDFPSubstitutionModel, bpp::AbstractKroneckerCodonSubstitutionModel, bpp::CodonSubstitutionModelInterface, bpp::CodonReversibleSubstitutionModelInterface, bpp::YNGP_M, bpp::MarkovModulatedSubstitutionModel, bpp::MixedTransitionModelInterface, bpp::NucleotideSubstitutionModelInterface, bpp::NucleotideReversibleSubstitutionModelInterface, bpp::AbstractNucleotideSubstitutionModel, bpp::AbstractReversibleNucleotideSubstitutionModel, bpp::ProteinSubstitutionModelInterface, bpp::ProteinReversibleSubstitutionModelInterface, bpp::AbstractProteinSubstitutionModel, bpp::AbstractReversibleProteinSubstitutionModel, bpp::SubstitutionModelInterface, and bpp::ReversibleSubstitutionModelInterface.
Referenced by bpp::SubstitutionProcessCollection::addOnePerBranchSubstitutionProcess(), and bpp::NonHomogeneousSubstitutionProcess::createNonHomogeneousSubstitutionProcess().
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |
| Exception | if no FrequenceSet is associated to this model. |
Implemented in bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::AbstractBiblioMixedTransitionModel, bpp::AbstractTransitionModel, bpp::AbstractWrappedModel, bpp::AbstractWrappedTransitionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::YN98, bpp::D1WalkSubstitutionModel, bpp::EquiprobableSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::OneChangeRegisterTransitionModel, bpp::OneChangeTransitionModel, bpp::DSO78, bpp::JCprot, bpp::JTT92, bpp::LG08, bpp::UserProteinSubstitutionModel, bpp::WAG01, and bpp::RegisterRatesSubstitutionModel.
Referenced by bpp::RE08Codon::codonFrequencySet(), bpp::AbstractWrappedModel::frequencySet(), bpp::AbstractWrappedTransitionModel::frequencySet(), bpp::OneChangeRegisterTransitionModel::frequencySet(), bpp::OneChangeTransitionModel::frequencySet(), and bpp::BppOSubstitutionModelFormat::write().
|
pure virtualinherited |
Implemented in bpp::AbstractTransitionModel, bpp::AbstractWrappedModel, bpp::MarkovModulatedSubstitutionModel, and bpp::RegisterRatesSubstitutionModel.
Referenced by bpp::NonHomogeneousSubstitutionProcess::addModel(), bpp::YpR::checkModel(), bpp::NonHomogeneousSubstitutionProcess::createHomogeneousSubstitutionProcess(), bpp::NonHomogeneousSubstitutionProcess::createNonHomogeneousSubstitutionProcess(), bpp::AbstractWrappedModel::getAlphabet(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), bpp::DRASRTreeLikelihoodData::initLikelihoods(), bpp::SENCA::setFreq(), bpp::NonHomogeneousSubstitutionProcess::setModel(), and bpp::BppOSubstitutionModelFormat::writeMixed_().
|
pure virtualinherited |
| index | The model state. |
Implemented in bpp::AbstractWrappedModel, bpp::AbstractTransitionModel, bpp::MarkovModulatedSubstitutionModel, and bpp::RegisterRatesSubstitutionModel.
Referenced by bpp::AbstractWrappedModel::getAlphabetStateAsChar(), and bpp::SubstitutionModelSet::getAlphabetStateAsChar().
|
pure virtualinherited |
| index | The model state. |
Implemented in bpp::AbstractWrappedModel, bpp::RegisterRatesSubstitutionModel, bpp::AbstractTransitionModel, and bpp::MarkovModulatedSubstitutionModel.
Referenced by bpp::AbstractWrappedModel::getAlphabetStateAsInt(), bpp::SubstitutionModelSet::getAlphabetStateAsInt(), bpp::DRASRTreeLikelihoodData::initLikelihoods(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), and bpp::DRASRTreeLikelihoodData::initLikelihoodsWithPatterns().
|
pure virtualinherited |
Implemented in bpp::AbstractTransitionModel, bpp::AbstractWrappedModel, bpp::MarkovModulatedSubstitutionModel, and bpp::RegisterRatesSubstitutionModel.
Referenced by bpp::SubstitutionModelSet::getAlphabetStates(), and bpp::AbstractWrappedModel::getAlphabetStates().
|
pure virtualinherited |
This method is used to initialize likelihoods in recursions. It typically sends 1 if i = state, 0 otherwise, where i is one of the possible states of the alphabet allowed in the model and state is the observed state in the considered sequence/site.
| i | the index of the state in the model. |
| state | An observed state in the sequence/site. |
| IndexOutOfBoundsException | if array position is out of range. |
| BadIntException | if states are not allowed in the associated alphabet. |
Implemented in bpp::AbstractTransitionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::InMixedSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::MultinomialFromTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::OneChangeTransitionModel, bpp::RE08, and bpp::TransitionFromTransitionModel.
Referenced by bpp::AbstractTotallyWrappedTransitionModel::getInitValue(), bpp::InMixedSubstitutionModel::getInitValue(), bpp::MultinomialFromTransitionModel::getInitValue(), bpp::OneChangeRegisterTransitionModel::getInitValue(), bpp::OneChangeTransitionModel::getInitValue(), and bpp::TransitionFromTransitionModel::getInitValue().
|
pure virtualinherited |
Get the state in the model corresponding to a particular state in the alphabet.
| code | The alphabet state to check. |
Implemented in bpp::AbstractTransitionModel, bpp::AbstractWrappedModel, bpp::MarkovModulatedSubstitutionModel, and bpp::RegisterRatesSubstitutionModel.
|
pure virtualinherited |
Get the state in the model corresponding to a particular state in the alphabet.
| code | The alphabet state to check. |
Implemented in bpp::AbstractTransitionModel, bpp::AbstractWrappedModel, bpp::MarkovModulatedSubstitutionModel, and bpp::RegisterRatesSubstitutionModel.
Referenced by bpp::SubstitutionModelSet::getModelStates(), and bpp::AbstractWrappedModel::getModelStates().
|
pure virtualinherited |
Get the name of the model.
Implemented in bpp::BinarySubstitutionModel, bpp::CodonDistanceSubstitutionModel, bpp::F84, bpp::HKY85, bpp::LG10_EX_EHO::EmbeddedModel, bpp::LG10_EX_EHO, bpp::TwoParameterBinarySubstitutionModel, bpp::AbstractWrappedModel, bpp::AnonymousSubstitutionModel, bpp::CodonAdHocSubstitutionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonSameAARateSubstitutionModel, bpp::DFP07, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::GY94, bpp::KCM, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::KroneckerCodonDistanceSubstitutionModel, bpp::MG94, bpp::RELAX, bpp::SENCA, bpp::TripletSubstitutionModel, bpp::YN98, bpp::YNGP_M1, bpp::YNGP_M10, bpp::YNGP_M2, bpp::YNGP_M3, bpp::YNGP_M7, bpp::YNGP_M8, bpp::YNGP_M9, bpp::D1WalkSubstitutionModel, bpp::EquiprobableSubstitutionModel, bpp::FromMixtureSubstitutionModel, bpp::G2001, bpp::InMixedSubstitutionModel, bpp::KroneckerWordSubstitutionModel, bpp::MixtureOfATransitionModel, bpp::MixtureOfTransitionModels, bpp::MultinomialFromTransitionModel, bpp::F81, bpp::gBGC, bpp::GTR, bpp::JCnuc, bpp::K80, bpp::L95, bpp::RN95, bpp::RN95s, bpp::SSR, bpp::T92, bpp::TN93, bpp::YpR_Sym, bpp::YpR_Gen, bpp::OneChangeRegisterTransitionModel, bpp::OneChangeTransitionModel, bpp::POMO, bpp::Coala, bpp::DSO78, bpp::JCprot, bpp::JTT92, bpp::LG08, bpp::LGL08_CAT::EmbeddedModel, bpp::LGL08_CAT, bpp::LLG08_EHO::EmbeddedModel, bpp::LLG08_EHO, bpp::LLG08_EX2::EmbeddedModel, bpp::LLG08_EX2, bpp::LLG08_EX3::EmbeddedModel, bpp::LLG08_EX3, bpp::LLG08_UL2::EmbeddedModel, bpp::LLG08_UL2, bpp::LLG08_UL3::EmbeddedModel, bpp::LLG08_UL3, bpp::UserProteinSubstitutionModel, bpp::WAG01, bpp::RE08, bpp::RegisterRatesSubstitutionModel, bpp::TransitionFromTransitionModel, bpp::TS98, and bpp::WordSubstitutionModel.
Referenced by bpp::YpR::checkModel(), bpp::TransitionMatrixFromModel::compute(), bpp::AbstractWrappedModel::getName(), bpp::FromMixtureSubstitutionModel::getName(), bpp::AbstractSubstitutionModel::getPij_t(), bpp::BppOSubstitutionModelFormat::initialize_(), bpp::MixtureOfSubstitutionModels::MixtureOfSubstitutionModels(), bpp::MixtureOfATransitionModel::model(), bpp::SubstitutionProcessCollectionMember::setModelScenario(), bpp::LegacyPhylogeneticsApplicationTools::setSubstitutionModelParametersInitialValuesWithAliases(), bpp::ModelPath::toString(), and bpp::BppOSubstitutionModelFormat::write().
|
pure virtualinherited |
Get the number of states.
For most models, this equals the size of the alphabet.
Implemented in bpp::BinarySubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::AbstractTransitionModel, bpp::AbstractWrappedModel, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::gBGC, bpp::YpR, bpp::RE08Nucleotide, bpp::RE08Protein, bpp::RE08Codon, bpp::RegisterRatesSubstitutionModel, and bpp::AbstractDFPSubstitutionModel.
Referenced by bpp::NonHomogeneousSubstitutionProcess::addModel(), bpp::SubstitutionModelSet::addModel(), bpp::AbstractWrappedModel::getNumberOfStates(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), bpp::DRASRTreeLikelihoodData::initLikelihoods(), and bpp::NonHomogeneousSubstitutionProcess::setModel().
|
pure virtualinherited |
Get the rate.
Implemented in bpp::AbstractTransitionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::G2001, bpp::InMixedSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::MultinomialFromTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::OneChangeTransitionModel, bpp::RegisterRatesSubstitutionModel, bpp::TransitionFromTransitionModel, and bpp::TS98.
Referenced by bpp::AbstractFromSubstitutionModelTransitionModel::addRateParameter(), bpp::OneChangeRegisterTransitionModel::d2Pij_dt2(), bpp::OneChangeTransitionModel::d2Pij_dt2(), bpp::OneChangeRegisterTransitionModel::dPij_dt(), bpp::OneChangeTransitionModel::dPij_dt(), bpp::OneChangeRegisterTransitionModel::getd2Pij_dt2(), bpp::OneChangeTransitionModel::getd2Pij_dt2(), bpp::OneChangeRegisterTransitionModel::getdPij_dt(), bpp::OneChangeTransitionModel::getdPij_dt(), bpp::OneChangeRegisterTransitionModel::getPij_t(), bpp::OneChangeTransitionModel::getPij_t(), bpp::AbstractTotallyWrappedTransitionModel::getRate(), bpp::InMixedSubstitutionModel::getRate(), bpp::MultinomialFromTransitionModel::getRate(), bpp::OneChangeRegisterTransitionModel::getRate(), bpp::OneChangeTransitionModel::getRate(), bpp::RegisterRatesSubstitutionModel::getRate(), bpp::TransitionFromTransitionModel::getRate(), and bpp::OneChangeTransitionModel::Pij_t().
|
pure virtualinherited |
Implemented in bpp::AbstractTransitionModel, bpp::AbstractWrappedModel, bpp::MarkovModulatedSubstitutionModel, and bpp::RegisterRatesSubstitutionModel.
Referenced by bpp::SubstitutionModelSet::getStateMap(), bpp::SubstitutionProcessCollectionMember::getStateMap(), and bpp::AbstractWrappedModel::getStateMap().
|
pure virtualinherited |
This method is used to compute likelihoods in recursions. It computes the probability of a vector given a start state.
| values | An vector of states on the site. |
| t | time |
| IndexOutOfBoundsException | if array position is out of range. |
| BadIntException | if states are not allowed in the associated alphabet. |
Implemented in bpp::MultinomialFromTransitionModel, bpp::TransitionFromTransitionModel, bpp::TransitionModelInterface, and bpp::AbstractLkTransitionModel.
|
pure virtual |
Implemented in bpp::AbstractFromSubstitutionModelTransitionModel, bpp::AbstractWrappedTransitionModel, bpp::MultinomialFromTransitionModel, and bpp::TransitionFromTransitionModel.
Referenced by bpp::AbstractWrappedModel::alphabet(), bpp::AbstractWrappedModel::frequencySet(), bpp::AbstractWrappedModel::getAlphabet(), bpp::AbstractWrappedModel::getAlphabetStateAsChar(), bpp::AbstractWrappedModel::getAlphabetStateAsInt(), bpp::AbstractWrappedModel::getAlphabetStates(), bpp::AbstractWrappedModel::getModelStates(), bpp::AbstractWrappedModel::getName(), bpp::AbstractWrappedModel::getNumberOfStates(), bpp::AbstractWrappedModel::getStateMap(), and bpp::AbstractWrappedModel::stateMap().
|
pure virtualinherited |
Set the rate of the model (must be positive).
| rate | must be positive. |
Implemented in bpp::AbstractMixedTransitionModel, bpp::AbstractTransitionModel, bpp::AbstractTotallyWrappedTransitionModel, bpp::G2001, bpp::InMixedSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::MultinomialFromTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::OneChangeTransitionModel, bpp::RegisterRatesSubstitutionModel, bpp::TransitionFromTransitionModel, and bpp::TS98.
Referenced by bpp::AbstractBiblioTransitionModel::fireParameterChanged(), bpp::AbstractTotallyWrappedTransitionModel::setRate(), bpp::InMixedSubstitutionModel::setRate(), bpp::MultinomialFromTransitionModel::setRate(), bpp::OneChangeRegisterTransitionModel::setRate(), bpp::OneChangeTransitionModel::setRate(), bpp::RegisterRatesSubstitutionModel::setRate(), and bpp::TransitionFromTransitionModel::setRate().
|
pure virtualinherited |
Implemented in bpp::AbstractTransitionModel, bpp::AbstractWrappedModel, bpp::MarkovModulatedSubstitutionModel, and bpp::RegisterRatesSubstitutionModel.
Referenced by bpp::SubstitutionModelSet::stateMap(), bpp::SubstitutionProcessCollectionMember::stateMap(), and bpp::AbstractWrappedModel::stateMap().