bpp-phyl3  3.0.0
bpp::AutonomousSubstitutionProcessInterface Class Referenceabstract

Interface for SubstitutionProcess objects that own their own ParametrizablePhyloTree & Scenario. More...

#include <Bpp/Phyl/Likelihood/AutonomousSubstitutionProcess.h>

+ Inheritance diagram for bpp::AutonomousSubstitutionProcessInterface:
+ Collaboration diagram for bpp::AutonomousSubstitutionProcessInterface:

Public Member Functions

virtual void setPhyloTree (const PhyloTree &phyloTree)=0
 set the ParametrizablePhyloTree. More...
 
virtual void setRootFrequencySet (std::shared_ptr< FrequencySetInterface > rootfrequency)=0
 set the RootFrequency. More...
 
virtual void setModelScenario (std::shared_ptr< ModelScenario > modelScenario)=0
 set the ModelScenario. More...
 
virtual SubstitutionProcessInterfaceclone () const =0
 
virtual const StateMapInterfacestateMap () const =0
 
virtual std::shared_ptr< const StateMapInterfacegetStateMap () const =0
 
virtual bool isCompatibleWith (const AlignmentDataInterface &data) const =0
 
virtual const ParametrizablePhyloTreeparametrizablePhyloTree () const =0
 
virtual std::shared_ptr< const ParametrizablePhyloTreegetParametrizablePhyloTree () const =0
 
virtual size_t getNumberOfClasses () const =0
 
virtual size_t getNumberOfStates () const =0
 
virtual size_t getNumberOfModels () const =0
 
virtual std::vector< size_t > getModelNumbers () const =0
 
virtual const BranchModelInterfacemodel (size_t i) const =0
 
virtual const BranchModelInterfacemodel (unsigned int nodeId, size_t classIndex) const =0
 Get the substitution model corresponding to a certain branch, site pattern, and model class. More...
 
virtual std::shared_ptr< const BranchModelInterfacegetModel (size_t i) const =0
 
virtual std::shared_ptr< const BranchModelInterfacegetModel (unsigned int nodeId, size_t classIndex) const =0
 Get the substitution model corresponding to a certain branch, site pattern, and model class. More...
 
virtual std::shared_ptr< const ModelScenariogetModelScenario () const =0
 Get the Model Scenario associated with this process, in case there are mixture models involved. More...
 
virtual const std::vector< unsigned int > getNodesWithModel (size_t i) const =0
 Get a list of nodes id for which the given model is associated. More...
 
virtual size_t getModelNumberForNode (unsigned int nodeId) const =0
 Get the number of the model associated to a particular node id. More...
 
virtual std::shared_ptr< const BranchModelInterfacegetModelForNode (unsigned int nodeId) const =0
 Get the model associated to a particular node id. More...
 
virtual const DiscreteDistributionInterfacerateDistribution () const =0
 Get the rate distribution. More...
 
virtual DiscreteDistributionInterfacerateDistribution ()=0
 Get the rate distribution. More...
 
virtual std::shared_ptr< const DiscreteDistributionInterfacegetRateDistribution () const =0
 Get a pointer to the rate distribution (or null if there is no rate distribution). More...
 
virtual std::shared_ptr< DiscreteDistributionInterfacegetRateDistribution ()=0
 Get a pointer to the rate distribution (or null if there is no rate distribution). More...
 
virtual ParameterList getSubstitutionModelParameters (bool independent) const =0
 Methods to retrieve the parameters of specific objects. More...
 
virtual ParameterList getRateDistributionParameters (bool independent) const =0
 
virtual ParameterList getRootFrequenciesParameters (bool independent) const =0
 
virtual ParameterList getBranchLengthParameters (bool independent) const =0
 
virtual ParameterList getNonDerivableParameters () const =0
 
virtual const std::vector< double > & getRootFrequencies () const =0
 Get the values of the frequencies for each state in the alphabet at the root node. More...
 
virtual bool hasRootFrequencySet () const =0
 
virtual const FrequencySetInterfacerootFrequencySet () const =0
 
virtual FrequencySetInterfacerootFrequencySet ()=0
 
virtual std::shared_ptr< const FrequencySetInterfacegetRootFrequencySet () const =0
 
virtual std::shared_ptr< FrequencySetInterfacegetRootFrequencySet ()=0
 
virtual double getProbabilityForModel (size_t classIndex) const =0
 
virtual Vdouble getClassProbabilities () const =0
 
virtual double getRateForModel (size_t classIndex) const =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 ParameterListgetIndependentParameters () 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 ParameterListgetParameters () const=0
 
virtual const Parameterparameter (const std::string &name) const=0
 
virtual double getParameterValue (const std::string &name) const=0
 
virtual void setAllParametersValues (const ParameterList &parameters)=0
 
virtual void setParameterValue (const std::string &name, double value)=0
 
virtual void setParametersValues (const ParameterList &parameters)=0
 
virtual bool matchParametersValues (const ParameterList &parameters)=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 ParameterListgetParameters_ ()=0
 

Detailed Description

Interface for SubstitutionProcess objects that own their own ParametrizablePhyloTree & Scenario.

Definition at line 21 of file AutonomousSubstitutionProcess.h.

Member Function Documentation

◆ clone()

◆ getBranchLengthParameters()

◆ getClassProbabilities()

virtual Vdouble bpp::SubstitutionProcessInterface::getClassProbabilities ( ) const
pure virtualinherited

◆ getModel() [1/2]

virtual std::shared_ptr<const BranchModelInterface> bpp::SubstitutionProcessInterface::getModel ( size_t  i) const
pure virtualinherited

◆ getModel() [2/2]

virtual std::shared_ptr<const BranchModelInterface> bpp::SubstitutionProcessInterface::getModel ( unsigned int  nodeId,
size_t  classIndex 
) const
pure virtualinherited

Get the substitution model corresponding to a certain branch, site pattern, and model class.

Parameters
nodeIdThe id of the node.
classIndexThe model class index.
Returns
A shared pointer toward the model with given index.

Implemented in bpp::SubstitutionProcessCollectionMember, bpp::SimpleSubstitutionProcess, bpp::RateAcrossSitesSubstitutionProcess, and bpp::NonHomogeneousSubstitutionProcess.

◆ getModelForNode()

virtual std::shared_ptr<const BranchModelInterface> bpp::SubstitutionProcessInterface::getModelForNode ( unsigned int  nodeId) const
pure virtualinherited

Get the model associated to a particular node id.

Parameters
nodeIdThe id of the query node.
Returns
A pointer toward the corresponding model.
Exceptions
ExceptionIf no model is found for this node.

Implemented in bpp::SubstitutionProcessCollectionMember, bpp::SimpleSubstitutionProcess, bpp::RateAcrossSitesSubstitutionProcess, and bpp::NonHomogeneousSubstitutionProcess.

◆ getModelNumberForNode()

virtual size_t bpp::SubstitutionProcessInterface::getModelNumberForNode ( unsigned int  nodeId) const
pure virtualinherited

Get the number of the model associated to a particular node id.

Parameters
nodeIdThe id of the query node.
Returns
The number of the model associated to the given node.
Exceptions
ExceptionIf no model is found for this node.

Implemented in bpp::SubstitutionProcessCollectionMember, bpp::SimpleSubstitutionProcess, bpp::RateAcrossSitesSubstitutionProcess, and bpp::NonHomogeneousSubstitutionProcess.

◆ getModelNumbers()

virtual std::vector<size_t> bpp::SubstitutionProcessInterface::getModelNumbers ( ) const
pure virtualinherited

◆ getModelScenario()

virtual std::shared_ptr<const ModelScenario> bpp::SubstitutionProcessInterface::getModelScenario ( ) const
pure virtualinherited

Get the Model Scenario associated with this process, in case there are mixture models involved.

When a mixture model is not included in the ModelScenario, it is considered as non-mixed (transition probabilities are then computed as mixture of submodel transition probalities).

It returns 0 if there is no model path, which means that all mixture models are considered as non-mixed.

Implemented in bpp::SubstitutionProcessCollectionMember, and bpp::AbstractAutonomousSubstitutionProcess.

◆ getNodesWithModel()

virtual const std::vector<unsigned int> bpp::SubstitutionProcessInterface::getNodesWithModel ( size_t  i) const
pure virtualinherited

Get a list of nodes id for which the given model is associated.

Parameters
iThe index of the model in the set.
Returns
A vector with the ids of the node associated to this model.
Exceptions
IndexOutOfBoundsExceptionIf the index is not valid.

