|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.yale.operator.features.aggregation.AggregationCrossover
public class AggregationCrossover
Performs a usual GA crossover on integer arrays. Supports one-point and uniform crossover.
| Field Summary | |
|---|---|
static int |
CROSSOVER_ONE_POINT
Indicates a one-point crossover type. |
static java.lang.String[] |
CROSSOVER_TYPES
The names for the crossover types. |
static int |
CROSSOVER_UNIFORM
Indicates a uniform crossover type. |
private double |
crossoverProb
The crossover probability. |
private int |
crossoverType
The crossover type. |
private java.util.Random |
random
|
| Constructor Summary | |
|---|---|
AggregationCrossover(int type,
double probability,
java.util.Random random)
Creates a new aggregation crossover operator. |
|
| Method Summary | |
|---|---|
private void |
crossover(int[] individual1,
int[] individual2)
Changes the individual. |
void |
crossover(java.util.List<AggregationIndividual> population)
Randomly selects parents from the population and performs crossover. |
private boolean |
isValid(int[] individual)
Checks if at least one feature is selected. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String[] CROSSOVER_TYPES
public static final int CROSSOVER_ONE_POINT
public static final int CROSSOVER_UNIFORM
private int crossoverType
private double crossoverProb
private java.util.Random random
| Constructor Detail |
|---|
public AggregationCrossover(int type,
double probability,
java.util.Random random)
| Method Detail |
|---|
private boolean isValid(int[] individual)
public void crossover(java.util.List<AggregationIndividual> population)
private void crossover(int[] individual1,
int[] individual2)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||