Wrapper class to sort genomes and to track their evolution.
More...
#include <genome.h>
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.
|
Genome * | getGenome () 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:
-
pGenome | The genome to wrap. |
parent1 | Index of the first parent (after sorting) |
parent2 | Index of the second parent (after sorting) |
position | Position 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: