MOGAL
Public Member Functions

mogal::GenomeWrapper Class Reference

Wrapper class to sort genomes and to track their evolution. More...

#include <genome.h>

Collaboration diagram for mogal::GenomeWrapper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GenomeWrapper (Genome *pGenome=0, int parent1=-1, int parent2=-1, int position=-1)
 Create a new genome wrapper.
GenomegetGenome () const
 Return the stored genome.
int getParent1 () const
 Return the index (after sorting) of the first parent.
int getParent2 () const
 Return the index (after sorting) of the second parent.
int getPosition () const
 Return the own position (after sorting) in the population.

Detailed Description


Constructor & Destructor Documentation

mogal::GenomeWrapper::GenomeWrapper ( Genome pGenome = 0,
int  parent1 = -1,
int  parent2 = -1,
int  position = -1 
) [inline]

Create a new genome wrapper.

Parameters:
pGenomeThe genome to wrap.
parent1Index of the first parent (after sorting)
parent2Index of the second parent (after sorting)
positionPosition of the genome in the new population

Member Function Documentation

Genome* mogal::GenomeWrapper::getGenome ( ) const [inline]
int mogal::GenomeWrapper::getParent1 ( ) const [inline]
int mogal::GenomeWrapper::getParent2 ( ) const [inline]
int mogal::GenomeWrapper::getPosition ( ) const [inline]

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