Implemented in bpp::SubstitutionProcessCollectionMember, bpp::SimpleSubstitutionProcess, bpp::RateAcrossSitesSubstitutionProcess, and bpp::NonHomogeneousSubstitutionProcess.

Referenced by bpp::OneProcessSequenceSubstitutionMapping::setBranchedModelSet_(), and bpp::SingleProcessSubstitutionMapping::setBranchedModelSet_().

◆ getNonDerivableParameters()

virtual ParameterList bpp::SubstitutionProcessInterface::getNonDerivableParameters ( ) const
pure virtualinherited

◆ getNumberOfClasses()

virtual size_t bpp::SubstitutionProcessInterface::getNumberOfClasses ( ) const
pure virtualinherited

◆ getNumberOfModels()

virtual size_t bpp::SubstitutionProcessInterface::getNumberOfModels ( ) const
pure virtualinherited

◆ getNumberOfStates()

virtual size_t bpp::SubstitutionProcessInterface::getNumberOfStates ( ) const
pure virtualinherited

◆ getParametrizablePhyloTree()

◆ getProbabilityForModel()

virtual double bpp::SubstitutionProcessInterface::getProbabilityForModel ( size_t  classIndex) const
pure virtualinherited
Returns
The probability associated to the given model class.
Parameters
classIndexThe model class index.

Implemented in bpp::SubstitutionProcessCollectionMember, bpp::SimpleSubstitutionProcess, bpp::RateAcrossSitesSubstitutionProcess, and bpp::NonHomogeneousSubstitutionProcess.

Referenced by bpp::RewardMappingTools::computeRewardVectors().

◆ getRateDistribution() [1/2]

virtual std::shared_ptr<const DiscreteDistributionInterface> bpp::SubstitutionProcessInterface::getRateDistribution ( ) const
pure virtualinherited

◆ getRateDistribution() [2/2]

virtual std::shared_ptr<DiscreteDistributionInterface> bpp::SubstitutionProcessInterface::getRateDistribution ( )
pure virtualinherited

Get a pointer to the rate distribution (or null if there is no rate distribution).

Implemented in bpp::SubstitutionProcessCollectionMember, bpp::SimpleSubstitutionProcess, bpp::RateAcrossSitesSubstitutionProcess, and bpp::NonHomogeneousSubstitutionProcess.

◆ getRateDistributionParameters()

◆ getRateForModel()

virtual double bpp::SubstitutionProcessInterface::getRateForModel ( size_t  classIndex) const
pure virtualinherited
Returns
The substitution rate associated to the given model class.
Parameters
classIndexThe model class index.

Implemented in bpp::SubstitutionProcessCollectionMember, bpp::SimpleSubstitutionProcess, bpp::RateAcrossSitesSubstitutionProcess, and bpp::NonHomogeneousSubstitutionProcess.

◆ getRootFrequencies()

virtual const std::vector<double>& bpp::SubstitutionProcessInterface::getRootFrequencies ( ) const
pure virtualinherited

Get the values of the frequencies for each state in the alphabet at the root node.

For reversible models, these are the equilibrium frequencies. For non-reversible models, these usually are distinct parameters.

Returns
A vector with ancestral frequencies for each state in the alphabet;

Implemented in bpp::SubstitutionProcessCollectionMember, bpp::SimpleSubstitutionProcess, bpp::RateAcrossSitesSubstitutionProcess, and bpp::NonHomogeneousSubstitutionProcess.

◆ getRootFrequenciesParameters()

virtual ParameterList bpp::SubstitutionProcessInterface::getRootFrequenciesParameters ( bool  independent) const
pure virtualinherited

◆ getRootFrequencySet() [1/2]

virtual std::shared_ptr<const FrequencySetInterface> bpp::SubstitutionProcessInterface::getRootFrequencySet ( ) const
pure virtualinherited
Returns
A pointer toward rhe set of parametrized root frequencies.

Implemented in bpp::SubstitutionProcessCollectionMember, and bpp::AbstractAutonomousSubstitutionProcess.

◆ getRootFrequencySet() [2/2]

virtual std::shared_ptr<FrequencySetInterface> bpp::SubstitutionProcessInterface::getRootFrequencySet ( )
pure virtualinherited
Returns
A pointer toward rhe set of parametrized root frequencies.

Implemented in bpp::SubstitutionProcessCollectionMember, and bpp::AbstractAutonomousSubstitutionProcess.

◆ getStateMap()

virtual std::shared_ptr<const StateMapInterface> bpp::SubstitutionProcessInterface::getStateMap ( ) const
pure virtualinherited

◆ getSubstitutionModelParameters()

virtual ParameterList bpp::SubstitutionProcessInterface::getSubstitutionModelParameters ( bool  independent) const
pure virtualinherited

◆ hasRootFrequencySet()

virtual bool bpp::SubstitutionProcessInterface::hasRootFrequencySet ( ) const
pure virtualinherited
Returns
true if the process has parametrized root frequencies (non-stationary model)

Implemented in bpp::SubstitutionProcessCollectionMember, and bpp::AbstractAutonomousSubstitutionProcess.

◆ isCompatibleWith()

virtual bool bpp::SubstitutionProcessInterface::isCompatibleWith ( const AlignmentDataInterface data) const
pure virtualinherited

◆ model() [1/2]

◆ model() [2/2]

virtual const BranchModelInterface& bpp::SubstitutionProcessInterface::model ( unsigned int  nodeId,
size_t  classIndex 
) const
pure virtualinherited

Get the substitution model corresponding to a certain branch, site pattern, and model class.

Parameters
nodeIdThe id of the node.
classIndexThe model class index.
Returns
the model with given index.

Implemented in bpp::SubstitutionProcessCollectionMember, bpp::SimpleSubstitutionProcess, bpp::RateAcrossSitesSubstitutionProcess, and bpp::NonHomogeneousSubstitutionProcess.

◆ parametrizablePhyloTree()

◆ rateDistribution() [1/2]

virtual const DiscreteDistributionInterface& bpp::SubstitutionProcessInterface::rateDistribution ( ) const
pure virtualinherited

◆ rateDistribution() [2/2]

virtual DiscreteDistributionInterface& bpp::SubstitutionProcessInterface::rateDistribution ( )
pure virtualinherited

◆ rootFrequencySet() [1/2]

virtual const FrequencySetInterface& bpp::SubstitutionProcessInterface::rootFrequencySet ( ) const
pure virtualinherited
Returns
The set of parametrized root frequencies.

Implemented in bpp::SubstitutionProcessCollectionMember, and bpp::AbstractAutonomousSubstitutionProcess.

◆ rootFrequencySet() [2/2]

virtual FrequencySetInterface& bpp::SubstitutionProcessInterface::rootFrequencySet ( )
pure virtualinherited
Returns
The set of parametrized root frequencies.

Implemented in bpp::SubstitutionProcessCollectionMember, and bpp::AbstractAutonomousSubstitutionProcess.

◆ setModelScenario()

virtual void bpp::AutonomousSubstitutionProcessInterface::setModelScenario ( std::shared_ptr< ModelScenario modelScenario)
pure virtual

set the ModelScenario.

Parameters
modelScenarioThe scenario to be associated with this instance.

Implemented in bpp::AbstractAutonomousSubstitutionProcess, bpp::NonHomogeneousSubstitutionProcess, bpp::SimpleSubstitutionProcess, and bpp::RateAcrossSitesSubstitutionProcess.

◆ setPhyloTree()

virtual void bpp::AutonomousSubstitutionProcessInterface::setPhyloTree ( const PhyloTree phyloTree)
pure virtual

set the ParametrizablePhyloTree.

Will build a unique_ptr<ParametrizablePhyloTree> from the given PhyloTree

Parameters
phyloTreeTree, in the form of PhyloTree, to be associated with this instance.

Implemented in bpp::AbstractAutonomousSubstitutionProcess.

◆ setRootFrequencySet()

virtual void bpp::AutonomousSubstitutionProcessInterface::setRootFrequencySet ( std::shared_ptr< FrequencySetInterface rootfrequency)
pure virtual

set the RootFrequency.

Parameters
rootfrequencyThe root frequencies to be associated with this instance.

Implemented in bpp::AbstractAutonomousSubstitutionProcess.

◆ stateMap()

virtual const StateMapInterface& bpp::SubstitutionProcessInterface::stateMap ( ) const
pure virtualinherited

The documentation for this class was generated from the following file: