|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectOperator.Operations.SelectionOperation
Operator.Operations.RouletteWheel
public abstract class RouletteWheel
This is an abstract class for creating Roulette wheel selection methods with different distributions
| Field Summary | |
|---|---|
protected double[] |
accProbs
|
protected double |
minFit
|
protected RandomNumberGenerator |
rng
|
protected boolean |
smallFit
|
protected double |
sumFit
|
| Fields inherited from class Operator.Operations.SelectionOperation |
|---|
selectedPopulation, size |
| Constructor Summary | |
|---|---|
RouletteWheel()
New instance |
|
RouletteWheel(int size,
RandomNumberGenerator rng)
|
|
| Method Summary | |
|---|---|
protected abstract void |
calculateAccumulatedFitnessProbabilities(java.util.List<Individual> operands)
|
protected void |
calculateFitnessSum(java.util.List<Individual> c)
Calculate the fitness sum. |
void |
doOperation(Individual operand)
Performs the operation on an operand |
void |
doOperation(java.util.List<Individual> operands)
Performs the operation on the list passed |
RandomNumberGenerator |
getRNG()
Get the number generator |
void |
rankPopulation(java.util.List<Individual> operands)
Rank the population |
void |
setProperties(java.util.Properties p)
Set properties |
void |
setRNG(RandomNumberGenerator m)
Set the number generator |
protected void |
spinRoulette(java.util.List<Individual> operands)
Selects Indivudals from operand and adds to the selected population until the selected population is full. |
| Methods inherited from class Operator.Operations.SelectionOperation |
|---|
getSelectedPopulation, getSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RandomNumberGenerator rng
protected double minFit
protected double sumFit
protected boolean smallFit
protected double[] accProbs
| Constructor Detail |
|---|
public RouletteWheel(int size,
RandomNumberGenerator rng)
public RouletteWheel()
| Method Detail |
|---|
public void setProperties(java.util.Properties p)
SelectionOperation
setProperties in interface ParameterIsetProperties in class SelectionOperationp - object containing propertiespublic void doOperation(Individual operand)
Operation
doOperation in interface OperationdoOperation in class SelectionOperationoperand - operand to perform operation onpublic void doOperation(java.util.List<Individual> operands)
Operation
doOperation in interface OperationdoOperation in class SelectionOperationoperands - operands to be operated onpublic void rankPopulation(java.util.List<Individual> operands)
operands - populationprotected void spinRoulette(java.util.List<Individual> operands)
operands - Individuals to be chosen formprotected abstract void calculateAccumulatedFitnessProbabilities(java.util.List<Individual> operands)
protected void calculateFitnessSum(java.util.List<Individual> c)
c - List of individuals which fitness is taken into accountpublic RandomNumberGenerator getRNG()
Stochastic
getRNG in interface Stochasticpublic void setRNG(RandomNumberGenerator m)
Stochastic
setRNG in interface Stochasticm - number generator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||