Enum Constant and Description |
---|
SINGLE_POINT
Single point crossover - one crossover point is selected, 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 crossover point are selected, 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 and the rest is copied from
the first parent.
|
UNIFORM
Uniform crossover - bits are randomly copied from the first or from
the second parent.
|
Modifier and Type | Method and Description |
---|---|
abstract BitString[] |
apply(BitString father,
BitString mother)
Returns a pair of offsprings by crossovering parent chromosomes.
|
static Crossover |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Crossover[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Crossover SINGLE_POINT
public static final Crossover TWO_POINT
public static final Crossover UNIFORM
public static Crossover[] values()
for (Crossover c : Crossover.values()) System.out.println(c);
public static Crossover valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null