JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.core
Class AntiTournament

java.lang.Object
  extended bygov.nasa.javaGenes.core.Tournament
      extended bygov.nasa.javaGenes.core.AntiTournament
All Implemented Interfaces:
ChooseForDeath, ChooseParents, java.io.Serializable
Direct Known Subclasses:
AntiTournamentLocal

public class AntiTournament
extends Tournament
implements ChooseForDeath

assumes that the tournament size is usually quite a bit smaller than the index interval from which the indices are chosen

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nasa.javaGenes.core.Tournament
size
 
Constructor Summary
AntiTournament(int size)
           
 
Method Summary
 int getDeathRowIndex(int[] parentIndices, IntegerInterval range, Population population)
           
 int getDeathRowIndex(int[] parentIndices, Population population)
           
protected  boolean shouldChooseSecondOne(Fitness first, Fitness second)
           
 java.lang.String toString()
           
 
Methods inherited from class gov.nasa.javaGenes.core.Tournament
getChosenIndex, getChosenIndex, getChosenIndices, getChosenIndices, getChosenIndices, getParentIndices, getParentIndices, tournament
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AntiTournament

public AntiTournament(int size)
Method Detail

getDeathRowIndex

public int getDeathRowIndex(int[] parentIndices,
                            Population population)
Specified by:
getDeathRowIndex in interface ChooseForDeath

getDeathRowIndex

public int getDeathRowIndex(int[] parentIndices,
                            IntegerInterval range,
                            Population population)
Specified by:
getDeathRowIndex in interface ChooseForDeath

shouldChooseSecondOne

protected boolean shouldChooseSecondOne(Fitness first,
                                        Fitness second)
Overrides:
shouldChooseSecondOne in class Tournament

toString

public java.lang.String toString()
Overrides:
toString in class Tournament

JavaGenes, NASA Ames. Written largely by Al Globus