bpp-phyl  2.2.0
bpp::MutationProcess Class Referenceabstract

Interface for simulations. More...

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

+ Inheritance diagram for bpp::MutationProcess:

Public Member Functions

 MutationProcess ()
 
virtual ~MutationProcess ()
 
virtual size_t mutate (size_t state) const =0
 Mutate a character in state i. More...
 
virtual size_t mutate (size_t state, unsigned int n) const =0
 Mutate a character in state i n times. More...
 
virtual double getTimeBeforeNextMutationEvent (size_t state) const =0
 Get the time before next mutation event. More...
 
virtual size_t evolve (size_t initialState, double time) const =0
 Simulation a character evolution during a specified time according to the given substitution model and send the final state. More...
 
virtual MutationPath detailedEvolve (size_t initialState, double time) const =0
 Simulation a character evolution during a specified time according to the given substitution model and send the total path with all intermediate states and times between mutation events. More...
 
virtual const SubstitutionModelgetSubstitutionModel () const =0
 Get the substitution model associated to the mutation process. More...
 

Detailed Description

Interface for simulations.

A mutation process defines the rules for mutations to occure. The MutationProcess interface provides two methods, one for mutating a character in state i in another character, another for achieving this task n times.

Definition at line 204 of file MutationProcess.h.

Constructor & Destructor Documentation

◆ MutationProcess()

bpp::MutationProcess::MutationProcess ( )
inline

Definition at line 207 of file MutationProcess.h.

◆ ~MutationProcess()

virtual bpp::MutationProcess::~MutationProcess ( )
inlinevirtual

Definition at line 208 of file MutationProcess.h.

Member Function Documentation

◆ detailedEvolve()

virtual MutationPath bpp::MutationProcess::detailedEvolve ( size_t  initialState,
double  time 
) const
pure virtual

Simulation a character evolution during a specified time according to the given substitution model and send the total path with all intermediate states and times between mutation events.

Parameters
initialStateThe state before beginning evolution.
timeThe time during which evolution must occure.
Returns
The resulting mutation path.

Implemented in bpp::AbstractMutationProcess.

◆ evolve()

virtual size_t bpp::MutationProcess::evolve ( size_t  initialState,
double  time 
) const
pure virtual

Simulation a character evolution during a specified time according to the given substitution model and send the final state.

Parameters
initialStateThe state before beginning evolution.
timeThe time during which evolution must occure.
Returns
The resulting state after evolution is completed.

Implemented in bpp::SimpleMutationProcess, and bpp::AbstractMutationProcess.

◆ getSubstitutionModel()

virtual const SubstitutionModel* bpp::MutationProcess::getSubstitutionModel ( ) const
pure virtual

Get the substitution model associated to the mutation process.

Returns
The SubstitutionModel associated to this instance.

Implemented in bpp::AbstractMutationProcess.

◆ getTimeBeforeNextMutationEvent()

virtual double bpp::MutationProcess::getTimeBeforeNextMutationEvent ( size_t  state) const
pure virtual

Get the time before next mutation event.

Parameters
stateThe actual state of the chain;
Returns
A random time before next mutation event.

Implemented in bpp::AbstractMutationProcess.

◆ mutate() [1/2]

virtual size_t bpp::MutationProcess::mutate ( size_t  state) const
pure virtual

Mutate a character in state i.

Parameters
stateThe current state of the character.

Implemented in bpp::AbstractMutationProcess.

◆ mutate() [2/2]

virtual size_t bpp::MutationProcess::mutate ( size_t  state,
unsigned int  n 
) const
pure virtual

Mutate a character in state i n times.

Parameters
stateThe current state of the character.
nThe number of mutations to perform.

Implemented in bpp::AbstractMutationProcess.


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