bpp-phyl  2.2.0
bpp::SubstitutionModelSetTools Class Reference

Tools for automatically creating SubstitutionModelSet objects. More...

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

Static Public Member Functions

static SubstitutionModelSetcreateHomogeneousModelSet (SubstitutionModel *model, FrequenciesSet *rootFreqs, const Tree *tree) throw (AlphabetException, Exception)
 Create a SubstitutionModelSet object, corresponding to the homogeneous case. More...
 
static SubstitutionModelSetcreateNonHomogeneousModelSet (SubstitutionModel *model, FrequenciesSet *rootFreqs, const Tree *tree, const std::vector< std::string > &globalParameterNames) throw (AlphabetException, Exception)
 Create a SubstitutionModelSet object, with one model per branch. More...
 

Detailed Description

Tools for automatically creating SubstitutionModelSet objects.

Definition at line 56 of file SubstitutionModelSetTools.h.

Member Function Documentation

◆ createHomogeneousModelSet()

SubstitutionModelSet * SubstitutionModelSetTools::createHomogeneousModelSet ( SubstitutionModel model,
FrequenciesSet rootFreqs,
const Tree tree 
)
throw (AlphabetException,
Exception
)
static

Create a SubstitutionModelSet object, corresponding to the homogeneous case.

This class is mainly for testing purpose.

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

Definition at line 48 of file SubstitutionModelSetTools.cpp.

References bpp::SubstitutionModelSet::addModel(), and bpp::SubstitutionModelSet::setRootFrequencies().

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

◆ createNonHomogeneousModelSet()

SubstitutionModelSet * SubstitutionModelSetTools::createNonHomogeneousModelSet ( SubstitutionModel model,
FrequenciesSet rootFreqs,
const Tree tree,
const std::vector< std::string > &  globalParameterNames 
)
throw (AlphabetException,
Exception
)
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 FrequenciesSet object to parametrize root frequencies.
treeThe tree to use for the construction of the set.
globalParameterNamesCommon parameters for all branches. All other parameters will be considered distinct for all branches.

Definition at line 81 of file SubstitutionModelSetTools.cpp.

References bpp::MixedSubstitutionModelSet::addEmptyHyperNode(), bpp::SubstitutionModelSet::addModel(), bpp::MixedSubstitutionModelSet::addToHyperNode(), bpp::MixedSubstitutionModelSet::computeHyperNodesProbabilities(), bpp::MixedSubstitutionModel::getNumberOfModels(), and bpp::SubstitutionModelSet::setRootFrequencies().


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