Egglib 2.1.11
C++ library reference manual
Public Member Functions | List of all members
Controller Class Reference

Controls a coalescent simulation. More...

#include <Controller.hpp>

Public Member Functions

 Controller ()
 Default constructor. More...
 
 ~Controller ()
 Destructor. More...
 
 Controller (const ParamSet *paramSet, Random *random)
 Standard constructor. More...
 
void reset ()
 Reset for a new simulation. More...
 
unsigned int step ()
 Increments the coalescent model. More...
 
ArggetArg ()
 Gets the Ancestral Recombination Graph. More...
 
void bottleneck (unsigned int populationIndex, double strength)
 Applies a bottleneck to a given population. More...
 
void moveAllLineages (unsigned int source, unsigned int dest)
 Migrate a complete population. More...
 
void moveSomeLineages (unsigned int source, unsigned int dest, double probability)
 Migrate a complete population. More...
 
void addPopulation ()
 Adds an empty population.
 

Detailed Description

Controls a coalescent simulation.

This class generates the gene genealogy, based on the parameters stocked in a ParamSet object.

Constructor & Destructor Documentation

Default constructor.

Uses a default ParamSet object that will not allow performing simulations.

~Controller ( )

Destructor.

Controller ( const ParamSet paramSet,
Random random 
)

Standard constructor.

Parameters
paramSeta ParamSet object containing run parameters (it is taken as a reference and stored as this so it must not be modified during simulations).
randomthe address of the random number generator.

Member Function Documentation

void bottleneck ( unsigned int  populationIndex,
double  strength 
)

Applies a bottleneck to a given population.

The bottleneck is applied following Galtier, Depaulis and Barton (Genetics, 2000): the general time counter is stopped, and coalescence events are performed during a time (of normal coalescent process) given by the parameter strength. All coalescent events are instantaneous.

Parameters
populationIndexindex of the population concerned by the event.
strengthstrength of the bottleneck given by a number of time units (2N generations times the size of the population).
Arg * getArg ( )

Gets the Ancestral Recombination Graph.

Returns
The address of the ARG contained in the object.
void moveAllLineages ( unsigned int  source,
unsigned int  dest 
)

Migrate a complete population.

Takes all the lineages currently present in the population source to the population dest.

void moveSomeLineages ( unsigned int  source,
unsigned int  dest,
double  probability 
)

Migrate a complete population.

Takes all the lineages currently present in the population source to the population dest.

Parameters
sourcesource population.
destdestination population.
probabilitythe probability that a lineage of source migrates to dest.
void reset ( )

Reset for a new simulation.

Object is reinitiliazed for a new simulation.

unsigned int step ( )

Increments the coalescent model.

Returns
The number of lineages.

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

Hosted by 
Get EggLib at SourceForge.net. Fast, secure and Free Open Source software downloads