Loading...
Searching...
No Matches
BALL::GeneticIndividual Class Reference

`#include <BALL/DOCKING/GENETICDOCK/geneticIndividual.h>`

## Public Member Functions

| GeneticIndividual ()
| GeneticIndividual (const GeneticIndividual &gi)
GeneticIndividual & | operator= (const GeneticIndividual &gi)
| ~GeneticIndividual ()
bool | operator< (const GeneticIndividual &gi) const
void | setFitnessValue (const double &d)
double | getFitnessValue ()
void | setAltered (bool b)
bool | isAltered ()
Size | numberOfGenes ()
GenericGene * | getGene (const Size &i)
void | insert (GenericGene *gg)
void | mate (GeneticIndividual &parent, GeneticIndividual &offspring)
bool | isMutated ()
void | setMutated (bool)
void | randomize ()

## Detailed Description

Definition at line 15 of file geneticIndividual.h.

## Constructor & Destructor Documentation

## GeneticIndividual() [1/2]

BALL::GeneticIndividual::GeneticIndividual | ( |  | ) |

standard constructor

## GeneticIndividual() [2/2]

BALL::GeneticIndividual::GeneticIndividual | ( | const GeneticIndividual & | gi | ) |

copy constructor

## ~GeneticIndividual()

BALL::GeneticIndividual::~GeneticIndividual | ( |  | ) |

destructor

## Member Function Documentation

## getFitnessValue()

double BALL::GeneticIndividual::getFitnessValue | ( |  | ) |

get fitness score

## getGene()

GenericGene * BALL::GeneticIndividual::getGene | ( | const Size & | i | ) |

get i-th gene

## insert()

void BALL::GeneticIndividual::insert | ( | GenericGene * | gg | ) |

push back gene gg

## isAltered()

bool BALL::GeneticIndividual::isAltered | ( |  | ) |

true if individual has changed since the last computation of the fitness score

## isMutated()

bool BALL::GeneticIndividual::isMutated | ( |  | ) |

true if indiviual has been mutated

## mate()

void BALL::GeneticIndividual::mate | ( | GeneticIndividual & | parent,
|  | GeneticIndividual & | offspring )

mate two individuals

## numberOfGenes()

Size BALL::GeneticIndividual::numberOfGenes | ( |  | ) |

counts number of genes

## operator<()

bool BALL::GeneticIndividual::operator< | ( | const GeneticIndividual & | gi | ) | const

smaller operator regarding fitness score

## operator=()

GeneticIndividual & BALL::GeneticIndividual::operator= | ( | const GeneticIndividual & | gi | ) |

assigment operator

## randomize()

void BALL::GeneticIndividual::randomize | ( |  | ) |

randomize all genes

## setAltered()

void BALL::GeneticIndividual::setAltered | ( | bool | b | ) |

assigns value to altered_

## setFitnessValue()

void BALL::GeneticIndividual::setFitnessValue | ( | const double & | d | ) |

assigns fitness score

## setMutated()

void BALL::GeneticIndividual::setMutated | ( | bool |  | ) |

assigns value to mutated_