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

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

public class ElitistSelectionStrategy
extends SelectionStrategy

See Also:
Serialized Form

Constructor Summary
ElitistSelectionStrategy()
           
ElitistSelectionStrategy(ElitistSelectionStrategy copy)
           
 
Method Summary
 ElitistSelectionStrategy getClone()
          Create a cloned copy of the current object and return it.
 ControlParameter getSelectionPercentage()
          Get the percentage of selection for the elitist selection.
 void performOperation(TopologyHolder holder)
          Perform the selection procedure.
<T extends Entity>
T
select(Topology<T> population)
          Perform an elitist selection.
 void setSelectionPercentage(ControlParameter selectionPercentage)
          Set the percentage for the selection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElitistSelectionStrategy

public ElitistSelectionStrategy()

ElitistSelectionStrategy

public ElitistSelectionStrategy(ElitistSelectionStrategy copy)
Method Detail

getClone

public ElitistSelectionStrategy 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)
Perform an elitist selection. This selection will return the most fit entity within the current Topology. The selected entity is not removed from the topology.

Specified by:
select in class SelectionStrategy
Type Parameters:
T - The generic entity type.
Parameters:
population - The population from which the selections are to be made.
Returns:
The selected entity.

performOperation

public void performOperation(TopologyHolder holder)
Perform the selection procedure. The selection will be made and the resulting selected entities will be placed into the offspring list and effectively removed from the topology. This will result in no modification operators (cross-over or mutation) being applied to these entities.

Parameters:
holder - The TopologyHolder maintaining the various entity collections.

getSelectionPercentage

public ControlParameter getSelectionPercentage()
Get the percentage of selection for the elitist selection.

Returns:
The value of the selection percentage.

setSelectionPercentage

public void setSelectionPercentage(ControlParameter selectionPercentage)
Set the percentage for the selection. The selection should be a percentage.

Parameters:
selectionPercentage - The value to set.


Copyright © 2009 CIRG. All Rights Reserved.