|
Evolvica Core API Version 0.6.2 Last Modified: June 29 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.evolvica.engine.AbstractOperator
org.evolvica.core.common.AbstractGeneticOperator
org.evolvica.core.select.AbstractSelector
org.evolvica.core.select.RouletteWheelSelector
Roulette Wheel Selection.
Field Summary | |
protected float[] |
bounds
Array with line segments. |
Fields inherited from class org.evolvica.core.select.AbstractSelector |
allowMultipleSelection, numberPerSelection |
Fields inherited from class org.evolvica.engine.AbstractOperator |
descriptor, element, id, name |
Constructor Summary | |
RouletteWheelSelector()
Constructor. |
|
RouletteWheelSelector(int numberPerSelection)
Constructor with number per selection. |
Method Summary | |
IIndividual[] |
select(IIndividual[] pool)
Selects individuals out of a given selection pool. |
protected void |
setupLineArray(IIndividual[] pool)
Sets up the array of selection propabilities. |
protected int |
spinWheel(IIndividual[] pool)
Spins the roulette wheel and returns the diced number. |
protected float |
totalFitness(IIndividual[] pool)
Helper for adding all fitness values of the collection. |
Methods inherited from class org.evolvica.core.select.AbstractSelector |
getNumberPerSelection, process, setNumberPerSelection |
Methods inherited from class org.evolvica.engine.AbstractOperator |
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.evolvica.engine.IOperator |
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName |
Field Detail |
protected float[] bounds
Constructor Detail |
public RouletteWheelSelector()
public RouletteWheelSelector(int numberPerSelection)
numberPerSelection
- number of individuals per selectionMethod Detail |
public IIndividual[] select(IIndividual[] pool)
AbstractSelector
select
in class AbstractSelector
pool
- selection pool
AbstractSelector.select(org.evolvica.core.IIndividual[])
protected void setupLineArray(IIndividual[] pool)
pool
- selection poolprotected int spinWheel(IIndividual[] pool)
pool
- selection pool
protected float totalFitness(IIndividual[] pool)
pool
- selection pool
|
Evolvica Core API Version 0.6.2 Last Modified: June 29 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |