bpp-phyl3  3.0.0
bpp::SubstitutionProcessCollection Class Reference

Collection of Substitution Process, which owns all the necessary objects: Substitution models, frequencies sets, rate distributions and trees. More...

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

+ Inheritance diagram for bpp::SubstitutionProcessCollection:
+ Collaboration diagram for bpp::SubstitutionProcessCollection:

Public Member Functions

 SubstitutionProcessCollection ()
 Create empty collections. More...
 
 SubstitutionProcessCollection (const SubstitutionProcessCollection &set)
 
SubstitutionProcessCollectionoperator= (const SubstitutionProcessCollection &set)
 
virtual ~SubstitutionProcessCollection ()
 
SubstitutionProcessCollectionclone () const
 
void clear ()
 Resets all the information contained in this object. More...
 
void addParametrizable (std::shared_ptr< Parametrizable > parametrizable, size_t parametrizableIndex, bool withParameters=true)
 Add a new parametrizable to the matching collection with a given number. More...
 
void replaceParametrizable (std::shared_ptr< Parametrizable > parametrizable, size_t parametrizableIndex, bool withParameters=true)
 
void addModel (std::shared_ptr< BranchModelInterface > model, size_t modelIndex)
 specific methods to add specific objects. More...
 
void replaceModel (std::shared_ptr< BranchModelInterface > model, size_t modelIndex)
 
void addFrequencies (std::shared_ptr< FrequencySetInterface > frequencies, size_t frequenciesIndex)
 
void replaceFrequencies (std::shared_ptr< FrequencySetInterface > frequencies, size_t frequenciesIndex)
 
void addDistribution (std::shared_ptr< DiscreteDistributionInterface > distribution, size_t distributionIndex)
 
void addTree (std::shared_ptr< ParametrizablePhyloTree > tree, size_t treeIndex)
 
void replaceTree (std::shared_ptr< ParametrizablePhyloTree > tree, size_t treeIndex)
 
void addScenario (std::shared_ptr< ModelScenario > scen, size_t scenIndex)
 
BranchModelInterfacemodel (size_t modelIndex)
 Get a BranchModel from the collection. More...
 
const BranchModelInterfacemodel (size_t modelIndex) const
 
std::shared_ptr< BranchModelInterfacegetModel (size_t modelIndex)
 
std::shared_ptr< const BranchModelInterfacegetModel (size_t modelIndex) const
 
size_t getModelIndex (std::shared_ptr< BranchModelInterface > model) const
 Return the number of a BranchModel in the collection. More...
 
bool hasModel (std::shared_ptr< BranchModelInterface > model) const
 Return if a BranchModel is in the collection. More...
 
FrequencySetInterfacefrequencySet (size_t frequenciesIndex)
 Get a FrequencySet from the collection. More...
 
const FrequencySetInterfacefrequencySet (size_t frequenciesIndex) const
 
std::shared_ptr< FrequencySetInterfacegetFrequencySet (size_t frequenciesIndex)
 
std::shared_ptr< const FrequencySetInterfacegetFrequencySet (size_t frequenciesIndex) const
 
std::shared_ptr< DiscreteDistributionInterfacegetRateDistribution (size_t distributionIndex)
 Get a DiscreteDistribution from the collection. More...
 
std::shared_ptr< const DiscreteDistributionInterfacegetRateDistribution (size_t distributionIndex) const
 
DiscreteDistributionInterfacerateDistribution (size_t distributionIndex)
 
const DiscreteDistributionInterfacerateDistribution (size_t distributionIndex) const
 
ParametrizablePhyloTreetree (size_t treeIndex)
 Get a tree from the set. More...
 
const ParametrizablePhyloTreetree (size_t treeIndex) const
 
std::shared_ptr< ParametrizablePhyloTreegetTree (size_t treeIndex)
 
std::shared_ptr< const ParametrizablePhyloTreegetTree (size_t treeIndex) const
 
bool hasModelScenario (size_t numPath) const
 checks if the set has a ModelScenario More...
 
