net.sourceforge.cilib.entity.operators.selection
Class RouletteWheelSelectionStrategy

java.lang.Object
  extended by net.sourceforge.cilib.entity.operators.selection.SelectionStrategy
      extended by net.sourceforge.cilib.entity.operators.selection.RouletteWheelSelectionStrategy
All Implemented Interfaces:
Serializable, Operator, Cloneable

public class RouletteWheelSelectionStrategy
extends SelectionStrategy

This class implements Roulette Wheel selection, also known as proportionate selection. The probability of selecting an Entity is equal to the ratio of its fitness to the sum total of the fitness of all the Entitys in the population.

This method of selection is not particularly useful if a single solution has very high fitness as compared to the rest. This results in selecting the fittest solution every time we make a selection.

Author:
Vikash Ranjan Parida
See Also:
Serialized Form

Constructor Summary
RouletteWheelSelectionStrategy()
          Create an instance of the RouletteWheelSelectionStrategy.
RouletteWheelSelectionStrategy(RouletteWheelSelectionStrategy copy)
          Create a copy of the provided instance.
 
Method Summary
 SelectionStrategy getClone()
          Create a cloned copy of the current object and return it.
 void performOperation(TopologyHolder holder)
          Perform the operator operation given the current TopologyHolder.
<T extends Entity>
T
select(Topology<T> population)
          Apply the selection strategy and return a single Entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RouletteWheelSelectionStrategy

public RouletteWheelSelectionStrategy()
Create an instance of the RouletteWheelSelectionStrategy.


RouletteWheelSelectionStrategy

public RouletteWheelSelectionStrategy(RouletteWheelSelectionStrategy copy)
Create a copy of the provided instance.

Parameters:
copy - The instance to copy.
Method Detail

getClone

public SelectionStrategy getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Operator
Specified by:
getClone in interface Cloneable
Specified by:
getClone in class SelectionStrategy
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

select

public <T extends Entity> T select(Topology<T> population)
Apply the selection strategy and return a single Entity.

Specified by:
select in class SelectionStrategy
Type Parameters:
T - The Entity type.
Parameters:
population - The Topology to make the selection from.
Returns:
The selected Entity.

performOperation

public void performOperation(TopologyHolder holder)
Perform the operator operation given the current TopologyHolder.

Parameters:
holder - The TopologyHolder representing the required Topology instances.


Copyright © 2009 CIRG. All Rights Reserved.