bpp-phyl3  3.0.0
bpp::MixtureSequenceEvolution Class Referenceabstract

Sequence evolution framework based on a mixture of substitution processes. More...

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

+ Inheritance diagram for bpp::MixtureSequenceEvolution:
+ Collaboration diagram for bpp::MixtureSequenceEvolution:

Public Member Functions

 MixtureSequenceEvolution (std::shared_ptr< SubstitutionProcessCollection > processColl, std::vector< size_t > &nProc)
 
 MixtureSequenceEvolution (const MixtureSequenceEvolution &mlc)
 
MixtureSequenceEvolutionoperator= (const MixtureSequenceEvolution &mlc)
 
virtual ~MixtureSequenceEvolution ()
 
MixtureSequenceEvolutionclone () const override
 
void setNamespace (const std::string &nameSpace) override
 
void fireParameterChanged (const ParameterList &parameters) override
 
ParameterList getNonDerivableParameters () const override
 All non derivable parameters. More...
 
const std::vector< double > & getSubProcessProbabilities () const
 
Simplexsimplex ()
 
double getSubProcessProb (size_t i) const
 return the probability of a subprocess More...
 
void setSubProcessProb (const Simplex &si)
 Set the probabilities of the subprocess. More...
 
const SubstitutionProcessCollectioncollection () const
 The collection. More...
 
SubstitutionProcessCollectioncollection ()
 
std::shared_ptr< const SubstitutionProcessCollectiongetCollection () const
 
std::shared_ptr< SubstitutionProcessCollectiongetCollection ()
 
size_t getNumberOfSubstitutionProcess () const
 Return the number of process used for computation. More...
 
const SubstitutionProcessInterfacesubstitutionProcess (size_t number) const
 Return the SubstitutionProcess of a given index position (in nProc_ vector). More...
 
std::shared_ptr< const SubstitutionProcessInterfacegetSubstitutionProcess (size_t number) const
 
const std::vector< size_t > & getSubstitutionProcessNumbers () const
 
ParameterList getSubstitutionProcessParameters (bool independent) const
 Get the parameters associated to substitution processes(s). More...
 
ParameterList getSubstitutionModelParameters (bool independent) const
 Get the parameters associated to substitution model(s). More...
 
ParameterList getRateDistributionParameters (bool independent) const
 Get the parameters associated to the rate distribution(s). More...
 
ParameterList getRootFrequenciesParameters (bool independent) const
 Get the parameters associated to the root frequencies(s). More...
 
ParameterList getBranchLengthParameters (bool independent) const
 Get the branch lengths parameters. More...
 
void setParameters (const ParameterList &parameters)
 
virtual bool isCompatibleWith (const AlignmentDataInterface &data) const
 test if data fits this model More...
 
const StateMapInterfacestateMap () const
 
std::shared_ptr< const StateMapInterfacegetStateMap () const
 
virtual size_t getNumberOfIndependentParameters () const=0
 
size_t getNumberOfIndependentParameters () const
 
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
 
void aliasParameters (const std::string &p1, const std::string &p2)
 
void aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose)
 
virtual void unaliasParameters (const std::string &p1, const std::string &p2)=0
 
void unaliasParameters (const std::string &p1, const std::string &p2)
 
virtual const ParameterListgetIndependentParameters () const=0
 
const ParameterListgetIndependentParameters () const
 
virtual std::vector< std::string > getAlias (const std::string &name) const=0
 
virtual std::vector< std::string > getAlias (const std::string &name) const
 
virtual std::map< std::string, std::string > getAliases () const=0
 
virtual std::map< std::string, std::string > getAliases () const
 
virtual bool hasParameter (const std::string &name) const=0
 
bool hasParameter (const std::string &name) const override
 
virtual const ParameterListgetParameters () const=0
 
const ParameterListgetParameters () const override
 
virtual const Parameterparameter (const std::string &name) const=0
 
const Parameterparameter (const std::string &name) const override
 
virtual double getParameterValue (const std::string &name) const=0
 
double getParameterValue (const std::string &name) const override
 
virtual void setAllParametersValues (const ParameterList &parameters)=0
 
void setAllParametersValues (const ParameterList &parameters) override
 
virtual void setParameterValue (const std::string &name, double value)=0
 
void setParameterValue (const std::string &name, double value) override
 
virtual void setParametersValues (const ParameterList &parameters)=0
 
void setParametersValues (const ParameterList &parameters) override
 
virtual bool matchParametersValues (const ParameterList &parameters)=0
 
bool matchParametersValues (const ParameterList &parameters) override
 
virtual void removeConstraint (const std::string &name)=0
 
void removeConstraint (const std::string &name) override
 
virtual void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint)=0
 
void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override
 
virtual size_t getNumberOfParameters () const=0
 
size_t getNumberOfParameters () const override
 
virtual std::string getNamespace () const=0
 
std::string getNamespace () const override
 
virtual std::string getParameterNameWithoutNamespace (const std::string &name) const=0
 
std::string getParameterNameWithoutNamespace (const std::string &name) const override
 
bool hasIndependentParameter (const std::string &name) const
 
ParameterList getAliasedParameters (const ParameterList &pl) const
 
ParameterList getFromParameters (const ParameterList &pl) const
 
std::string getFrom (const std::string &name) const
 
const std::shared_ptr< Parameter > & getParameter (const std::string &name) const
 

Protected Member Functions

virtual ParameterListgetParameters_ ()=0
 
ParameterListgetParameters_ () override
 
const std::shared_ptr< Parameter > & getParameter (size_t i) const
 
std::shared_ptr< Parameter > & getParameter (size_t i)
 
void addParameter_ (Parameter *parameter)
 
void addParameters_ (const ParameterList &parameters)
 
void shareParameter_ (const std::shared_ptr< Parameter > &parameter)
 
void shareParameters_ (const ParameterList &parameters)
 
void includeParameters_ (const ParameterList &parameters)
 
void deleteParameter_ (size_t index)
 
void deleteParameter_ (std::string &name)
 
void deleteParameters_ (const std::vector< std::string > &names)
 
void resetParameters_ ()
 
ParametergetParameter_ (const std::string &name)
 
ParametergetParameter_ (size_t index)
 
const ParametergetParameter_ (size_t index) const
 
ParametergetParameterWithNamespace_ (const std::string &name)
 
const ParametergetParameterWithNamespace_ (const std::string &name) const
 

Protected Attributes

std::shared_ptr< SubstitutionProcessCollectionprocessColl_
 
std::vector< size_t > nProc_
 the vector of the substitution process numbers, as they are used in this order. More...
 

Private Attributes

Simplex simplex_
 
ParameterList independentParameters_
 
std::map< std::string, std::shared_ptr< AliasParameterListener > > aliasListenersRegister_
 
ParameterList parameters_
 
std::string prefix_
 

Detailed Description

Sequence evolution framework based on a mixture of substitution processes.

See also
MultiProcessSequencePhyloLikelihood

Definition at line 21 of file MixtureSequenceEvolution.h.

Constructor & Destructor Documentation

◆ MixtureSequenceEvolution() [1/2]

MixtureSequenceEvolution::MixtureSequenceEvolution ( std::shared_ptr< SubstitutionProcessCollection processColl,
std::vector< size_t > &  nProc 
)

◆ MixtureSequenceEvolution() [2/2]

bpp::MixtureSequenceEvolution::MixtureSequenceEvolution ( const MixtureSequenceEvolution mlc)
inline

Definition at line 32 of file MixtureSequenceEvolution.h.

◆ ~MixtureSequenceEvolution()

virtual bpp::MixtureSequenceEvolution::~MixtureSequenceEvolution ( )
inlinevirtual

Definition at line 43 of file MixtureSequenceEvolution.h.

Member Function Documentation

◆ clone()

MixtureSequenceEvolution* bpp::MixtureSequenceEvolution::clone ( ) const
inlineoverridevirtual

Implements bpp::AbstractParameterAliasable.

Definition at line 45 of file MixtureSequenceEvolution.h.

References MixtureSequenceEvolution().

◆ collection() [1/2]

SubstitutionProcessCollection& bpp::MultiProcessSequenceEvolution::collection ( )
inlineinherited

Definition at line 69 of file MultiProcessSequenceEvolution.h.

◆ collection() [2/2]

const SubstitutionProcessCollection& bpp::MultiProcessSequenceEvolution::collection ( ) const
inlineinherited

The collection.

Definition at line 65 of file MultiProcessSequenceEvolution.h.

◆ fireParameterChanged()

void MixtureSequenceEvolution::fireParameterChanged ( const ParameterList parameters)
overridevirtual

◆ getBranchLengthParameters()

ParameterList MultiProcessSequenceEvolution::getBranchLengthParameters ( bool  independent) const
virtualinherited

Get the branch lengths parameters.

Returns
A ParameterList with all branch lengths.

Implements bpp::SequenceEvolution.

Definition at line 85 of file MultiProcessSequenceEvolution.cpp.

References bpp::ParameterList::includeParameters(), bpp::MultiProcessSequenceEvolution::nProc_, and bpp::MultiProcessSequenceEvolution::processColl_.

◆ getCollection() [1/2]

std::shared_ptr<SubstitutionProcessCollection> bpp::MultiProcessSequenceEvolution::getCollection ( )
inlineinherited

Definition at line 71 of file MultiProcessSequenceEvolution.h.

◆ getCollection() [2/2]

std::shared_ptr<const SubstitutionProcessCollection> bpp::MultiProcessSequenceEvolution::getCollection ( ) const
inlineinherited

Definition at line 67 of file MultiProcessSequenceEvolution.h.

◆ getNonDerivableParameters()

ParameterList MixtureSequenceEvolution::getNonDerivableParameters ( ) const
overridevirtual