std::shared_ptr< const ModelScenariogetModelScenario (size_t numPath) const
 Get a ModelScenario from the set. More...
 
std::shared_ptr< ModelScenariogetModelScenario (size_t numPath)
 
std::vector< size_t > getScenarioNumbers () const
 
std::vector< size_t > getModelNumbers () const
 Get the numbers of the specified objects from the collections. More...
 
std::vector< size_t > getFrequenciesNumbers () const
 
std::vector< size_t > getRateDistributionNumbers () const
 
std::vector< size_t > getTreeNumbers () const
 
std::vector< size_t > getSubstitutionProcessNumbers () const
 
bool hasModelNumber (size_t n) const
 
bool hasFrequenciesNumber (size_t n) const
 
bool hasDistributionNumber (size_t n) const
 
bool hasTreeNumber (size_t n) const
 
bool hasSubstitutionProcessNumber (size_t n) const
 
void addSubstitutionProcess (size_t nProc, std::map< size_t, std::vector< unsigned int >> mModBr, size_t nTree, size_t nRate, size_t nFreq)
 
void addSubstitutionProcess (size_t nProc, std::map< size_t, std::vector< unsigned int >> mModBr, size_t nTree, size_t nRate)
 
void addOnePerBranchSubstitutionProcess (size_t nProc, size_t nMod, size_t nTree, size_t nRate, size_t nFreq, const std::vector< std::string > &sharedParameterNames)
 
void addOnePerBranchSubstitutionProcess (size_t nProc, size_t nMod, size_t nTree, size_t nRate, const std::vector< std::string > &sharedParameterNames)
 
size_t getNumberOfSubstitutionProcess () const
 Methods to retrieve Substitution Process. More...
 
SubstitutionProcessCollectionMembersubstitutionProcess (size_t i)
 
const SubstitutionProcessCollectionMembersubstitutionProcess (size_t i) const
 
std::shared_ptr< SubstitutionProcessCollectionMembergetSubstitutionProcess (size_t i)
 
std::shared_ptr< const SubstitutionProcessCollectionMembergetSubstitutionProcess (size_t i) const
 
ParameterList getBranchLengthParameters (bool independent) const
 Methods to retrieve parameters. More...
 
ParameterList getBranchLengthParameters (size_t nTree, bool independent) const
 
ParameterList getSubstitutionProcessParameters (size_t nProc, bool independent) const
 Get the parameters associated to substitution process(es). More...
 
ParameterList getSubstitutionProcessParameters () const
 
ParameterList getSubstitutionModelParameters (size_t nMod, bool independent) const
 Get the parameters associated to substitution model(s). More...
 
ParameterList getSubstitutionModelParameters (bool independent) const
 
ParameterList getNonDerivableParameters () const
 Get the Non-derivable parameters. More...
 
ParameterList getRateDistributionParameters (size_t nRate, bool independent) const
 Get the parameters associated to the rate distribution(s). More...
 
ParameterList getRateDistributionParameters (bool independent) const
 
ParameterList getRootFrequenciesParameters (size_t nFreq, bool independent) const
 Get the parameters associated to the root frequencies(s). More...
 
ParameterList getRootFrequenciesParameters (bool independent) const
 
bool hasIndependentParameter (const std::string &name) const
 
const ParameterListgetIndependentParameters () const
 
size_t getNumberOfIndependentParameters () const
 
ParameterList getAliasedParameters (const ParameterList &pl) const
 
ParameterList getFromParameters (const ParameterList &pl) const
 
virtual std::vector< std::string > getAlias (const std::string &name) const
 
virtual std::map< std::string, std::string > getAliases () const
 
std::string getFrom (const std::string &name) const
 
bool hasParameter (const std::string &name) const override
 
const ParameterListgetParameters () const override
 
const Parameterparameter (const std::string &name) const override
 
const std::shared_ptr< Parameter > & getParameter (const std::string &name) const
 
double getParameterValue (const std::string &name) const override
 
void setAllParametersValues (const ParameterList &parameters) override
 
void setParameterValue (const std::string &name, double value) override
 
void setParametersValues (const ParameterList &parameters) override
 
bool matchParametersValues (const ParameterList &parameters) override
 
void removeConstraint (const std::string &name) override
 
void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override
 
size_t getNumberOfParameters () const override
 
std::string getNamespace () const override
 
std::string getParameterNameWithoutNamespace (const std::string &name) const override
 
void fireParameterChanged (const ParameterList &parameters)
 AbstractParameterAliasable functions, redirected towards the process members. More...
 
void setNamespace (const std::string &prefix)
 
void aliasParameters (const std::string &p1, const std::string &p2)
 
void unaliasParameters (const std::string &p1, const std::string &p2)
 
void aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose)
 

Protected Member Functions

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
 
ParameterListgetParameters_ () override
 

Private Attributes

ParametrizableCollection< BranchModelInterfacemodelColl_
 
std::map< size_t, std::vector< size_t > > mModelToSubPro_
 
ParametrizableCollection< FrequencySetInterfacefreqColl_
 
std::map< size_t, std::vector< size_t > > mFreqToSubPro_
 
ParametrizableCollection< DiscreteDistributionInterfacedistColl_
 
std::map< size_t, std::vector< size_t > > mVConstDist_
 
std::map< size_t, std::vector< size_t > > mDistToSubPro_
 
ParametrizableCollection< ParametrizablePhyloTreetreeColl_
 
std::map< size_t, std::vector< size_t > > mTreeToSubPro_
 
std::map< size_t, std::shared_ptr< ModelScenario > > mModelScenario_
 
std::map< size_t, std::shared_ptr< SubstitutionProcessCollectionMember > > mSubProcess_
 
ParameterList independentParameters_
 
std::map< std::string, std::shared_ptr< AliasParameterListener > > aliasListenersRegister_
 
ParameterList parameters_
 
std::string prefix_
 

Detailed Description

Collection of Substitution Process, which owns all the necessary objects: Substitution models, frequencies sets, rate distributions and trees.

This class contains a set of substitution models sets, linking models, rates and trees.

This object has the same parameters names as the owned objects. The updating of the parameters is done through the ParametrizableCollection objects.

This class also deals with the parameters associated to the models, distribution, frequencies.

It will deal with the parameters associated to the trees when they are parametrized.

Definition at line 47 of file SubstitutionProcessCollection.h.

Constructor & Destructor Documentation

◆ SubstitutionProcessCollection() [1/2]

bpp::SubstitutionProcessCollection::SubstitutionProcessCollection ( )
inline

Create empty collections.

Definition at line 119 of file SubstitutionProcessCollection.h.

Referenced by clone().

◆ SubstitutionProcessCollection() [2/2]

SubstitutionProcessCollection::SubstitutionProcessCollection ( const SubstitutionProcessCollection set)

◆ ~SubstitutionProcessCollection()

virtual bpp::SubstitutionProcessCollection::~SubstitutionProcessCollection ( )
inlinevirtual

Definition at line 138 of file SubstitutionProcessCollection.h.

References clear().

Member Function Documentation

◆ addDistribution()

void bpp::SubstitutionProcessCollection::addDistribution ( std::shared_ptr< DiscreteDistributionInterface distribution,
size_t  distributionIndex 
)
inline

◆ addFrequencies()

void bpp::SubstitutionProcessCollection::addFrequencies ( std::shared_ptr< FrequencySetInterface frequencies,
size_t  frequenciesIndex 
)
inline

Definition at line 191 of file SubstitutionProcessCollection.h.

References addParametrizable().

◆ addModel()

void bpp::SubstitutionProcessCollection::addModel ( std::shared_ptr< BranchModelInterface model,
size_t  modelIndex 
)
inline

specific methods to add specific objects.

? operator[] ?

Definition at line 181 of file SubstitutionProcessCollection.h.

References addParametrizable(), and model().

Referenced by addOnePerBranchSubstitutionProcess().

◆ addOnePerBranchSubstitutionProcess() [1/2]

◆ addOnePerBranchSubstitutionProcess() [2/2]

void SubstitutionProcessCollection::addOnePerBranchSubstitutionProcess ( size_t  nProc,
size_t  nMod,
size_t  nTree,
size_t  nRate,
size_t  nFreq,
const std::vector< std::string > &  sharedParameterNames 
)

◆ addParametrizable()

void SubstitutionProcessCollection::addParametrizable ( std::shared_ptr< Parametrizable parametrizable,
size_t  parametrizableIndex,
bool  withParameters = true 
)

Add a new parametrizable to the matching collection with a given number.

Exceptions
Exceptionif the number is already used. See replace function instead.
Parameters
parametrizableA shared pointer toward a parametrizable, that will added to the collection.
parametrizableIndexThe number of the parametrizable in the Collection. Must be >= 1.
withParametersboolean if the parameters of the object should be added (default: true)

Definition at line 75 of file SubstitutionProcessCollection.cpp.

References bpp::AbstractParameterAliasable::addParameters_(), distColl_, freqColl_, modelColl_, and treeColl_.

Referenced by addDistribution(), addFrequencies(), addModel(), addTree(), replaceFrequencies(), and replaceParametrizable().

◆ addScenario()

void bpp::SubstitutionProcessCollection::addScenario ( std::shared_ptr< ModelScenario scen,
size_t  scenIndex 
)
inline

Definition at line 220 of file SubstitutionProcessCollection.h.

References mModelScenario_.

◆ addSubstitutionProcess() [1/2]

void SubstitutionProcessCollection::addSubstitutionProcess ( size_t  nProc,
std::map< size_t, std::vector< unsigned int >>  mModBr,
size_t  nTree,
size_t  nRate 
)

◆ addSubstitutionProcess() [2/2]

void SubstitutionProcessCollection::addSubstitutionProcess ( size_t  nProc,
std::map< size_t, std::vector< unsigned int >>  mModBr,
size_t  nTree,
size_t  nRate,
size_t  nFreq 
)

◆ addTree()

void bpp::SubstitutionProcessCollection::addTree ( std::shared_ptr< ParametrizablePhyloTree tree,
size_t  treeIndex 
)
inline

Definition at line 210 of file SubstitutionProcessCollection.h.

References addParametrizable(), and tree().

◆ aliasParameters() [1/2]

void SubstitutionProcessCollection::aliasParameters ( const std::string &  p1,
const std::string &  p2 
)
virtual

◆ aliasParameters() [2/2]

void SubstitutionProcessCollection::aliasParameters ( std::map< std::string, std::string > &  unparsedParams,
bool  verbose 
)
virtual

◆ clear()

void SubstitutionProcessCollection::clear ( )

◆ clone()

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

◆ fireParameterChanged()

void SubstitutionProcessCollection::fireParameterChanged ( const ParameterList parameters)
virtual

AbstractParameterAliasable functions, redirected towards the process members.

To be called when a parameter has changed. This will call fireParameterChanged on the collections and the process members.

Parameters
parametersThe modified parameters.

Reimplemented from bpp::AbstractParameterAliasable.

Definition at line 181 of file SubstitutionProcessCollection.cpp.

References bpp::ParameterList::addParameter(), bpp::ParameterList::addParameters(), distColl_, freqColl_, bpp::AbstractParameterAliasable::getAliasedParameters(), getRateDistribution(), mDistToSubPro_, modelColl_, mSubProcess_, mTreeToSubPro_, mVConstDist_, bpp::TextTools::toString(), and treeColl_.

◆ frequencySet() [1/2]

FrequencySetInterface& bpp::SubstitutionProcessCollection::frequencySet ( size_t  frequenciesIndex)
inline

Get a FrequencySet from the collection.

Parameters
frequenciesIndexThe index of the frequencies set in the collection.
Returns
the got FrequencySet*.

Definition at line 281 of file SubstitutionProcessCollection.h.

References freqColl_.

◆ frequencySet() [2/2]

const FrequencySetInterface& bpp::SubstitutionProcessCollection::frequencySet ( size_t  frequenciesIndex) const
inline

Definition at line 286 of file SubstitutionProcessCollection.h.

References freqColl_.

◆ getBranchLengthParameters() [1/2]

ParameterList bpp::SubstitutionProcessCollection::getBranchLengthParameters ( bool  independent) const
inline

◆ getBranchLengthParameters() [2/2]

ParameterList bpp::SubstitutionProcessCollection::getBranchLengthParameters ( size_t  nTree,
bool  independent 
) const
inline

◆ getFrequenciesNumbers()

std::vector<size_t> bpp::SubstitutionProcessCollection::getFrequenciesNumbers ( ) const
inline

◆ getFrequencySet() [1/2]

std::shared_ptr<FrequencySetInterface> bpp::SubstitutionProcessCollection::getFrequencySet ( size_t  frequenciesIndex)
inline

◆ getFrequencySet() [2/2]

std::shared_ptr<const FrequencySetInterface> bpp::SubstitutionProcessCollection::getFrequencySet ( size_t  frequenciesIndex) const
inline

Definition at line 296 of file SubstitutionProcessCollection.h.

References freqColl_.

◆ getModel() [1/2]

std::shared_ptr<BranchModelInterface> bpp::SubstitutionProcessCollection::getModel ( size_t  modelIndex)
inline

◆ getModel() [2/2]

std::shared_ptr<const BranchModelInterface> bpp::SubstitutionProcessCollection::getModel ( size_t  modelIndex) const
inline

Definition at line 246 of file SubstitutionProcessCollection.h.

References modelColl_.

◆ getModelIndex()

size_t bpp::SubstitutionProcessCollection::getModelIndex ( std::shared_ptr< BranchModelInterface model) const
inline

Return the number of a BranchModel in the collection.

Parameters
modelThe model looked for in the collection.
Returns
the number of the model or 0 if no matching object

Definition at line 257 of file SubstitutionProcessCollection.h.

References model(), and modelColl_.

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

◆ getModelNumbers()

std::vector<size_t> bpp::SubstitutionProcessCollection::getModelNumbers ( ) const
inline

Get the numbers of the specified objects from the collections.

Definition at line 402 of file SubstitutionProcessCollection.h.

References modelColl_.

Referenced by addOnePerBranchSubstitutionProcess(), and bpp::PhylogeneticsApplicationTools::printParameters().

◆ getModelScenario() [1/2]

std::shared_ptr<ModelScenario> bpp::SubstitutionProcessCollection::getModelScenario ( size_t  numPath)
inline

Definition at line 377 of file SubstitutionProcessCollection.h.

References hasModelScenario(), and mModelScenario_.

◆ getModelScenario() [2/2]

std::shared_ptr<const ModelScenario> bpp::SubstitutionProcessCollection::getModelScenario ( size_t  numPath) const
inline

Get a ModelScenario from the set.

Parameters
numPathThe number of the model path in the set.
Returns
the matching ModelScenario.

Definition at line 369 of file SubstitutionProcessCollection.h.

References hasModelScenario(), and mModelScenario_.

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

◆ getNonDerivableParameters()

◆ getNumberOfSubstitutionProcess()

size_t bpp::SubstitutionProcessCollection::getNumberOfSubstitutionProcess ( ) const
inline

Methods to retrieve Substitution Process.

Definition at line 553 of file SubstitutionProcessCollection.h.

References mSubProcess_.

◆ getRateDistribution() [1/2]

std::shared_ptr<DiscreteDistributionInterface> bpp::SubstitutionProcessCollection::getRateDistribution ( size_t  distributionIndex)
inline

Get a DiscreteDistribution from the collection.

Parameters
distributionIndexThe index of the distribution in the collection.
Returns
a pointer towards a DiscreteDistribution.

Definition at line 307 of file SubstitutionProcessCollection.h.

References distColl_.

Referenced by fireParameterChanged(), and bpp::PhylogeneticsApplicationTools::printParameters().

◆ getRateDistribution() [2/2]

std::shared_ptr<const DiscreteDistributionInterface> bpp::SubstitutionProcessCollection::getRateDistribution ( size_t  distributionIndex) const
inline

Definition at line 312 of file SubstitutionProcessCollection.h.

References distColl_.

◆ getRateDistributionNumbers()

std::vector<size_t> bpp::SubstitutionProcessCollection::getRateDistributionNumbers ( ) const
inline

◆ getRateDistributionParameters() [1/2]

ParameterList bpp::SubstitutionProcessCollection::getRateDistributionParameters ( bool  independent) const
inline

◆ getRateDistributionParameters() [2/2]

ParameterList bpp::SubstitutionProcessCollection::getRateDistributionParameters ( size_t  nRate,
bool  independent 
) const
inline

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

Returns
A ParameterList.

Definition at line 669 of file SubstitutionProcessCollection.h.

References distColl_, bpp::ParameterList::getCommonParametersWith(), and bpp::AbstractParameterAliasable::getIndependentParameters().

◆ getRootFrequenciesParameters() [1/2]

ParameterList bpp::SubstitutionProcessCollection::getRootFrequenciesParameters ( bool  independent) const
inline

◆ getRootFrequenciesParameters() [2/2]

ParameterList bpp::SubstitutionProcessCollection::getRootFrequenciesParameters ( size_t  nFreq,
bool  independent 
) const
inline

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

Returns
A ParameterList.

Definition at line 694 of file SubstitutionProcessCollection.h.

References freqColl_, bpp::ParameterList::getCommonParametersWith(), and bpp::AbstractParameterAliasable::getIndependentParameters().

◆ getScenarioNumbers()

std::vector<size_t> bpp::SubstitutionProcessCollection::getScenarioNumbers ( ) const
inline

◆ getSubstitutionModelParameters() [1/2]

ParameterList bpp::SubstitutionProcessCollection::getSubstitutionModelParameters ( bool  independent) const
inline

◆ getSubstitutionModelParameters() [2/2]

ParameterList bpp::SubstitutionProcessCollection::getSubstitutionModelParameters ( size_t  nMod,
bool  independent 
) const
inline

Get the parameters associated to substitution model(s).

Returns
A ParameterList.

Definition at line 635 of file SubstitutionProcessCollection.h.

References bpp::ParameterList::getCommonParametersWith(), bpp::AbstractParameterAliasable::getIndependentParameters(), and modelColl_.

◆ getSubstitutionProcess() [1/2]

std::shared_ptr<SubstitutionProcessCollectionMember> bpp::SubstitutionProcessCollection::getSubstitutionProcess ( size_t  i)
inline

Definition at line 567 of file SubstitutionProcessCollection.h.

References mSubProcess_.

Referenced by bpp::ProcessTree::makeProcessTree().

◆ getSubstitutionProcess() [2/2]

std::shared_ptr<const SubstitutionProcessCollectionMember> bpp::SubstitutionProcessCollection::getSubstitutionProcess ( size_t  i) const
inline

Definition at line 572 of file SubstitutionProcessCollection.h.

References mSubProcess_.

◆ getSubstitutionProcessNumbers()

std::vector<size_t> bpp::SubstitutionProcessCollection::getSubstitutionProcessNumbers ( ) const
inline

◆ getSubstitutionProcessParameters() [1/2]

ParameterList SubstitutionProcessCollection::getSubstitutionProcessParameters ( ) const

◆ getSubstitutionProcessParameters() [2/2]

ParameterList bpp::SubstitutionProcessCollection::getSubstitutionProcessParameters ( size_t  nProc,
bool  independent 
) const
inline

Get the parameters associated to substitution process(es).

Returns
A ParameterList.

Definition at line 613 of file SubstitutionProcessCollection.h.

References bpp::ParameterList::getCommonParametersWith(), bpp::AbstractParameterAliasable::getIndependentParameters(), and mSubProcess_.

◆ getTree() [1/2]

std::shared_ptr<ParametrizablePhyloTree> bpp::SubstitutionProcessCollection::getTree ( size_t  treeIndex)
inline

◆ getTree() [2/2]

std::shared_ptr<const ParametrizablePhyloTree> bpp::SubstitutionProcessCollection::getTree ( size_t  treeIndex) const
inline

Definition at line 348 of file SubstitutionProcessCollection.h.

References treeColl_.

◆ getTreeNumbers()

std::vector<size_t> bpp::SubstitutionProcessCollection::getTreeNumbers ( ) const
inline

◆ hasDistributionNumber()

bool bpp::SubstitutionProcessCollection::hasDistributionNumber ( size_t  n) const
inline

◆ hasFrequenciesNumber()

bool bpp::SubstitutionProcessCollection::hasFrequenciesNumber ( size_t  n) const
inline

◆ hasModel()

bool bpp::SubstitutionProcessCollection::hasModel ( std::shared_ptr< BranchModelInterface model) const
inline

Return if a BranchModel is in the collection.

Parameters
modelThe model looked for in the collection.

Definition at line 270 of file SubstitutionProcessCollection.h.

References model(), and modelColl_.

◆ hasModelNumber()

bool bpp::SubstitutionProcessCollection::hasModelNumber ( size_t  n) const
inline

◆ hasModelScenario()

bool bpp::SubstitutionProcessCollection::hasModelScenario ( size_t  numPath) const
inline

checks if the set has a ModelScenario

Parameters
numPathThe number of the model path in the set.

Definition at line 358 of file SubstitutionProcessCollection.h.

References mModelScenario_.

Referenced by bpp::PhylogeneticsApplicationTools::addSubstitutionProcessCollectionMember(), and getModelScenario().

◆ hasSubstitutionProcessNumber()

bool bpp::SubstitutionProcessCollection::hasSubstitutionProcessNumber ( size_t  n) const
inline

Definition at line 454 of file SubstitutionProcessCollection.h.

References mSubProcess_.

◆ hasTreeNumber()

bool bpp::SubstitutionProcessCollection::hasTreeNumber ( size_t  n) const
inline

◆ model() [1/2]

BranchModelInterface& bpp::SubstitutionProcessCollection::model ( size_t  modelIndex)
inline

Get a BranchModel from the collection.

Parameters
modelIndexThe index of the model in the collection.
Returns
the got shared-ptr to BranchModel.

Definition at line 231 of file SubstitutionProcessCollection.h.

References modelColl_.

Referenced by addModel(), addOnePerBranchSubstitutionProcess(), getModelIndex(), hasModel(), and replaceModel().

◆ model() [2/2]

const BranchModelInterface& bpp::SubstitutionProcessCollection::model ( size_t  modelIndex) const
inline

Definition at line 236 of file SubstitutionProcessCollection.h.

References modelColl_.

◆ operator=()

◆ rateDistribution() [1/2]

DiscreteDistributionInterface& bpp::SubstitutionProcessCollection::rateDistribution ( size_t  distributionIndex)
inline

◆ rateDistribution() [2/2]

const DiscreteDistributionInterface& bpp::SubstitutionProcessCollection::rateDistribution ( size_t  distributionIndex) const
inline

Definition at line 322 of file SubstitutionProcessCollection.h.

References distColl_.

◆ replaceFrequencies()

void bpp::SubstitutionProcessCollection::replaceFrequencies ( std::shared_ptr< FrequencySetInterface frequencies,
size_t  frequenciesIndex 
)
inline

Definition at line 196 of file SubstitutionProcessCollection.h.

References addParametrizable().

◆ replaceModel()

void bpp::SubstitutionProcessCollection::replaceModel ( std::shared_ptr< BranchModelInterface model,
size_t  modelIndex 
)
inline

Definition at line 186 of file SubstitutionProcessCollection.h.

References model(), and replaceParametrizable().

◆ replaceParametrizable()

void SubstitutionProcessCollection::replaceParametrizable ( std::shared_ptr< Parametrizable parametrizable,
size_t  parametrizableIndex,
bool  withParameters = true 
)

◆ replaceTree()

void bpp::SubstitutionProcessCollection::replaceTree ( std::shared_ptr< ParametrizablePhyloTree tree,
size_t  treeIndex 
)
inline

Definition at line 215 of file SubstitutionProcessCollection.h.

References replaceParametrizable(), and tree().

◆ setNamespace()

void SubstitutionProcessCollection::setNamespace ( const std::string &  prefix)
virtual

◆ substitutionProcess() [1/2]

◆ substitutionProcess() [2/2]

const SubstitutionProcessCollectionMember& bpp::SubstitutionProcessCollection::substitutionProcess ( size_t  i) const
inline

Definition at line 560 of file SubstitutionProcessCollection.h.

References mSubProcess_.

◆ tree() [1/2]

ParametrizablePhyloTree& bpp::SubstitutionProcessCollection::tree ( size_t  treeIndex)
inline

Get a tree from the set.

Parameters
treeIndexThe index of the model in the set.
Returns
the ParametrizablePhyloTree.

Definition at line 333 of file SubstitutionProcessCollection.h.

References treeColl_.

Referenced by addOnePerBranchSubstitutionProcess(), bpp::PhylogeneticsApplicationTools::addSubstitutionProcessCollectionMember(), addTree(), and replaceTree().

◆ tree() [2/2]

const ParametrizablePhyloTree& bpp::SubstitutionProcessCollection::tree ( size_t  treeIndex) const
inline

Definition at line 338 of file SubstitutionProcessCollection.h.

References treeColl_.

◆ unaliasParameters()

void SubstitutionProcessCollection::unaliasParameters ( const std::string &  p1,
const std::string &  p2 
)
virtual

Member Data Documentation

◆ distColl_

◆ freqColl_

◆ mDistToSubPro_

std::map<size_t, std::vector<size_t> > bpp::SubstitutionProcessCollection::mDistToSubPro_
private

A map from each DiscreteDistribution number to the SubProcess members that are linked to it.

Definition at line 92 of file SubstitutionProcessCollection.h.

Referenced by addSubstitutionProcess(), clear(), fireParameterChanged(), and operator=().

◆ mFreqToSubPro_

std::map<size_t, std::vector<size_t> > bpp::SubstitutionProcessCollection::mFreqToSubPro_
private

A map from each FrequencySet number to the SubProcess members that are linked to it.

Definition at line 72 of file SubstitutionProcessCollection.h.

Referenced by addOnePerBranchSubstitutionProcess(), addSubstitutionProcess(), clear(), and operator=().

◆ mModelScenario_

std::map<size_t, std::shared_ptr<ModelScenario> > bpp::SubstitutionProcessCollection::mModelScenario_
private

◆ mModelToSubPro_

std::map<size_t, std::vector<size_t> > bpp::SubstitutionProcessCollection::mModelToSubPro_
private

A map from each BranchModel number to the SubProcess members that are linked to it.

Definition at line 61 of file SubstitutionProcessCollection.h.

Referenced by addSubstitutionProcess(), clear(), and operator=().

◆ modelColl_

◆ mSubProcess_

◆ mTreeToSubPro_

std::map<size_t, std::vector<size_t> > bpp::SubstitutionProcessCollection::mTreeToSubPro_
private

A map from each Tree number to the SubProcess members that are linked to it.

Definition at line 103 of file SubstitutionProcessCollection.h.

Referenced by addSubstitutionProcess(), clear(), fireParameterChanged(), and operator=().

◆ mVConstDist_

std::map<size_t, std::vector<size_t> > bpp::SubstitutionProcessCollection::mVConstDist_
private

A map from the DiscreteDistribution numbers to the numbers of categories that are used independently as ConstantDistributions.

These ConstantDistributions are stored in distColl_ with numbers 10000*(numberOfDiscreteDistribution+1) + numberOfTheCategory.

Definition at line 86 of file SubstitutionProcessCollection.h.

Referenced by addDistribution(), clear(), fireParameterChanged(), and operator=().

◆ treeColl_


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