MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
|
A base class for implementation of a crossover genetic operator. More...
Public Member Functions | |
double | getCrossoverRate () |
Returns the mutation rate used by this operator. | |
void | setCrossoverRate (double crossoverRate) |
Sets the mutation rate for this operator. | |
bool | shouldPerformCrossover () |
Determines whether the crossover should be performed. | |
abstract void | apply (IChromosome daddy, IChromosome mommy, CPopulation population) |
Crossovers the specified couple of chromosomes in a operator-specific way forming a new chromosomes, who should be added to the specified population. | |
Protected Member Functions | |
CBaseCrossoverOperator (CConfiguration configuration, double crossoverRate) | |
Instantiates the base crossover operator. |
A base class for implementation of a crossover genetic operator.
MCScheduling.GeneticAlgorithm.CBaseCrossoverOperator.CBaseCrossoverOperator | ( | CConfiguration | configuration, |
double | crossoverRate | ||
) | [protected] |
Instantiates the base crossover operator.
configuration | The configuration of the genetic algorithm that will utilize this operator. |
crossoverRate | The crossover rate for this operator. |
NullReferenceException | If confuguration is null. |
ArgumentOutOfRangeException | If crossoverRate is not in 0.0 and 1.0 range. |
abstract void MCScheduling.GeneticAlgorithm.CBaseCrossoverOperator.apply | ( | IChromosome | daddy, |
IChromosome | mommy, | ||
CPopulation | population | ||
) | [pure virtual] |
Crossovers the specified couple of chromosomes in a operator-specific way forming a new chromosomes, who should be added to the specified population.
daddy | The first chromosome entering into the crossover. |
mommy | The second chromosome entering into the crossover. |
population | The population for the next generation. It may contain some chromosomes that have been already chosen for the next generation. |
Implements MCScheduling.GeneticAlgorithm.ICrossoverOperator.
Implemented in MCScheduling.GeneticAlgorithm.CAlternatingPositionCrossover, MCScheduling.GeneticAlgorithm.CCycleCrossover, MCScheduling.GeneticAlgorithm.CGreedyCrossover, MCScheduling.GeneticAlgorithm.CHeuristicCrossover, MCScheduling.GeneticAlgorithm.COrderBasedCrossover, MCScheduling.GeneticAlgorithm.COrderCrossover, MCScheduling.GeneticAlgorithm.CPartiallyMappedCrossover, and MCScheduling.GeneticAlgorithm.CPositionBasedCrossover.
double MCScheduling.GeneticAlgorithm.CBaseCrossoverOperator.getCrossoverRate | ( | ) |
Returns the mutation rate used by this operator.
void MCScheduling.GeneticAlgorithm.CBaseCrossoverOperator.setCrossoverRate | ( | double | crossoverRate | ) |
Sets the mutation rate for this operator.
The crossoverRate is expected to be decimal value between 0.0 and 1.0 inclusive.
crossoverRate | The mutation rate to be set. |
ArgumentOutOfRangeException | If crossoverRate is not in 0.0 and 1.0 range. |
bool MCScheduling.GeneticAlgorithm.CBaseCrossoverOperator.shouldPerformCrossover | ( | ) |
Determines whether the crossover should be performed.