|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.util.selection.recipes.RouletteWheelSelection<E>
E
- The selection type.public class RouletteWheelSelection<E extends Comparable>
A recipe for Roulette wheel selection.
Roulette wheel selection is performed by:
Constructor Summary | |
---|---|
RouletteWheelSelection()
Create a new instance. |
|
RouletteWheelSelection(RouletteWheelSelection copy)
Create a copy of the provided instance. |
|
RouletteWheelSelection(Weighing<E> weighing)
Create a new instance with the provided weighing strategy. |
|
RouletteWheelSelection(Weighing<E> weighing,
Random random)
|
Method Summary | |
---|---|
RouletteWheelSelection |
getClone()
Create a cloned copy of the current object and return it. |
Weighing<E> |
getWeighing()
Get the current weighing strategy. |
E |
select(List<? extends E> elements)
Perform the selection process. |
void |
setWeighing(Weighing<E> weighing)
Set the weighing strategy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RouletteWheelSelection()
public RouletteWheelSelection(Weighing<E> weighing)
weighing
- The weighing strategy to set.public RouletteWheelSelection(Weighing<E> weighing, Random random)
public RouletteWheelSelection(RouletteWheelSelection copy)
copy
- The instance to copy.Method Detail |
---|
public RouletteWheelSelection getClone()
getClone
in interface Cloneable
getClone
in interface SelectionRecipe<E extends Comparable>
Object.clone()
public void setWeighing(Weighing<E> weighing)
weighing
- The strategy to set.public Weighing<E> getWeighing()
public E select(List<? extends E> elements)
select
in interface SelectionRecipe<E extends Comparable>
elements
- The elements to perfrom the selection on.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |