Top Description Methods
org.apache.commons.math3.genetics

public Interface CrossoverPolicy

Known Direct Implementers
org.apache.commons.math3.genetics.CycleCrossover, org.apache.commons.math3.genetics.NPointCrossover, org.apache.commons.math3.genetics.OnePointCrossover, org.apache.commons.math3.genetics.OrderedCrossover, org.apache.commons.math3.genetics.UniformCrossover
Imports
org.apache.commons.math3.exception.MathIllegalArgumentException

Policy used to create a pair of new chromosomes by performing a crossover operation on a source pair of chromosomes.
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public ChromosomePair

Returns:

the pair of new chromosomes that resulted from the crossover.
crossover
(Chromosome
the first chromosome.
first
,
Chromosome
the second chromosome.
second
)

Perform a crossover operation on the given chromosomes.

Method Detail

crossoverback to summary
public ChromosomePair crossover(Chromosome first, Chromosome second) throws MathIllegalArgumentException

Perform a crossover operation on the given chromosomes.

Parameters
first:Chromosome

the first chromosome.

second:Chromosome

the second chromosome.

Returns:ChromosomePair

the pair of new chromosomes that resulted from the crossover.

Exceptions
MathIllegalArgumentException:
if the given chromosomes are not compatible with this CrossoverPolicy