bpp-phyl3  3.0.0
bpp::SubstitutionModelSetTools Class Reference

Tools for automatically creating SubstitutionModelSet objects. More...

#include <Bpp/Phyl/Legacy/Model/SubstitutionModelSetTools.h>

Static Public Member Functions

static std::unique_ptr< SubstitutionModelSetcreateHomogeneousModelSet (std::shared_ptr< TransitionModelInterface > model, std::shared_ptr< FrequencySetInterface > rootFreqs, const Tree &tree)
 Create a SubstitutionModelSet object, corresponding to the homogeneous case. More...
 
static std::unique_ptr< SubstitutionModelSetcreateNonHomogeneousModelSet (std::shared_ptr< TransitionModelInterface > model, std::shared_ptr< FrequencySetInterface > rootFreqs, const Tree &tree, const std::map< std::string, std::string > &aliasFreqNames, const std::map< std::string, std::vector< Vint >> &globalParameterNames)
 Create a SubstitutionModelSet object, with one model per branch. More...
 

Detailed Description

Tools for automatically creating SubstitutionModelSet objects.

Definition at line 21 of file SubstitutionModelSetTools.h.

Member Function Documentation

◆ createHomogeneousModelSet()

unique_ptr< SubstitutionModelSet > SubstitutionModelSetTools::createHomogeneousModelSet ( std::shared_ptr< TransitionModelInterface model,
std::shared_ptr< FrequencySetInterface rootFreqs,
const Tree tree 
)
static

Create a SubstitutionModelSet object, corresponding to the homogeneous case.

This class is mainly for testing purpose.

Parameters
modelThe model to use.
rootFreqsA FrequencySet object to parametrize root frequencies.
treeThe tree to use for the construction of the set.

Definition at line 13 of file SubstitutionModelSetTools.cpp.

References bpp::Tree::getNodesId(), and bpp::Tree::getRootId().

Referenced by bpp::NonHomogeneousSequenceSimulator::NonHomogeneousSequenceSimulator().

◆ createNonHomogeneousModelSet()

unique_ptr< SubstitutionModelSet > SubstitutionModelSetTools::createNonHomogeneousModelSet ( std::shared_ptr< TransitionModelInterface model,
std::shared_ptr< FrequencySetInterface rootFreqs,
const Tree tree,
const std::map< std::string, std::string > &  aliasFreqNames,
const std::map< std::string, std::vector< Vint >> &  globalParameterNames 
)
static

Create a SubstitutionModelSet object, with one model per branch.

All branches share the same type of model, but allow one set of parameters per branch. This is also possible to specify some parameters to be common to all branches.

Parameters
modelThe model to use.
rootFreqsA FrequencySet object to parametrize root frequencies.
treeThe tree to use for the construction of the set.
aliasFreqNamesAliases for the frequencies names
globalParameterNamesmap for shared parameters. Associated value is a vector of vectors of branch ids that share the parameter. If the vector is empty, the parameter is shared among all branches.

All other parameters will be considered distinct for all branches.

Definition at line 46 of file SubstitutionModelSetTools.cpp.

References bpp::Parameter::getName(), bpp::Tree::getNodesId(), bpp::ParameterList::getParameterNames(), bpp::Tree::getRootId(), bpp::ApplicationTools::matchingParameters(), bpp::ParameterList::size(), and bpp::TextTools::toString().


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