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

Split of a population. More...

#include <ChangeTypes.hpp>

Inheritance diagram for PopulationSplit:
Change

Public Member Functions

 PopulationSplit ()
 Default constructor. More...
 
 PopulationSplit (double date, unsigned int pop, double proba)
 Standard constructor. More...
 
void apply (ParamSet *paramSet, Controller *controller) const
 Applies the event. More...
 
unsigned int population () const
 Gets the population index.
 
void population (unsigned int)
 Sets the population index.
 
double probability () const
 Gets the probability of instant migration.
 
void probability (double)
 Sets the probability of instant migration.
 
- Public Member Functions inherited from Change
 Change ()
 Default constructor. More...
 
 Change (double date)
 Standard constructor. More...
 
double date () const
 Gets the event date value.
 
void date (double value)
 Sets the event date value.
 

Protected Attributes

unsigned int _population
 
double _probability
 
- Protected Attributes inherited from Change
double _date
 

Detailed Description

Split of a population.

Constructor & Destructor Documentation

Default constructor.

The default date is 0., the default population is 0, the default probability is 0.5.

PopulationSplit ( double  date,
unsigned int  pop,
double  proba 
)

Standard constructor.

A the time given by date, the specified population is split in two. An additional population (whose index is incremented from the current total number of population) is created and lineages are randomly picked and moved to the new population. The parameter proba gives the probability that a lineage from the population number pop moves instantly to the new population. If proba is 0, the program emulates the creation of an empty population (thinking forward in time, this is a population extinction). In general, forward in time, this is a population fusion.

Parameters
datethe date of the event.
poppopulation index.
probathe probability that lineages move to the new population.

Member Function Documentation

void apply ( ParamSet paramSet,
Controller controller 
) const
virtual

Applies the event.

Parameters
paramSetthe ParamSet instance to which the Change instance is attached.
controllerthe Controller instance of the simulation.

Implements Change.


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