#include <cIndividual.h>
List of all members.
Protected Member Functions |
virtual bool | kill () |
Detailed Description
Definition at line 50 of file cIndividual.h.
Constructor & Destructor Documentation
enviroment::cIndividual::cIndividual |
( |
void * |
pInObject, |
|
|
const cIndividualInfo & |
inIndividalInfo, |
|
|
bool |
bInDeleteObjectOnDestruction = true |
|
) |
| |
constructor
- Parameters:
-
pInObject | the object which is represented by the individual; this object won't be copied but destructed when the individual is destructed if bInDeleteObjectOnDestruction is true |
inIndividalInfo | the information for the individual |
bInDeleteObjectOnDestruction | if true delete the object (pInObject) when the individual is deleted |
enviroment::cIndividual::cIndividual |
( |
const cIndividual & |
individual | ) |
|
copyconstructor Beware: it down't copy the contained object
- Parameters:
-
individual | the individual to copy |
virtual enviroment::cIndividual::~cIndividual |
( |
| ) |
|
|
virtual |
destructor It deletes the objekt to the individual.
Member Function Documentation
virtual cIndividual* enviroment::cIndividual::clone |
( |
| ) |
const |
|
virtual |
virtual cIndividual* enviroment::cIndividual::clone |
( |
bool |
bCloneObject | ) |
const |
|
virtual |
This method clones this individual inclusive the containing object. Beware: You have to overwrite this method in every direct child class.
- Returns:
- a clone of this object
- Parameters:
-
bCloneObject | if true the object will be cloned and |
- See also:
- bInDeleteObjectOnDestruction will be set to true, if false the object won't be cloned and
-
bInDeleteObjectOnDestruction will be set to false
Reimplemented in enviroment::fib::cFibIndividual.
virtual bool enviroment::cIndividual::equal |
( |
const cIndividual & |
individual, |
|
|
bool |
checkIdentifiers = true |
|
) |
| const |
|
virtual |
Comparisson on equal method for two cIndividual objects.
- Parameters:
-
individual | the cIndividual to compare this idIndividualobject to |
checkIdentifiers | if true (standradvalue) the identifiers will be checked also, else not |
- Returns:
- true if the cIndividual this object represents is equal to the cIndividual the given object individual represents
Reimplemented in enviroment::fib::cFibIndividual.
virtual string enviroment::cIndividual::getClassName |
( |
| ) |
const |
|
virtual |
- Returns:
- a pointer to the information for the individual
- Returns:
- a pointer to the information for the individual
virtual void* enviroment::cIndividual::getObject |
( |
| ) |
|
|
virtual |
- Returns:
- a pointer to the object which is represented by the individual
virtual const void* enviroment::cIndividual::getObject |
( |
| ) |
const |
|
virtual |
- Returns:
- a pointer to the object which is represented by the individual
virtual bool enviroment::cIndividual::kill |
( |
| ) |
|
|
protectedvirtual |
bool enviroment::cIndividual::operator!= |
( |
const cIndividual & |
individual | ) |
const |
Comparisson on not equal operator for two cIndividual objects.
- Parameters:
-
individual | the cIndividual to compare this idIndividualobject to |
checkIdentifiers | if true (standradvalue) the identifiers will be checked allso, else not |
- Returns:
- true if the cIndividual this object represents is not equal to the cIndividual the given object individual represents
bool enviroment::cIndividual::operator== |
( |
const cIndividual & |
individual | ) |
const |
Comparisson on equal operator for two cIndividual objects.
- Parameters:
-
individual | the cIndividual to compare this idIndividualobject to |
- Returns:
- true if the cIndividual this object represents is equal to the cIndividual the given object individual represents
This method updates the fitness of the individual.
- See also:
- getFitness()
- Parameters:
-
pInFitnessAlgorithm | the fitnessalgorithm with which to update the fitness, if NULL it will be tryed to use an existing fitnessalgorithm |
pBestObjectFitness | if given, the fitness of the best individual at creation time (else NULL) |
- See also:
- cIndividualInfo::pFitnessOfBestAtCreationTime
- Returns:
- true if the fitness was changed, else false
Friends And Related Function Documentation
Member Data Documentation
bool enviroment::cIndividual::bDeleteObjectOnDestruction |
|
protected |
the information for the individual
Definition at line 69 of file cIndividual.h.
the information for the individual
Definition at line 64 of file cIndividual.h.
void* enviroment::cIndividual::pObject |
|
protected |
The object which is represented by the individual.
Definition at line 59 of file cIndividual.h.
The documentation for this class was generated from the following file: