Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.select
Class ScoreTruncationSelector

java.lang.Object
  extended byorg.evolvica.engine.AbstractOperator
      extended byorg.evolvica.core.common.AbstractGeneticOperator
          extended byorg.evolvica.core.select.AbstractSelector
              extended byorg.evolvica.core.select.TruncationSelector
                  extended byorg.evolvica.core.select.ScoreTruncationSelector
All Implemented Interfaces:
IGeneticOperator, IOperator, IProcessor, java.io.Serializable

public class ScoreTruncationSelector
extends TruncationSelector

Truncation selection by score. This operator selects all individuals that have a better score than the given threshold.

Since:
0.4.0
Version:
$Revision: 1.8 $ $Date: 2004/05/26 11:58:17 $
Author:
Andreas Rummler
See Also:
Serialized Form

Field Summary
protected  IScoreComparator comparator
          Score comparator.
protected  IScore threshold
          Score threshold.
 
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
ScoreTruncationSelector()
          Constructor.
ScoreTruncationSelector(int numberPerSelection, IScore threshold, IScoreComparator comparator)
          Constructor with number per selection and threshold.
 
Method Summary
 IScoreComparator getComparator()
          Gets the comparator.
 IScore getThreshold()
          Gets the threshold.
 void setComparator(IScoreComparator comparator)
          Sets the comparator.
 void setThreshold(IScore threshold)
          Sets the threshold.
protected  int threshold(IIndividual[] pool)
          Calculates the truncation threshold.
 
Methods inherited from class org.evolvica.core.select.TruncationSelector
select
 
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

threshold

protected IScore threshold
Score threshold.


comparator

protected IScoreComparator comparator
Score comparator.

Constructor Detail

ScoreTruncationSelector

public ScoreTruncationSelector()
Constructor.


ScoreTruncationSelector

public ScoreTruncationSelector(int numberPerSelection,
                               IScore threshold,
                               IScoreComparator comparator)
Constructor with number per selection and threshold.

Parameters:
numberPerSelection - number of individuals per selection
threshold - threshold score
comparator - score comparator
Method Detail

threshold

protected int threshold(IIndividual[] pool)
Description copied from class: TruncationSelector
Calculates the truncation threshold.

Specified by:
threshold in class TruncationSelector
Parameters:
pool - selection pool.
Returns:
truncation threshold
See Also:
TruncationSelector.threshold(org.evolvica.core.IIndividual[])

setThreshold

public void setThreshold(IScore threshold)
Sets the threshold.

Parameters:
threshold - new threshold

getThreshold

public IScore getThreshold()
Gets the threshold.

Returns:
current threshold

getComparator

public IScoreComparator getComparator()
Gets the comparator.

Returns:
current comparator

setComparator

public void setComparator(IScoreComparator comparator)
Sets the comparator.

Parameters:
comparator - new comparator

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems