bpp-phyl3  3.0.0
bpp::SimProcessNode Class Reference

#include <Bpp/Phyl/Simulation/SimpleSubstitutionProcessSiteSimulator.h>

+ Inheritance diagram for bpp::SimProcessNode:
+ Collaboration diagram for bpp::SimProcessNode:

Public Member Functions

 SimProcessNode (const ProcessComputationNode &pcn)
 
uint getSpeciesIndex () const
 
bool isSpeciation () const
 
bool isMixture () const
 
PhyloNodeclone () const
 
Name:
std::string getName () const
 Get the name associated to this node, if there is one, otherwise throw a NodeException. More...
 
void setName (const std::string &name)
 Give a name or update the name associated to the node. More...
 
void deleteName ()
 Delete the name associated to this node (do nothing if there is no name). More...
 
bool hasName () const
 Tell is this node has a name. More...
 
Node properties:
void setProperty (const std::string &name, const Clonable &property)
 Set/add a node property. More...
 
ClonablegetProperty (const std::string &name)
 
const ClonablegetProperty (const std::string &name) const
 
ClonableremoveProperty (const std::string &name)
 
void deleteProperty (const std::string &name)
 
void removeProperties ()
 Remove all node properties. More...
 
void deleteProperties ()
 Delete all node properties. More...
 
bool hasProperty (const std::string &name) const
 
std::vector< std::string > getPropertyNames () const
 

Private Attributes

size_t state_
 
VVdouble cumProb_
 
std::vector< std::shared_ptr< SimProcessNode > > sons_
 
const uint speciesIndex_
 the index of the species in the phyloTree matching this node. More...
 
std::string name_
 
std::map< std::string, Clonable * > properties_
 

Friends

class SimpleSubstitutionProcessSiteSimulator
 
class GivenDataSubstitutionProcessSiteSimulator
 

Detailed Description

Definition at line 27 of file SimpleSubstitutionProcessSiteSimulator.h.

Constructor & Destructor Documentation

◆ SimProcessNode()

bpp::SimProcessNode::SimProcessNode ( const ProcessComputationNode pcn)
inline

Definition at line 41 of file SimpleSubstitutionProcessSiteSimulator.h.

Member Function Documentation

◆ clone()

PhyloNode* bpp::PhyloNode::clone ( ) const
inlineinherited

Definition at line 102 of file PhyloNode.h.

References bpp::PhyloNode::PhyloNode().

◆ deleteName()

void bpp::PhyloNode::deleteName ( )
inlineinherited

Delete the name associated to this node (do nothing if there is no name).

Definition at line 145 of file PhyloNode.h.

References bpp::PhyloNode::name_.

◆ deleteProperties()

void bpp::PhyloNode::deleteProperties ( )
inlineinherited

Delete all node properties.

Definition at line 234 of file PhyloNode.h.

References bpp::PhyloNode::properties_.

Referenced by bpp::PhyloNode::~PhyloNode().

◆ deleteProperty()

void bpp::PhyloNode::deleteProperty ( const std::string &  name)
inlineinherited

Definition at line 210 of file PhyloNode.h.

References bpp::PhyloNode::hasProperty(), and bpp::PhyloNode::properties_.

◆ getName()

std::string bpp::PhyloNode::getName ( ) const
inlineinherited

Get the name associated to this node, if there is one, otherwise throw a NodeException.

Returns
The name associated to this node.

Definition at line 126 of file PhyloNode.h.

References bpp::PhyloNode::hasName(), and bpp::PhyloNode::name_.

◆ getProperty() [1/2]

Clonable* bpp::PhyloNode::getProperty ( const std::string &  name)
inlineinherited

◆ getProperty() [2/2]

const Clonable* bpp::PhyloNode::getProperty ( const std::string &  name) const
inlineinherited

Definition at line 190 of file PhyloNode.h.

References bpp::PhyloNode::hasProperty(), and bpp::PhyloNode::properties_.

◆ getPropertyNames()

std::vector<std::string> bpp::PhyloNode::getPropertyNames ( ) const
inlineinherited

Definition at line 245 of file PhyloNode.h.

References bpp::MapTools::getKeys(), and bpp::PhyloNode::properties_.

◆ getSpeciesIndex()

uint bpp::ProcessComputationNode::getSpeciesIndex ( ) const
inlineinherited

◆ hasName()

bool bpp::PhyloNode::hasName ( ) const
inlineinherited

Tell is this node has a name.

Returns
True if name != 0.

Definition at line 155 of file PhyloNode.h.

References bpp::PhyloNode::name_.

Referenced by bpp::PhyloNode::getName().

◆ hasProperty()

bool bpp::PhyloNode::hasProperty ( const std::string &  name) const
inlineinherited

◆ isMixture()

bool bpp::ProcessComputationNode::isMixture ( ) const
inlineinherited

◆ isSpeciation()

bool bpp::ProcessComputationNode::isSpeciation ( ) const
inlineinherited

◆ removeProperties()

void bpp::PhyloNode::removeProperties ( )
inlineinherited

Remove all node properties.

Attached objects will not be deleted.

Definition at line 226 of file PhyloNode.h.

References bpp::PhyloNode::properties_.

◆ removeProperty()

Clonable* bpp::PhyloNode::removeProperty ( const std::string &  name)
inlineinherited

Definition at line 198 of file PhyloNode.h.

References bpp::PhyloNode::hasProperty(), and bpp::PhyloNode::properties_.

◆ setName()

void bpp::PhyloNode::setName ( const std::string &  name)
inlineinherited

Give a name or update the name associated to the node.

Parameters
nameThe name to give to the node.

Definition at line 137 of file PhyloNode.h.

References bpp::PhyloNode::name_.

◆ setProperty()

void bpp::PhyloNode::setProperty ( const std::string &  name,
const Clonable property 
)
inlineinherited

Set/add a node property.

If no property with the same name is found, the new property will be added to the list. Conversely, the property will be deleted and replaced by the new one. If you want to keep a copy of the old property, consider using the removeProperty function before.

Parameters
nameThe name of the property to set.
propertyThe property object (will be cloned).

Definition at line 175 of file PhyloNode.h.

References bpp::PhyloNode::hasProperty(), and bpp::PhyloNode::properties_.

Referenced by bpp::StochasticMapping::setNodeState().

Friends And Related Function Documentation

◆ GivenDataSubstitutionProcessSiteSimulator

◆ SimpleSubstitutionProcessSiteSimulator

Member Data Documentation

◆ cumProb_

VVdouble bpp::SimProcessNode::cumProb_
private

Definition at line 35 of file SimpleSubstitutionProcessSiteSimulator.h.

◆ name_

std::string bpp::PhyloNode::name_
privateinherited

◆ properties_

◆ sons_

std::vector<std::shared_ptr<SimProcessNode> > bpp::SimProcessNode::sons_
private

Definition at line 38 of file SimpleSubstitutionProcessSiteSimulator.h.

◆ speciesIndex_

const uint bpp::ProcessComputationNode::speciesIndex_
privateinherited

the index of the species in the phyloTree matching this node.

Definition at line 33 of file ProcessComputationTree.h.

Referenced by bpp::ProcessComputationNode::getSpeciesIndex().

◆ state_

size_t bpp::SimProcessNode::state_
private

Definition at line 32 of file SimpleSubstitutionProcessSiteSimulator.h.


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