MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
Public Member Functions | Protected Member Functions
MCScheduling.GeneticAlgorithm.CBaseCrossoverOperator Class Reference

A base class for implementation of a crossover genetic operator. More...

Inheritance diagram for MCScheduling.GeneticAlgorithm.CBaseCrossoverOperator:
MCScheduling.GeneticAlgorithm.CGeneticOperator MCScheduling.GeneticAlgorithm.ICrossoverOperator MCScheduling.GeneticAlgorithm.CAlternatingPositionCrossover MCScheduling.GeneticAlgorithm.CCycleCrossover MCScheduling.GeneticAlgorithm.CGreedyCrossover MCScheduling.GeneticAlgorithm.CHeuristicCrossover MCScheduling.GeneticAlgorithm.COrderBasedCrossover MCScheduling.GeneticAlgorithm.COrderCrossover MCScheduling.GeneticAlgorithm.CPartiallyMappedCrossover MCScheduling.GeneticAlgorithm.CPositionBasedCrossover

List of all members.

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.

Detailed Description

A base class for implementation of a crossover genetic operator.


Constructor & Destructor Documentation

MCScheduling.GeneticAlgorithm.CBaseCrossoverOperator.CBaseCrossoverOperator ( CConfiguration  configuration,
double  crossoverRate 
) [protected]

Instantiates the base crossover operator.

Parameters:
configurationThe configuration of the genetic algorithm that will utilize this operator.
crossoverRateThe crossover rate for this operator.
Exceptions:
NullReferenceExceptionIf confuguration is null.
ArgumentOutOfRangeExceptionIf crossoverRate is not in 0.0 and 1.0 range.

Member Function Documentation

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.

Parameters:
daddyThe first chromosome entering into the crossover.
mommyThe second chromosome entering into the crossover.
populationThe 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.

Returns:
The mutation rate.
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.

Parameters:
crossoverRateThe mutation rate to be set.
Exceptions:
ArgumentOutOfRangeExceptionIf crossoverRate is not in 0.0 and 1.0 range.
bool MCScheduling.GeneticAlgorithm.CBaseCrossoverOperator.shouldPerformCrossover ( )

Determines whether the crossover should be performed.

Returns:
True if the crossover should be performed by this operator, otherwise, false.
 All Classes Namespaces Functions Variables Properties