public class DeJongCrowder<T extends Chromosome> extends Crowder<T>
Modifier and Type | Class and Description |
---|---|
static class |
DeJongCrowder.CrossoverMethod
Provides the available crossover methods
|
static class |
DeJongCrowder.MutationMethod
Provides standard mutation methods
|
static class |
DeJongCrowder.SelectionMethod
Provides the available selection methods
|
Operator.Statistics
Modifier and Type | Field and Description |
---|---|
protected int |
crowdingFactor
The crowding factor
|
static DeJongCrowder.CrossoverMethod |
DEFAULT_CROSSOVER_METHOD
The default crossover method
|
static double |
DEFAULT_CROSSOVER_PROBABILITY
The default crossover probability
|
static int |
DEFAULT_CROWDING_FACTOR
The default crowding selectionRate
|
static double |
DEFAULT_MUTATION_PROBABILITY
The default mutation probability
|
static DeJongCrowder.SelectionMethod |
DEFAULT_SELECTION_METHOD
The default selection method
|
protected Selector<T> |
selector
The selctor used
|
random, statistics
biggerIsBetter, fitness, ga
Constructor and Description |
---|
DeJongCrowder(int sr,
int cf)
Creates DeJongCrowder
|
DeJongCrowder(int sr,
int cf,
DeJongCrowder.SelectionMethod selmethod)
Creates DeJongCrowder
|
DeJongCrowder(int sr,
int cf,
DeJongCrowder.SelectionMethod selmethod,
DeJongCrowder.CrossoverMethod crossmethod)
Creates DeJongCrowder
|
DeJongCrowder(int sr,
int cf,
DeJongCrowder.SelectionMethod selmethod,
DeJongCrowder.CrossoverMethod crossmethod,
double crossover,
double mutation)
Creates DeJongCrowder
|
DeJongCrowder(int sr,
int cf,
Selector<T> selector,
AbstractStage<T>... stages)
Creates DeJongCrowder
|
Modifier and Type | Method and Description |
---|---|
int |
getCrowdingFactor()
Returns the crowding factor
|
int |
getSelectionRate()
Returns the selection rate
|
Selector<T> |
getSelector()
Returns the selector
|
protected void |
preselect(Population<T> in,
Population<T> out)
Preselection of individuals before processing.
|
protected void |
replace(Population<T> initial,
Population<T> preselected,
Population<T> evolved,
Population<T> out)
Implements the replacement policy.
|
void |
setBiggerIsBetter(boolean flag,
boolean recursively)
Deprecated.
|
void |
setCrowdingFactor(int cf)
Sets the crouding factor
|
void |
setFitness(Fitness fit,
boolean recursively)
XXX
|
void |
setSelectionRate(int sr)
Sets the selection rate
|
void |
setSelector(Selector<T> selector)
Sets the selector
|
getBody, init, isElitist, process, setElitist, similarity
getStatistics, updateStatistics
dispose, getFitness, isBiggerBetter, isFitnessChanged, setBiggerIsBetter, setFitness
public static final DeJongCrowder.SelectionMethod DEFAULT_SELECTION_METHOD
public static final DeJongCrowder.CrossoverMethod DEFAULT_CROSSOVER_METHOD
public static final double DEFAULT_CROSSOVER_PROBABILITY
public static final double DEFAULT_MUTATION_PROBABILITY
public static final int DEFAULT_CROWDING_FACTOR
protected Selector<T extends Chromosome> selector
protected int crowdingFactor
public DeJongCrowder(int sr, int cf)
sr
- selection ratecf
- crowding ratepublic DeJongCrowder(int sr, int cf, DeJongCrowder.SelectionMethod selmethod)
sr
- selection ratecf
- crowding rateselmethod
- selection methodpublic DeJongCrowder(int sr, int cf, DeJongCrowder.SelectionMethod selmethod, DeJongCrowder.CrossoverMethod crossmethod)
sr
- selection ratecf
- crowding rateselmethod
- selection methodcrossmethod
- crossover methodcrossover
- crossover probabilitypublic DeJongCrowder(int sr, int cf, DeJongCrowder.SelectionMethod selmethod, DeJongCrowder.CrossoverMethod crossmethod, double crossover, double mutation)
sr
- selection ratecf
- crowding rateselmethod
- selection methodcrossmethod
- crossover methodcrossover
- crossover probabilitymutation
- mutation probabilitypublic DeJongCrowder(int sr, int cf, Selector<T> selector, AbstractStage<T>... stages)
sr
- selection ratecf
- crowding rateselector
- selectorstages
- the body stagespublic final int getCrowdingFactor()
public void setCrowdingFactor(int cf)
cf
- crowding factorpublic final int getSelectionRate()
public void setSelectionRate(int sr)
sr
- protected void preselect(Population<T> in, Population<T> out)
Crowder
preselect
in class Crowder<T extends Chromosome>
in
- input populationout
- output populationprotected void replace(Population<T> initial, Population<T> preselected, Population<T> evolved, Population<T> out)
Crowder
replace
in class Crowder<T extends Chromosome>
initial
- - the initial populationpreselected
- - the population resulting from preselectionevolved
- - the part of population that has evolvedout
- - the output population@Deprecated public void setBiggerIsBetter(boolean flag, boolean recursively)
setBiggerIsBetter
in class Crowder<T extends Chromosome>
flag
- true, if the best individual has the higher fitnessrecursively
- true, to propagate this setting down, otherwise false.public void setFitness(Fitness fit, boolean recursively)
setFitness
in class Crowder<T extends Chromosome>
fit
- recursively
-