All non derivable parameters.

Usually, this contains all substitution model parameters and rate distribution, and alias.

Returns
A ParameterList.

Reimplemented from bpp::MultiProcessSequenceEvolution.

Definition at line 44 of file MixtureSequenceEvolution.cpp.

References bpp::MultiProcessSequenceEvolution::getNonDerivableParameters(), bpp::Simplex::getParameters(), bpp::ParameterList::includeParameters(), and simplex_.

◆ getNumberOfSubstitutionProcess()

size_t bpp::MultiProcessSequenceEvolution::getNumberOfSubstitutionProcess ( ) const
inlineinherited

Return the number of process used for computation.

Definition at line 76 of file MultiProcessSequenceEvolution.h.

Referenced by bpp::PhylogeneticsApplicationTools::printParameters().

◆ getRateDistributionParameters()

ParameterList MultiProcessSequenceEvolution::getRateDistributionParameters ( bool  independent) const
virtualinherited

Get the parameters associated to the rate distribution(s).

Returns
A ParameterList.

Implements bpp::SequenceEvolution.

Definition at line 61 of file MultiProcessSequenceEvolution.cpp.

References bpp::ParameterList::includeParameters(), bpp::MultiProcessSequenceEvolution::nProc_, and bpp::MultiProcessSequenceEvolution::processColl_.

◆ getRootFrequenciesParameters()

ParameterList MultiProcessSequenceEvolution::getRootFrequenciesParameters ( bool  independent) const
virtualinherited

Get the parameters associated to the root frequencies(s).

Returns
A ParameterList.

Implements bpp::SequenceEvolution.

Definition at line 73 of file MultiProcessSequenceEvolution.cpp.

References bpp::ParameterList::includeParameters(), bpp::MultiProcessSequenceEvolution::nProc_, and bpp::MultiProcessSequenceEvolution::processColl_.

◆ getStateMap()

std::shared_ptr<const StateMapInterface> bpp::SequenceEvolution::getStateMap ( ) const
inlineinherited

◆ getSubProcessProb()

double bpp::MixtureSequenceEvolution::getSubProcessProb ( size_t  i) const
inline

return the probability of a subprocess

Parameters
ithe index of the subprocess

Definition at line 69 of file MixtureSequenceEvolution.h.

References bpp::Simplex::prob(), and simplex_.

◆ getSubProcessProbabilities()

const std::vector<double>& bpp::MixtureSequenceEvolution::getSubProcessProbabilities ( ) const
inline

◆ getSubstitutionModelParameters()

ParameterList MultiProcessSequenceEvolution::getSubstitutionModelParameters ( bool  independent) const
virtualinherited

◆ getSubstitutionProcess()

std::shared_ptr<const SubstitutionProcessInterface> bpp::MultiProcessSequenceEvolution::getSubstitutionProcess ( size_t  number) const
inlinevirtualinherited

Implements bpp::SequenceEvolution.

Definition at line 87 of file MultiProcessSequenceEvolution.h.

◆ getSubstitutionProcessNumbers()

const std::vector<size_t>& bpp::MultiProcessSequenceEvolution::getSubstitutionProcessNumbers ( ) const
inlinevirtualinherited

◆ getSubstitutionProcessParameters()

ParameterList MultiProcessSequenceEvolution::getSubstitutionProcessParameters ( bool  independent) const
virtualinherited

Get the parameters associated to substitution processes(s).

Returns
A ParameterList.

Implements bpp::SequenceEvolution.

Definition at line 37 of file MultiProcessSequenceEvolution.cpp.

References bpp::ParameterList::includeParameters(), bpp::MultiProcessSequenceEvolution::nProc_, and bpp::MultiProcessSequenceEvolution::processColl_.

◆ isCompatibleWith()

bool MultiProcessSequenceEvolution::isCompatibleWith ( const AlignmentDataInterface data) const
virtualinherited

◆ operator=()

MixtureSequenceEvolution& bpp::MixtureSequenceEvolution::operator= ( const MixtureSequenceEvolution mlc)
inline

◆ setNamespace()

◆ setParameters()

void MultiProcessSequenceEvolution::setParameters ( const ParameterList parameters)
inherited

◆ setSubProcessProb()

void MixtureSequenceEvolution::setSubProcessProb ( const Simplex si)

◆ simplex()

Simplex& bpp::MixtureSequenceEvolution::simplex ( )
inline

Definition at line 59 of file MixtureSequenceEvolution.h.

References simplex_.

◆ stateMap()

◆ substitutionProcess()

const SubstitutionProcessInterface& bpp::MultiProcessSequenceEvolution::substitutionProcess ( size_t  number) const
inlinevirtualinherited

Return the SubstitutionProcess of a given index position (in nProc_ vector).

Implements bpp::SequenceEvolution.

Definition at line 82 of file MultiProcessSequenceEvolution.h.

Member Data Documentation

◆ nProc_

◆ processColl_

◆ simplex_


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