ECF 1.5
Public Member Functions | Public Attributes | Protected Attributes | List of all members

Individual class - inherits a vector of Genotype objects. More...

#include <Individual.h>

Inheritance diagram for Individual:

Public Member Functions

 Individual (StateP state)
 create AND initialize individual More...
 
bool initialize (StateP state)
 initialize individual More...
 
void write (XMLNode &)
 write individual to XML node More...
 
void read (XMLNode &)
 read individual from XML node More...
 
std::string toString ()
 output individual to string More...
 
Individualcopy ()
 create a copy of the individual More...
 
GenotypeP getGenotype (uint index=0)
 return genotype with given index More...
 
FitnessP getFitness ()
 return sptr to individual's fitness object More...
 

Public Attributes

FitnessP fitness
 sptr to individual's fitness object More...
 
uint index
 individual's index in Deme More...
 
uint cid
 coherence index, used in asynchronous parallel algoritmhs More...
 

Protected Attributes

StateP state_
 

Detailed Description

Individual class - inherits a vector of Genotype objects.

Definition at line 11 of file Individual.h.

Constructor & Destructor Documentation

◆ Individual() [1/2]

Individual::Individual ( )
inline

Definition at line 17 of file Individual.h.

◆ Individual() [2/2]

Individual::Individual ( StateP  state)

create AND initialize individual

Definition at line 5 of file Individual.cpp.

Member Function Documentation

◆ copy()

Individual * Individual::copy ( )

create a copy of the individual

Definition at line 31 of file Individual.cpp.

◆ getFitness()

FitnessP Individual::getFitness ( )

return sptr to individual's fitness object

Definition at line 50 of file Individual.cpp.

◆ getGenotype()

GenotypeP Individual::getGenotype ( uint  index = 0)

return genotype with given index

Definition at line 44 of file Individual.cpp.

◆ initialize()

bool Individual::initialize ( StateP  state)

initialize individual

Definition at line 12 of file Individual.cpp.

◆ read()

void Individual::read ( XMLNode &  xIndividual)

read individual from XML node

Read individual from XMLNode.

Individual must be initialize()-d beforehand! If fitness object doesn't exist, one is copied from State.

Definition at line 103 of file Individual.cpp.

◆ toString()

std::string Individual::toString ( )

output individual to string

Definition at line 86 of file Individual.cpp.

◆ write()

void Individual::write ( XMLNode &  xIndividual)

write individual to XML node

Write individual to XMLNode.

Individual must be initialize()-d beforehand! If fitness object doesn't exist, an empty Fitness node is created.

Definition at line 62 of file Individual.cpp.

Member Data Documentation

◆ cid

uint Individual::cid

coherence index, used in asynchronous parallel algoritmhs

Definition at line 42 of file Individual.h.

◆ fitness

FitnessP Individual::fitness

sptr to individual's fitness object

Definition at line 38 of file Individual.h.

◆ index

uint Individual::index

individual's index in Deme

Definition at line 40 of file Individual.h.

◆ state_

StateP Individual::state_
protected

Definition at line 14 of file Individual.h.


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