bpp-phyl3  3.0.0
bpp::PartitionSequenceEvolution Class Referenceabstract

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

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

+ Inheritance diagram for bpp::PartitionSequenceEvolution:
+ Collaboration diagram for bpp::PartitionSequenceEvolution:

Public Member Functions

 PartitionSequenceEvolution (std::shared_ptr< SubstitutionProcessCollection > processColl, std::vector< size_t > &posProc)
 
 PartitionSequenceEvolution (const PartitionSequenceEvolution &mlc)
 
PartitionSequenceEvolutionoperator= (const PartitionSequenceEvolution &mlc)
 
virtual ~PartitionSequenceEvolution ()
 
PartitionSequenceEvolutionclone () const
 
size_t getNumberOfSites () const
 
const std::vector< size_t > & getProcessNumbersPerSite () const
 
size_t getSubstitutionProcessNumber (size_t i) const
 
std::map< size_t, std::vector< size_t > > & mapOfProcessSites ()
 
const std::map< size_t, std::vector< size_t > > & mapOfProcessSites () const
 
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...
 
virtual ParameterList getNonDerivableParameters () const
 All non derivable parameters. More...
 
virtual void fireParameterChanged (const ParameterList &parameters)
 
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 void setNamespace (const std::string &prefix)=0
 
void setNamespace (const std::string &prefix)
 
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

std::vector< size_t > vProc_
 vector of the substitution process numbers along the sequence. More...
 
size_t vSize_
 
std::map< size_t, std::vector< size_t > > mProcPos_
 On the reverse, for each process number, the vector of the sites where it is used. More...
 
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
MultiProcessSequenceEvolution

Definition at line 20 of file PartitionSequenceEvolution.h.

Constructor & Destructor Documentation

◆ PartitionSequenceEvolution() [1/2]

PartitionSequenceEvolution::PartitionSequenceEvolution ( std::shared_ptr< SubstitutionProcessCollection processColl,
std::vector< size_t > &  posProc 
)

◆ PartitionSequenceEvolution() [2/2]

bpp::PartitionSequenceEvolution::PartitionSequenceEvolution ( const PartitionSequenceEvolution mlc)
inline

Definition at line 51 of file PartitionSequenceEvolution.h.

◆ ~PartitionSequenceEvolution()

virtual bpp::PartitionSequenceEvolution::~PartitionSequenceEvolution ( )
inlinevirtual

Definition at line 68 of file PartitionSequenceEvolution.h.

Member Function Documentation

◆ clone()

PartitionSequenceEvolution* bpp::PartitionSequenceEvolution::clone ( ) const
inlinevirtual

◆ 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()

◆ 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 MultiProcessSequenceEvolution::getNonDerivableParameters ( ) const
virtualinherited

◆ getNumberOfSites()

size_t bpp::PartitionSequenceEvolution::getNumberOfSites ( ) const
inline

Definition at line 73 of file PartitionSequenceEvolution.h.

References vSize_.

Referenced by bpp::EvolutionSequenceSimulator::resetSiteSimulators().

◆ 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().

◆ getProcessNumbersPerSite()

const std::vector<size_t>& bpp::PartitionSequenceEvolution::getProcessNumbersPerSite ( ) const
inline

Definition at line 78 of file PartitionSequenceEvolution.h.

References vProc_.

◆ 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

◆ 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.

◆ getSubstitutionProcessNumber()

size_t bpp::PartitionSequenceEvolution::getSubstitutionProcessNumber ( size_t  i) const
inline

Definition at line 88 of file PartitionSequenceEvolution.h.

References vProc_, and vSize_.

Referenced by bpp::EvolutionSequenceSimulator::resetSiteSimulators().

◆ 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

◆ mapOfProcessSites() [1/2]

std::map<size_t, std::vector<size_t> >& bpp::PartitionSequenceEvolution::mapOfProcessSites ( )
inline

◆ mapOfProcessSites() [2/2]

const std::map<size_t, std::vector<size_t> >& bpp::PartitionSequenceEvolution::mapOfProcessSites ( ) const
inline

Definition at line 100 of file PartitionSequenceEvolution.h.

References mProcPos_.

◆ operator=()

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

◆ setParameters()

void MultiProcessSequenceEvolution::setParameters ( const ParameterList parameters)
inherited

◆ 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

◆ mProcPos_

std::map<size_t, std::vector<size_t> > bpp::PartitionSequenceEvolution::mProcPos_
private

On the reverse, for each process number, the vector of the sites where it is used.

Convenient for process specific site patterns.

Definition at line 38 of file PartitionSequenceEvolution.h.

Referenced by mapOfProcessSites(), operator=(), and PartitionSequenceEvolution().

◆ nProc_

◆ processColl_

◆ vProc_

std::vector<size_t> bpp::PartitionSequenceEvolution::vProc_
private

vector of the substitution process numbers along the sequence.

Definition at line 27 of file PartitionSequenceEvolution.h.

Referenced by getProcessNumbersPerSite(), getSubstitutionProcessNumber(), operator=(), and PartitionSequenceEvolution().

◆ vSize_

size_t bpp::PartitionSequenceEvolution::vSize_
private

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