bpp-phyl3  3.0.0
bpp::SubstitutionProcessCollectionMember Class Referenceabstract

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

+ Inheritance diagram for bpp::SubstitutionProcessCollectionMember:
+ Collaboration diagram for bpp::SubstitutionProcessCollectionMember:

Classes

struct  Deleter
 

Public Member Functions

const SubstitutionProcessCollectioncollection () const
 
SubstitutionProcessCollectioncollection ()
 
void clear ()
 
const SubstitutionProcessCollectiongetCollection () const
 
SubstitutionProcessCollectiongetCollection ()
 
const StateMapInterfacestateMap () const override
 
std::shared_ptr< const StateMapInterfacegetStateMap () const override
 
size_t getNumberOfProcesses () const
 
size_t getNumberOfModels () const override
 
bool hasMixedTransitionModel () const
 
bool isStationary () const
 
const BranchModelInterfacemodel (size_t n) const override
 
std::shared_ptr< const BranchModelInterfacegetModel (size_t n) const override
 
std::shared_ptr< BranchModelInterfacegetModel (size_t n)
 
std::vector< size_t > getModelNumbers () const override
 
size_t getModelNumberForNode (unsigned int nodeId) const override
 Get the number of the model associated to a particular node id. More...
 
std::shared_ptr< const BranchModelInterfacegetModelForNode (unsigned int nodeId) const override
 Get the model associated to a particular node id. More...
 
const std::vector< unsigned int > getNodesWithModel (size_t i) const override
 Get a list of nodes id for which the given model is associated. More...
 
void addModel (size_t numModel, const std::vector< unsigned int > &nodesId)
 Add a new model to the set, and set relationships with nodes. More...
 
const DiscreteDistributionInterfacerateDistribution () const override
 Get the rate distribution. More...
 
DiscreteDistributionInterfacerateDistribution () override
 Get the rate distribution. More...
 
std::shared_ptr< const DiscreteDistributionInterfacegetRateDistribution () const override
 Get a pointer to the rate distribution (or null if there is no rate distribution). More...
 
std::shared_ptr< DiscreteDistributionInterfacegetRateDistribution () override
 Get a pointer to the rate distribution (or null if there is no rate distribution). More...
 
const size_t getRateDistributionNumber () const
 
void setRootFrequencies (size_t numFreq)
 Set the root Frequencies Set. More...
 
const size_t getRootFrequenciesNumber () const
 
bool hasRootFrequencySet () const override
 
const FrequencySetInterfacerootFrequencySet () const override
 
FrequencySetInterfacerootFrequencySet () override
 
std::shared_ptr< const FrequencySetInterfacegetRootFrequencySet () const override
 
std::shared_ptr< FrequencySetInterfacegetRootFrequencySet () override
 
void setModelScenario (size_t numPath)
 
const size_t getModelScenarioNumber () const
 
std::shared_ptr< const ModelScenariogetModelScenario () const override
 Get the Model Scenario associated with this process, in case there are mixture models involved. More...
 
std::shared_ptr< ModelScenariogetModelScenario ()
 
bool matchParametersValues (const ParameterList &parameters) override
 AbsractParametrizable interface. More...
 
bool isFullySetUp (bool throwEx=true) const
 Check if the model set is fully specified for a given tree. More...
 
const std::vector< double > & getRootFrequencies () const override
 
const ParametrizablePhyloTreeparametrizablePhyloTree () const override
 
std::shared_ptr< const ParametrizablePhyloTreegetParametrizablePhyloTree () const override
 
ParametrizablePhyloTreeparametrizablePhyloTree ()
 
std::shared_ptr< ParametrizablePhyloTreegetParametrizablePhyloTree ()
 
void setTreeNumber (size_t nTree, bool check=true)
 
size_t getTreeNumber () const
 
const BranchModelInterfacemodel (unsigned int nodeId, size_t classIndex) const override
 Get the substitution model corresponding to a certain branch, site pattern, and model class. More...
 
std::shared_ptr< const BranchModelInterfacegetModel (unsigned int nodeId, size_t classIndex) const override
 Get the substitution model corresponding to a certain branch, site pattern, and model class. More...
 
ParameterList getSubstitutionModelParameters (bool independent) const override
 Get the parameters of the substitution models. More...
 
ParameterList getRateDistributionParameters (bool independent) const override
 Get the parameters of the rate distribution. More...
 
ParameterList getBranchLengthParameters (bool independent) const override
 Get the parameters of the tree. More...
 
ParameterList getRootFrequenciesParameters (bool independent) const override
 Get the parameters of the root frequencies set. More...
 
ParameterList getNonDerivableParameters () const override
 get all NonDerivable parameters. More...
 
double getProbabilityForModel (size_t classIndex) const override
 
Vdouble getClassProbabilities () const override
 
double getRateForModel (size_t classIndex) const override
 
size_t getNumberOfClasses () const
 
size_t getNumberOfStates () const
 
std::shared_ptr< const AlphabetgetAlphabet () const
 
bool isCompatibleWith (const AlignmentDataInterface &data) 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 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
 
virtual void fireParameterChanged (const ParameterList &parameters)
 

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
 
Check function.
bool checkOrphanNodes (bool throwEx) const
 
bool checkUnknownNodes (bool throwEx) const
 

Private Member Functions

void updateParameters ()
 sets the parameters as the independent parameters on the objects More...
 
 SubstitutionProcessCollectionMember (SubstitutionProcessCollection *pSubProColl, size_t nProc, size_t nTree, size_t nDist)
 Create a model set belonging to the specified SubstitutionProcessCollection. Stationarity is assumed. More...
 
 SubstitutionProcessCollectionMember (const SubstitutionProcessCollectionMember &set)
 Resets all the information contained in this object. More...
 
SubstitutionProcessCollectionMemberoperator= (const SubstitutionProcessCollectionMember &set)
 
virtual ~SubstitutionProcessCollectionMember ()
 
SubstitutionProcessCollectionMemberclone () const override
 

Private Attributes

SubstitutionProcessCollectionpSubProColl_
 A pointer towards the collection the SubstitutionProcessCollectionMember belongs to. More...
 
size_t nProc_
 The number of the process in the collection. More...
 
std::map< unsigned int, size_t > nodeToModel_
 Contains for each node in a tree the index of the corresponding model in modelSet_. More...
 
std::map< size_t, std::vector< unsigned int > > modelToNodes_
 
size_t nTree_
 The number of the tree: 0 means no assigned tree. More...
 
size_t nDist_
 The number of the rate distribution. More...
 
size_t nRoot_
 The number of the root frequencies (0 if the process is stationary). More...
 
size_t nPath_
 the number of the set of model path, if needed. More...
 
ParameterList independentParameters_
 
std::map< std::string, std::shared_ptr< AliasParameterListener > > aliasListenersRegister_
 
ParameterList parameters_
 
std::string prefix_
 

Friends

class SubstitutionProcessCollection
 

Detailed Description

Definition at line 21 of file SubstitutionProcessCollectionMember.h.

Constructor & Destructor Documentation

◆ SubstitutionProcessCollectionMember() [1/2]

bpp::SubstitutionProcessCollectionMember::SubstitutionProcessCollectionMember ( SubstitutionProcessCollection pSubProColl,
size_t  nProc,
size_t  nTree,
size_t  nDist 
)
inlineprivate

Create a model set belonging to the specified SubstitutionProcessCollection. Stationarity is assumed.

Parameters
pSubProCollthe SubstitutionProcessCollection.
nProcNumber of the process in the collection
nTreeNumber of the tree
nDistNumber of the Discrete Distribution

Definition at line 85 of file SubstitutionProcessCollectionMember.h.

