bpp-phyl3  3.0.0
bpp::EvolutionSequenceSimulator Class Reference

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

+ Inheritance diagram for bpp::EvolutionSequenceSimulator:
+ Collaboration diagram for bpp::EvolutionSequenceSimulator:

Public Member Functions

 EvolutionSequenceSimulator (const SequenceEvolution &evol)
 
virtual ~EvolutionSequenceSimulator ()
 
 EvolutionSequenceSimulator (const EvolutionSequenceSimulator &ess)
 
EvolutionSequenceSimulatoroperator= (const EvolutionSequenceSimulator &ess)
 
EvolutionSequenceSimulatorclone () const
 
void resetSiteSimulators (size_t numberOfSites) const
 Reset the succession of site simulators (useful in case of HMM). More...
 
const SiteSimulatorInterfacesiteSimulator (size_t pos) const override
 
std::vector< std::string > getSequenceNames () const override
 
void outputInternalSequences (bool yn) override
 Sets whether we will output the internal sequences or not. More...
 
void setMap (std::vector< size_t > vMap)
 reset the set of processes. More...
 
size_t getNumberOfSites () const
 the number of mapped sites. More...
 
std::unique_ptr< SiteContainerInterfacesimulate (size_t numberOfSites) const override
 
std::unique_ptr< SiteContainerInterfacesimulate (const std::vector< double > &rates) const
 
std::unique_ptr< SiteContainerInterfacesimulate (const std::vector< size_t > &states) const
 
std::unique_ptr< SiteContainerInterfacesimulate (const std::vector< double > &rates, const std::vector< size_t > &states) const
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 
const Alphabetalphabet () const override
 

Protected Attributes

std::map< size_t, std::shared_ptr< SiteSimulatorInterface > > mProcess_
 the map of the process simulators. More...
 
std::vector< size_t > vMap_
 The vector of the site specific process in mProcess_; is mutable because can be changed for each simulation (for ex in case of HMM). More...
 
std::vector< std::string > seqNames_
 all processes trees must have at least the same sequence names as the first process of the map. More...
 
std::map< size_t, std::vector< size_t > > mvPosNames_
 correspondence map of seqNames positions of the several trees. Reference is the tree of the first process of the map. More...
 

Private Attributes

const SequenceEvolutionseqEvol_
 

Detailed Description

Definition at line 14 of file EvolutionSequenceSimulator.h.

Constructor & Destructor Documentation

◆ EvolutionSequenceSimulator() [1/2]

EvolutionSequenceSimulator::EvolutionSequenceSimulator ( const SequenceEvolution evol)

Definition at line 19 of file EvolutionSequenceSimulator.cpp.

Referenced by clone().

◆ ~EvolutionSequenceSimulator()

virtual bpp::EvolutionSequenceSimulator::~EvolutionSequenceSimulator ( )
inlinevirtual

Definition at line 23 of file EvolutionSequenceSimulator.h.

◆ EvolutionSequenceSimulator() [2/2]

bpp::EvolutionSequenceSimulator::EvolutionSequenceSimulator ( const EvolutionSequenceSimulator ess)
inline

Definition at line 26 of file EvolutionSequenceSimulator.h.

Member Function Documentation

◆ alphabet()

const Alphabet & SubstitutionProcessSequenceSimulator::alphabet ( ) const
overridevirtualinherited

◆ clone()

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

◆ getAlphabet()

shared_ptr< const Alphabet > SubstitutionProcessSequenceSimulator::getAlphabet ( ) const
overridevirtualinherited

◆ getNumberOfSites()

size_t bpp::SubstitutionProcessSequenceSimulator::getNumberOfSites ( ) const
inlineinherited

the number of mapped sites.

Definition at line 91 of file SubstitutionProcessSequenceSimulator.h.

References bpp::SubstitutionProcessSequenceSimulator::vMap_.

◆ getSequenceNames()

std::vector<std::string> bpp::SubstitutionProcessSequenceSimulator::getSequenceNames ( ) const
inlineoverridevirtualinherited

◆ operator=()

EvolutionSequenceSimulator& bpp::EvolutionSequenceSimulator::operator= ( const EvolutionSequenceSimulator ess)
inline

◆ outputInternalSequences()

void SubstitutionProcessSequenceSimulator::outputInternalSequences ( bool  yn)
overridevirtualinherited

Sets whether we will output the internal sequences or not.

Parameters
ynTell if we should output internal sequences.

Implements bpp::SequenceSimulatorInterface.

Definition at line 124 of file SubstitutionProcessSequenceSimulator.cpp.

References bpp::SubstitutionProcessSequenceSimulator::mProcess_.

◆ resetSiteSimulators()

◆ setMap()

void SubstitutionProcessSequenceSimulator::setMap ( std::vector< size_t >  vMap)
inherited

◆ simulate() [1/4]

◆ simulate() [2/4]

unique_ptr< SiteContainerInterface > SubstitutionProcessSequenceSimulator::simulate ( const std::vector< double > &  rates,
const std::vector< size_t > &  states 
) const
inherited

◆ simulate() [3/4]

◆ simulate() [4/4]

◆ siteSimulator()

const SiteSimulatorInterface& bpp::SubstitutionProcessSequenceSimulator::siteSimulator ( size_t  pos) const
inlineoverridevirtualinherited

Member Data Documentation

◆ mProcess_

◆ mvPosNames_

std::map<size_t, std::vector<size_t> > bpp::SubstitutionProcessSequenceSimulator::mvPosNames_
protectedinherited

correspondence map of seqNames positions of the several trees. Reference is the tree of the first process of the map.

mvPosNames[process id][i] is the position in the id_th tree leaves names of the i_th name of seqName_.

Definition at line 50 of file SubstitutionProcessSequenceSimulator.h.

Referenced by bpp::SubstitutionProcessSequenceSimulator::operator=(), bpp::SubstitutionProcessSequenceSimulator::simulate(), and bpp::SubstitutionProcessSequenceSimulator::SubstitutionProcessSequenceSimulator().

◆ seqEvol_

const SequenceEvolution* bpp::EvolutionSequenceSimulator::seqEvol_
private

Definition at line 18 of file EvolutionSequenceSimulator.h.

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

◆ seqNames_

std::vector<std::string> bpp::SubstitutionProcessSequenceSimulator::seqNames_
protectedinherited

◆ vMap_

std::vector<size_t> bpp::SubstitutionProcessSequenceSimulator::vMap_
mutableprotectedinherited

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