Nemo  2.2.0
Public Member Functions
LCE_SelectionSH Class Reference

StatHandler class for the LCE_Selection class. More...

#include <LCEselection.h>

+ Inheritance diagram for LCE_SelectionSH:
+ Collaboration diagram for LCE_SelectionSH:

List of all members.

Public Member Functions

 LCE_SelectionSH (LCE_Selection_base *event)
virtual ~LCE_SelectionSH ()
virtual bool setStatRecorders (string &token)
double getMeanFitness ()
double getFitness (unsigned int i)
double getSurvival (unsigned int i)
double getPedProp (unsigned int i)
double getPatchFitness (unsigned int i)

Detailed Description

StatHandler class for the LCE_Selection class.

Records the fitness stats.

Definition at line 233 of file LCEselection.h.


Constructor & Destructor Documentation

LCE_SelectionSH::LCE_SelectionSH ( LCE_Selection_base event) [inline]
virtual LCE_SelectionSH::~LCE_SelectionSH ( ) [inline, virtual]

Definition at line 239 of file LCEselection.h.

{}

Member Function Documentation

double LCE_SelectionSH::getFitness ( unsigned int  i) [inline]
double LCE_SelectionSH::getMeanFitness ( ) [inline]
double LCE_SelectionSH::getPatchFitness ( unsigned int  i)
double LCE_SelectionSH::getPedProp ( unsigned int  i) [inline]
double LCE_SelectionSH::getSurvival ( unsigned int  i) [inline]
bool LCE_SelectionSH::setStatRecorders ( string &  token) [virtual]

Definition at line 608 of file LCEselection.cc.

References StatHandlerBase::_pop, StatHandler< LCE_SelectionSH >::add(), ALL, getFitness(), getMeanFitness(), getPatchFitness(), Metapop::getPatchNbr(), getPedProp(), and getSurvival().

{
  if(token.compare("fitness") == 0) {
    add("Mean population fitness","fitness.mean",ALL,0,0,&LCE_SelectionSH::getMeanFitness,0,0,0);
    add("Mean population fitness","fitness.outb",ALL,0,0,0,&LCE_SelectionSH::getFitness,0,0);
    add("Mean population fitness","fitness.outw",ALL,1,0,0,&LCE_SelectionSH::getFitness,0,0);
    add("Mean population fitness","fitness.hsib",ALL,2,0,0,&LCE_SelectionSH::getFitness,0,0);
    add("Mean population fitness","fitness.fsib",ALL,3,0,0,&LCE_SelectionSH::getFitness,0,0);
    add("Mean population fitness","fitness.self",ALL,4,0,0,&LCE_SelectionSH::getFitness,0,0);
  } else if(token.compare("survival") == 0) {
    add("Mean offspring survival","survival.outb",ALL,0,0,0,&LCE_SelectionSH::getSurvival,0,0);
    add("Mean offspring survival","survival.outw",ALL,1,0,0,&LCE_SelectionSH::getSurvival,0,0);
    add("Mean offspring survival","survival.hsib",ALL,2,0,0,&LCE_SelectionSH::getSurvival,0,0);
    add("Mean offspring survival","survival.fsib",ALL,3,0,0,&LCE_SelectionSH::getSurvival,0,0);
    add("Mean offspring survival","survival.self",ALL,4,0,0,&LCE_SelectionSH::getSurvival,0,0);
  } else if(token.compare("fitness.prop") == 0) {
    add("Proportion of b/n demes outbreds","prop.outb",ALL,0,0,0,&LCE_SelectionSH::getPedProp,0,0);
    add("Proportion of w/n demes outbreds","prop.outw",ALL,1,0,0,&LCE_SelectionSH::getPedProp,0,0);
    add("Proportion of half-sib crossings","prop.hsib",ALL,2,0,0,&LCE_SelectionSH::getPedProp,0,0);
    add("Proportion of full-sib crossings","prop.fsib",ALL,3,0,0,&LCE_SelectionSH::getPedProp,0,0);
    add("Proportion of selfed progeny","prop.self",ALL,4,0,0,&LCE_SelectionSH::getPedProp,0,0);
    
  } else if(token.compare("fitness.patch") == 0) {
    unsigned int patchNbr = _pop->getPatchNbr();
    std::ostringstream name, sub_name;
    for(unsigned int p = 0; p < patchNbr; p++) {
      name<<"Mean fitness patch "<<p+1;
      sub_name<<"fitness.p"<<p+1;
      add(name.str(),sub_name.str(),ALL,p,0,0,&LCE_SelectionSH::getPatchFitness,0,0);
      name.str(""); sub_name.str("");
    }
  } else return false;
  
  return true;
}

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

Generated for Nemo v2.2.0 by  doxygen 1.7.5.1 -- Nemo is hosted by  SourceForge.net Logo