Compares the two individuals and returns an evaluation of who is fitter. If the result is -1, Parent1 is fitter. If the result is 1, Parent2 is fitter. If the two individuals are equally fit, the function returns 0.
The function uses the RSGeneticBase.TRSIndividual.Fitness property or RSGeneticBase.TRSIndividual.WeightedFitness to determine which parent is fitter. The FitnessMethod controls the interpretation of the fitness.
The UsePureFitness parameter tells the function if it should ignore WeightedFitness or not.
Namespace: RSGeneticBase
Delphi |
public |
Parameters
Parent1
Type: TRSIndividual
Parent2
Type: TRSIndividual
UsePureFitness
Type: Boolean
Type: Integer
Reference |