Enum Class Crossover
- All Implemented Interfaces:
Serializable, Comparable<Crossover>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSingle point crossover.Two point crossover.Uniform crossover - bits are randomly copied from the first or from the second parent. -
Method Summary
Modifier and TypeMethodDescriptionabstract BitString[]Returns a pair of offsprings by crossovering parent chromosomes.static CrossoverReturns the enum constant of this class with the specified name.static Crossover[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SINGLE_POINT
Single point crossover. A random crossover point is selected. The binary string from beginning of chromosome to the crossover point is copied from one parent. The rest is copied from the second parent. -
TWO_POINT
Two point crossover. Two random crossover points are selected. The binary string from beginning of chromosome to the first crossover point is copied from one parent. The part from the first to the second crossover point is copied from the second parent. The rest is copied from the first parent. -
UNIFORM
Uniform crossover - bits are randomly copied from the first or from the second parent.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
apply
-