Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.select
Class FitnessTruncationSelector

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.FitnessTruncationSelector
All Implemented Interfaces:
IGeneticOperator, IOperator, IProcessor, java.io.Serializable

public class FitnessTruncationSelector
extends TruncationSelector

Truncation selection by fitness value. This operator selects all individuals that have a better fitness 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  IFitnessComparator comparator
          Fitness comparator.
protected  IFitness threshold
          Threshold fitness value.
 
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
FitnessTruncationSelector()
          Comparator.
FitnessTruncationSelector(int numberPerSelection, IFitness threshold, IFitnessComparator comparator)
          Constructor with number per selection and threshold.
 
Method Summary
 IFitnessComparator getComparator()
          Gets the fitness comparator.
 IFitness getThreshold()
          Gets the threshold.
 void setComparator(IFitnessComparator comparator)
          Sets the fitness comparator.
 void setThreshold(IFitness 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 IFitness threshold
Threshold fitness value.


comparator

protected IFitnessComparator comparator
Fitness comparator.

Constructor Detail

FitnessTruncationSelector

public FitnessTruncationSelector()
Comparator.


FitnessTruncationSelector

public FitnessTruncationSelector(int numberPerSelection,
                                 IFitness threshold,
                                 IFitnessComparator comparator)
Constructor with number per selection and threshold.

Parameters:
numberPerSelection - number of individuals per selection
threshold - threshold fitness value
comparator - fitness 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(IFitness threshold)
Sets the threshold.

Parameters:
threshold - new threshold

getThreshold

public IFitness getThreshold()
Gets the threshold.

Returns:
current threshold

getComparator

public IFitnessComparator getComparator()
Gets the fitness comparator.

Returns:
fitness comparator.

setComparator

public void setComparator(IFitnessComparator comparator)
Sets the fitness comparator.

Parameters:
comparator - fitness 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