References updateParameters().

Referenced by clone().

◆ SubstitutionProcessCollectionMember() [2/2]

bpp::SubstitutionProcessCollectionMember::SubstitutionProcessCollectionMember ( const SubstitutionProcessCollectionMember set)
inlineprivate

Resets all the information contained in this object.

Definition at line 106 of file SubstitutionProcessCollectionMember.h.

◆ ~SubstitutionProcessCollectionMember()

virtual bpp::SubstitutionProcessCollectionMember::~SubstitutionProcessCollectionMember ( )
inlineprivatevirtual

Definition at line 134 of file SubstitutionProcessCollectionMember.h.

Member Function Documentation

◆ addModel()

void SubstitutionProcessCollectionMember::addModel ( size_t  numModel,
const std::vector< unsigned int > &  nodesId 
)

Add a new model to the set, and set relationships with nodes.

Parameters
numModelThe number of a model in the SubstitutionProcessCollection.
nodesIdthe set of nodes in the tree that points toward this model. This will override any previous affectation.

Definition at line 244 of file SubstitutionProcessCollectionMember.cpp.

◆ checkOrphanNodes()

bool SubstitutionProcessCollectionMember::checkOrphanNodes ( bool  throwEx) const
protected

Definition at line 294 of file SubstitutionProcessCollectionMember.cpp.

References bpp::TextTools::toString().

Referenced by isFullySetUp().

◆ checkUnknownNodes()

bool SubstitutionProcessCollectionMember::checkUnknownNodes ( bool  throwEx) const
protected

◆ clear()

void bpp::SubstitutionProcessCollectionMember::clear ( )
inline

Definition at line 161 of file SubstitutionProcessCollectionMember.h.

References modelToNodes_, nodeToModel_, and nRoot_.

◆ clone()

SubstitutionProcessCollectionMember* bpp::SubstitutionProcessCollectionMember::clone ( ) const
inlineoverrideprivatevirtual

◆ collection() [1/2]

SubstitutionProcessCollection& bpp::SubstitutionProcessCollectionMember::collection ( )
inline

Definition at line 154 of file SubstitutionProcessCollectionMember.h.

References pSubProColl_.

◆ collection() [2/2]

const SubstitutionProcessCollection& bpp::SubstitutionProcessCollectionMember::collection ( ) const
inline

Definition at line 147 of file SubstitutionProcessCollectionMember.h.

References pSubProColl_.

◆ getAlphabet()

◆ getBranchLengthParameters()

ParameterList SubstitutionProcessCollectionMember::getBranchLengthParameters ( bool  independent) const
overridevirtual

Get the parameters of the tree.

Implements bpp::SubstitutionProcessInterface.

Definition at line 75 of file SubstitutionProcessCollectionMember.cpp.

◆ getClassProbabilities()

Vdouble SubstitutionProcessCollectionMember::getClassProbabilities ( ) const
overridevirtual
Returns
The vector of the probabilities associated to the classes.

Implements bpp::SubstitutionProcessInterface.

Definition at line 375 of file SubstitutionProcessCollectionMember.cpp.

◆ getCollection() [1/2]

SubstitutionProcessCollection* bpp::SubstitutionProcessCollectionMember::getCollection ( )
inline

Definition at line 173 of file SubstitutionProcessCollectionMember.h.

References pSubProColl_.

◆ getCollection() [2/2]

const SubstitutionProcessCollection* bpp::SubstitutionProcessCollectionMember::getCollection ( ) const
inline

Definition at line 168 of file SubstitutionProcessCollectionMember.h.

References pSubProColl_.

◆ getModel() [1/3]

std::shared_ptr< BranchModelInterface > SubstitutionProcessCollectionMember::getModel ( size_t  n)

Definition at line 35 of file SubstitutionProcessCollectionMember.cpp.

◆ getModel() [2/3]

std::shared_ptr< const BranchModelInterface > SubstitutionProcessCollectionMember::getModel ( size_t  i) const
overridevirtual
Returns
A shared pointer toward the model with given index.

Implements bpp::SubstitutionProcessInterface.

Definition at line 30 of file SubstitutionProcessCollectionMember.cpp.

Referenced by getModel(), getModelForNode(), and bpp::PhylogeneticsApplicationTools::getSubstitutionProcess().

◆ getModel() [3/3]

std::shared_ptr<const BranchModelInterface> bpp::SubstitutionProcessCollectionMember::getModel ( unsigned int  nodeId,
size_t  classIndex 
) const
inlineoverridevirtual

Get the substitution model corresponding to a certain branch, site pattern, and model class.

Parameters
nodeIdThe id of the node.
classIndexThe model class index.
Returns
A shared pointer toward the model with given index.

Implements bpp::SubstitutionProcessInterface.

Definition at line 391 of file SubstitutionProcessCollectionMember.h.

References getModel(), and nodeToModel_.

◆ getModelForNode()

std::shared_ptr<const BranchModelInterface> bpp::SubstitutionProcessCollectionMember::getModelForNode ( unsigned int  nodeId) const
inlineoverridevirtual

Get the model associated to a particular node id.

Parameters
nodeIdThe id of the query node.
Returns
A pointer toward the corresponding model.
Exceptions
ExceptionIf no model is found for this node.

Implements bpp::SubstitutionProcessInterface.

Definition at line 244 of file SubstitutionProcessCollectionMember.h.

References getModel(), nodeToModel_, and bpp::TextTools::toString().

◆ getModelNumberForNode()

size_t bpp::SubstitutionProcessCollectionMember::getModelNumberForNode ( unsigned int  nodeId) const
inlineoverridevirtual

Get the number of the model associated to a particular node id.

Parameters
nodeIdThe id of the query node.
Returns
The number of the model associated to the given node.
Exceptions
ExceptionIf no model is found for this node.

Implements bpp::SubstitutionProcessInterface.

Definition at line 229 of file SubstitutionProcessCollectionMember.h.

References nodeToModel_, and bpp::TextTools::toString().

◆ getModelNumbers()

std::vector< size_t > SubstitutionProcessCollectionMember::getModelNumbers ( ) const
overridevirtual
Returns
The current indexes of models used in the process

Implements bpp::SubstitutionProcessInterface.

Definition at line 14 of file SubstitutionProcessCollectionMember.cpp.

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

◆ getModelScenario() [1/2]

std::shared_ptr< ModelScenario > SubstitutionProcessCollectionMember::getModelScenario ( )

Definition at line 45 of file SubstitutionProcessCollectionMember.cpp.

◆ getModelScenario() [2/2]

std::shared_ptr< const ModelScenario > SubstitutionProcessCollectionMember::getModelScenario ( ) const
overridevirtual

Get the Model Scenario associated with this process, in case there are mixture models involved.

When a mixture model is not included in the ModelScenario, it is considered as non-mixed (transition probabilities are then computed as mixture of submodel transition probalities).

It returns 0 if there is no model path, which means that all mixture models are considered as non-mixed.

Implements bpp::SubstitutionProcessInterface.

Definition at line 40 of file SubstitutionProcessCollectionMember.cpp.

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

◆ getModelScenarioNumber()

const size_t bpp::SubstitutionProcessCollectionMember::getModelScenarioNumber ( ) const
inline

Definition at line 318 of file SubstitutionProcessCollectionMember.h.

References nPath_.

◆ getNodesWithModel()

const std::vector<unsigned int> bpp::SubstitutionProcessCollectionMember::getNodesWithModel ( size_t  i) const
inlineoverridevirtual

Get a list of nodes id for which the given model is associated.

Parameters
iThe index of the model in the set.
Returns
A vector with the ids of the node associated to this model.
Exceptions
IndexOutOfBoundsExceptionIf the index is not valid.

Implements bpp::SubstitutionProcessInterface.

Definition at line 259 of file SubstitutionProcessCollectionMember.h.

References modelToNodes_, and bpp::TextTools::toString().

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

◆ getNonDerivableParameters()

ParameterList SubstitutionProcessCollectionMember::getNonDerivableParameters ( ) const
overridevirtual

get all NonDerivable parameters.

Reimplemented from bpp::AbstractSubstitutionProcess.

Definition at line 100 of file SubstitutionProcessCollectionMember.cpp.

References bpp::ParameterList::includeParameters().

◆ getNumberOfClasses()

size_t bpp::AbstractSubstitutionProcess::getNumberOfClasses ( ) const
inlinevirtualinherited

◆ getNumberOfModels()

size_t bpp::SubstitutionProcessCollectionMember::getNumberOfModels ( ) const
inlineoverridevirtual
Returns
The current number of distinct substitution models in this set.

Implements bpp::SubstitutionProcessInterface.

Definition at line 199 of file SubstitutionProcessCollectionMember.h.

References modelToNodes_.

◆ getNumberOfProcesses()

size_t bpp::SubstitutionProcessCollectionMember::getNumberOfProcesses ( ) const
inline
Returns
the number of the process in the collection

Definition at line 191 of file SubstitutionProcessCollectionMember.h.

References nProc_.

◆ getNumberOfStates()

size_t bpp::AbstractSubstitutionProcess::getNumberOfStates ( ) const
inlinevirtualinherited

◆ getParametrizablePhyloTree() [1/2]

std::shared_ptr< ParametrizablePhyloTree > SubstitutionProcessCollectionMember::getParametrizablePhyloTree ( )

Definition at line 224 of file SubstitutionProcessCollectionMember.cpp.

◆ getParametrizablePhyloTree() [2/2]

std::shared_ptr< const ParametrizablePhyloTree > SubstitutionProcessCollectionMember::getParametrizablePhyloTree ( ) const
overridevirtual

◆ getProbabilityForModel()

double SubstitutionProcessCollectionMember::getProbabilityForModel ( size_t  classIndex) const
overridevirtual

Inheriting from SubstitutionProcess

Implements bpp::SubstitutionProcessInterface.

Definition at line 368 of file SubstitutionProcessCollectionMember.cpp.

◆ getRateDistribution() [1/2]

std::shared_ptr< const DiscreteDistributionInterface > SubstitutionProcessCollectionMember::getRateDistribution ( ) const
overridevirtual

Get a pointer to the rate distribution (or null if there is no rate distribution).

Implements bpp::SubstitutionProcessInterface.

Definition at line 50 of file SubstitutionProcessCollectionMember.cpp.

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

◆ getRateDistribution() [2/2]

std::shared_ptr< DiscreteDistributionInterface > SubstitutionProcessCollectionMember::getRateDistribution ( )
overridevirtual

Get a pointer to the rate distribution (or null if there is no rate distribution).

Implements bpp::SubstitutionProcessInterface.

Definition at line 55 of file SubstitutionProcessCollectionMember.cpp.

◆ getRateDistributionNumber()

const size_t bpp::SubstitutionProcessCollectionMember::getRateDistributionNumber ( ) const
inline

Definition at line 288 of file SubstitutionProcessCollectionMember.h.

References nDist_.

◆ getRateDistributionParameters()

ParameterList SubstitutionProcessCollectionMember::getRateDistributionParameters ( bool  independent) const
overridevirtual

Get the parameters of the rate distribution.

Implements bpp::SubstitutionProcessInterface.

Definition at line 70 of file SubstitutionProcessCollectionMember.cpp.

◆ getRateForModel()

double SubstitutionProcessCollectionMember::getRateForModel ( size_t  classIndex) const
overridevirtual
Returns
The substitution rate associated to the given model class.
Parameters
classIndexThe model class index.

Implements bpp::SubstitutionProcessInterface.

Definition at line 387 of file SubstitutionProcessCollectionMember.cpp.

◆ getRootFrequencies()

const std::vector< double > & SubstitutionProcessCollectionMember::getRootFrequencies ( ) const
overridevirtual
Returns
The values of the root frequencies.

Implements bpp::SubstitutionProcessInterface.

Definition at line 160 of file SubstitutionProcessCollectionMember.cpp.

◆ getRootFrequenciesNumber()

const size_t bpp::SubstitutionProcessCollectionMember::getRootFrequenciesNumber ( ) const
inline

Definition at line 297 of file SubstitutionProcessCollectionMember.h.

References nRoot_.

◆ getRootFrequenciesParameters()

ParameterList SubstitutionProcessCollectionMember::getRootFrequenciesParameters ( bool  independent) const
overridevirtual

Get the parameters of the root frequencies set.

Implements bpp::SubstitutionProcessInterface.

Definition at line 83 of file SubstitutionProcessCollectionMember.cpp.

◆ getRootFrequencySet() [1/2]

std::shared_ptr< const FrequencySetInterface > SubstitutionProcessCollectionMember::getRootFrequencySet ( ) const
overridevirtual
Returns
A pointer toward rhe set of parametrized root frequencies.

Implements bpp::SubstitutionProcessInterface.

Definition at line 128 of file SubstitutionProcessCollectionMember.cpp.

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

◆ getRootFrequencySet() [2/2]

std::shared_ptr< FrequencySetInterface > SubstitutionProcessCollectionMember::getRootFrequencySet ( )
overridevirtual
Returns
A pointer toward rhe set of parametrized root frequencies.

Implements bpp::SubstitutionProcessInterface.

Definition at line 136 of file SubstitutionProcessCollectionMember.cpp.

◆ getStateMap()

std::shared_ptr<const StateMapInterface> bpp::SubstitutionProcessCollectionMember::getStateMap ( ) const
inlineoverridevirtual

◆ getSubstitutionModelParameters()

ParameterList SubstitutionProcessCollectionMember::getSubstitutionModelParameters ( bool  independent) const
overridevirtual

Get the parameters of the substitution models.

Implements bpp::SubstitutionProcessInterface.

Definition at line 113 of file SubstitutionProcessCollectionMember.cpp.

References bpp::ParameterList::includeParameters().

◆ getTreeNumber()

size_t bpp::SubstitutionProcessCollectionMember::getTreeNumber ( ) const
inline

Definition at line 384 of file SubstitutionProcessCollectionMember.h.

References nTree_.

◆ hasMixedTransitionModel()

bool SubstitutionProcessCollectionMember::hasMixedTransitionModel ( ) const
Returns
True iff there is a MixedTransitionModel in the SubstitutionProcessCollectionMember

Definition at line 347 of file SubstitutionProcessCollectionMember.cpp.

◆ hasRootFrequencySet()

bool bpp::SubstitutionProcessCollectionMember::hasRootFrequencySet ( ) const
inlineoverridevirtual
Returns
true if the process has parametrized root frequencies (non-stationary model)

Implements bpp::SubstitutionProcessInterface.

Definition at line 299 of file SubstitutionProcessCollectionMember.h.

References isStationary().

◆ isCompatibleWith()

bool bpp::AbstractSubstitutionProcess::isCompatibleWith ( const AlignmentDataInterface data) const
inlinevirtualinherited

◆ isFullySetUp()

bool bpp::SubstitutionProcessCollectionMember::isFullySetUp ( bool  throwEx = true) const
inline

Check if the model set is fully specified for a given tree.

This include:

  • that each node as a model set up,
  • that each model in the set is attributed to a node,
  • all nodes ids in the set refer to an existing node in the tree.
Parameters
throwExTell if an exception have to be thrown in case of test not passed.

Definition at line 339 of file SubstitutionProcessCollectionMember.h.

References checkOrphanNodes(), and checkUnknownNodes().

◆ isStationary()

bool bpp::SubstitutionProcessCollectionMember::isStationary ( ) const
inline
Returns
True iff is stationary.

Definition at line 209 of file SubstitutionProcessCollectionMember.h.

References nRoot_.

Referenced by hasRootFrequencySet().

◆ matchParametersValues()

bool SubstitutionProcessCollectionMember::matchParametersValues ( const ParameterList parameters)
overridevirtual

AbsractParametrizable interface.

Reimplemented from bpp::AbstractParameterAliasable.

Definition at line 359 of file SubstitutionProcessCollectionMember.cpp.

References bpp::AbstractParameterAliasable::matchParametersValues().

◆ model() [1/2]

const BranchModelInterface & SubstitutionProcessCollectionMember::model ( size_t  i) const
overridevirtual
Returns
the model with given index.

Implements bpp::SubstitutionProcessInterface.

Definition at line 25 of file SubstitutionProcessCollectionMember.cpp.

Referenced by getStateMap(), model(), and stateMap().

◆ model() [2/2]

const BranchModelInterface& bpp::SubstitutionProcessCollectionMember::model ( unsigned int  nodeId,
size_t  classIndex 
) const
inlineoverridevirtual

Get the substitution model corresponding to a certain branch, site pattern, and model class.

Parameters
nodeIdThe id of the node.
classIndexThe model class index.
Returns
the model with given index.

Implements bpp::SubstitutionProcessInterface.

Definition at line 386 of file SubstitutionProcessCollectionMember.h.

References model(), and nodeToModel_.

◆ operator=()

SubstitutionProcessCollectionMember& bpp::SubstitutionProcessCollectionMember::operator= ( const SubstitutionProcessCollectionMember set)
inlineprivate

◆ parametrizablePhyloTree() [1/2]

ParametrizablePhyloTree & SubstitutionProcessCollectionMember::parametrizablePhyloTree ( )

Definition at line 216 of file SubstitutionProcessCollectionMember.cpp.

◆ parametrizablePhyloTree() [2/2]

const ParametrizablePhyloTree & SubstitutionProcessCollectionMember::parametrizablePhyloTree ( ) const
overridevirtual
Returns
the Tree

Implements bpp::SubstitutionProcessInterface.

Definition at line 203 of file SubstitutionProcessCollectionMember.cpp.

◆ rateDistribution() [1/2]

const DiscreteDistributionInterface & SubstitutionProcessCollectionMember::rateDistribution ( ) const
overridevirtual

Get the rate distribution.

Implements bpp::SubstitutionProcessInterface.

Definition at line 60 of file SubstitutionProcessCollectionMember.cpp.

◆ rateDistribution() [2/2]

DiscreteDistributionInterface & SubstitutionProcessCollectionMember::rateDistribution ( )
overridevirtual

Get the rate distribution.

Exceptions
NullPointerExceptionif there is no associated rate distribution.

Implements bpp::SubstitutionProcessInterface.

Definition at line 65 of file SubstitutionProcessCollectionMember.cpp.

◆ rootFrequencySet() [1/2]

const FrequencySetInterface & SubstitutionProcessCollectionMember::rootFrequencySet ( ) const
overridevirtual
Returns
The set of parametrized root frequencies.

Implements bpp::SubstitutionProcessInterface.

Definition at line 144 of file SubstitutionProcessCollectionMember.cpp.

◆ rootFrequencySet() [2/2]

FrequencySetInterface & SubstitutionProcessCollectionMember::rootFrequencySet ( )
overridevirtual
Returns
The set of parametrized root frequencies.

Implements bpp::SubstitutionProcessInterface.

Definition at line 152 of file SubstitutionProcessCollectionMember.cpp.

◆ setModelScenario()

void SubstitutionProcessCollectionMember::setModelScenario ( size_t  numPath)

◆ setRootFrequencies()

void SubstitutionProcessCollectionMember::setRootFrequencies ( size_t  numFreq)

Set the root Frequencies Set.

Parameters
numFreqthe index of the frequencies in the collection.

Definition at line 276 of file SubstitutionProcessCollectionMember.cpp.

Referenced by bpp::SubstitutionProcessCollection::addOnePerBranchSubstitutionProcess(), and bpp::SubstitutionProcessCollection::addSubstitutionProcess().

◆ setTreeNumber()

void SubstitutionProcessCollectionMember::setTreeNumber ( size_t  nTree,
bool  check = true 
)

Definition at line 229 of file SubstitutionProcessCollectionMember.cpp.

◆ stateMap()

const StateMapInterface& bpp::SubstitutionProcessCollectionMember::stateMap ( ) const
inlineoverridevirtual
Returns
The state map associated with the models of this process

Implements bpp::SubstitutionProcessInterface.

Definition at line 178 of file SubstitutionProcessCollectionMember.h.

References model(), modelToNodes_, and bpp::BranchModelInterface::stateMap().

◆ updateParameters()

void SubstitutionProcessCollectionMember::updateParameters ( )
private

sets the parameters as the independent parameters on the objects

Definition at line 91 of file SubstitutionProcessCollectionMember.cpp.

Referenced by SubstitutionProcessCollectionMember().

Friends And Related Function Documentation

◆ SubstitutionProcessCollection

friend class SubstitutionProcessCollection
friend

Definition at line 428 of file SubstitutionProcessCollectionMember.h.

Member Data Documentation

◆ modelToNodes_

std::map<size_t, std::vector<unsigned int> > bpp::SubstitutionProcessCollectionMember::modelToNodes_
private

◆ nDist_

size_t bpp::SubstitutionProcessCollectionMember::nDist_
private

The number of the rate distribution.

Definition at line 59 of file SubstitutionProcessCollectionMember.h.

Referenced by getRateDistributionNumber(), and operator=().

◆ nodeToModel_

std::map<unsigned int, size_t> bpp::SubstitutionProcessCollectionMember::nodeToModel_
private

Contains for each node in a tree the index of the corresponding model in modelSet_.

Definition at line 48 of file SubstitutionProcessCollectionMember.h.

Referenced by clear(), getModel(), getModelForNode(), getModelNumberForNode(), model(), and operator=().

◆ nPath_

size_t bpp::SubstitutionProcessCollectionMember::nPath_
private

the number of the set of model path, if needed.

Definition at line 69 of file SubstitutionProcessCollectionMember.h.

Referenced by getModelScenarioNumber(), and operator=().

◆ nProc_

size_t bpp::SubstitutionProcessCollectionMember::nProc_
private

The number of the process in the collection.

Definition at line 34 of file SubstitutionProcessCollectionMember.h.

Referenced by getNumberOfProcesses(), and operator=().

◆ nRoot_

size_t bpp::SubstitutionProcessCollectionMember::nRoot_
private

The number of the root frequencies (0 if the process is stationary).

Definition at line 64 of file SubstitutionProcessCollectionMember.h.

Referenced by clear(), getRootFrequenciesNumber(), isStationary(), and operator=().

◆ nTree_

size_t bpp::SubstitutionProcessCollectionMember::nTree_
private

The number of the tree: 0 means no assigned tree.

Definition at line 54 of file SubstitutionProcessCollectionMember.h.

Referenced by getTreeNumber(), and operator=().

◆ pSubProColl_

SubstitutionProcessCollection* bpp::SubstitutionProcessCollectionMember::pSubProColl_
private

A pointer towards the collection the SubstitutionProcessCollectionMember belongs to.

Definition at line 29 of file SubstitutionProcessCollectionMember.h.

Referenced by collection(), getCollection(), and operator=().


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