MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
|
The default fitness comparer. More...
Public Member Functions | |
CGreaterFitterComparer (CConfiguration configuration) | |
Creates the default fitness comparer. | |
int | Compare (IChromosome x, IChromosome y) |
Compares the two specified individuals and returns -1, if y is fitter; 1 if x is fitter, and 0 otherway. |
The default fitness comparer.
The greater the fitness score of an individual the fitter its status.
MCScheduling.GeneticAlgorithm.CConfiguration.CGreaterFitterComparer.CGreaterFitterComparer | ( | CConfiguration | configuration | ) |
Creates the default fitness comparer.
The configuration is used for its tolerance property.
configuration | The configuration of the genetic algorithm that uses this comparer. |
int MCScheduling.GeneticAlgorithm.CConfiguration.CGreaterFitterComparer.Compare | ( | IChromosome | x, |
IChromosome | y | ||
) |
Compares the two specified individuals and returns -1, if y is fitter; 1 if x is fitter, and 0 otherway.
The fitter individual is that with greater fitness score.
x | The first individual to be compared. |
y | The second individual to be compared. |
Implements MCScheduling.GeneticAlgorithm.IFitnessComparer.