bpp-phyl  2.1.0
bpp::MutationProcess Class Reference

Interface for simulations. More...

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

+ Inheritance diagram for bpp::MutationProcess:

List of all members.

Public Member Functions

 MutationProcess ()
virtual ~MutationProcess ()
virtual int mutate (int state) const =0
 Mutate a character in state i.
virtual int mutate (int state, unsigned int n) const =0
 Mutate a character in state i n times.
virtual double getTimeBeforeNextMutationEvent (int state) const =0
 Get the time before next mutation event.
virtual int evolve (int initialState, double time) const =0
 Simulation a character evolution during a specified time according to the given substitution model and send the final state.
virtual MutationPath detailedEvolve (int 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.
virtual const SubstitutionModelgetSubstitutionModel () const =0
 Get the substitution model associated to the mutation process.

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

Definition at line 207 of file MutationProcess.h.

virtual bpp::MutationProcess::~MutationProcess ( ) [inline, virtual]

Definition at line 208 of file MutationProcess.h.


Member Function Documentation

virtual MutationPath bpp::MutationProcess::detailedEvolve ( int  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.

virtual int bpp::MutationProcess::evolve ( int  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.

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.

virtual double bpp::MutationProcess::getTimeBeforeNextMutationEvent ( int  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.

virtual int bpp::MutationProcess::mutate ( int  state) const [pure virtual]

Mutate a character in state i.

Parameters:
stateThe current state of the character.

Implemented in bpp::AbstractMutationProcess.

virtual int bpp::MutationProcess::mutate ( int  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:
 All Classes Namespaces Files Functions Variables Typedefs Friends