gov.nasa.javaGenes.core
Class Tournament
java.lang.Object
gov.nasa.javaGenes.core.Tournament
- All Implemented Interfaces:
- ChooseParents, java.io.Serializable
- Direct Known Subclasses:
- AntiTournament, TournamentLocal
- public class Tournament
- extends java.lang.Object
- implements ChooseParents
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 |
protected int |
size
|
Method Summary |
int |
getChosenIndex(IntegerInterval range,
Population population)
|
int |
getChosenIndex(Population population)
|
int[] |
getChosenIndices(int[] alreadyChosen,
int number,
IntegerInterval range,
Population population)
|
int[] |
getChosenIndices(int number,
IntegerInterval range,
Population population)
|
int[] |
getChosenIndices(int number,
Population population)
|
int[] |
getParentIndices(int number,
IntegerInterval range,
Population population)
|
int[] |
getParentIndices(int number,
Population population)
|
protected boolean |
shouldChooseSecondOne(Fitness first,
Fitness second)
|
java.lang.String |
toString()
|
protected int |
tournament(int[] indices,
Population population)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
size
protected int size
Tournament
public Tournament(int size)
getParentIndices
public int[] getParentIndices(int number,
Population population)
- Specified by:
getParentIndices
in interface ChooseParents
getParentIndices
public int[] getParentIndices(int number,
IntegerInterval range,
Population population)
- Specified by:
getParentIndices
in interface ChooseParents
getChosenIndex
public int getChosenIndex(Population population)
getChosenIndex
public int getChosenIndex(IntegerInterval range,
Population population)
getChosenIndices
public int[] getChosenIndices(int number,
Population population)
getChosenIndices
public int[] getChosenIndices(int number,
IntegerInterval range,
Population population)
getChosenIndices
public int[] getChosenIndices(int[] alreadyChosen,
int number,
IntegerInterval range,
Population population)
tournament
protected int tournament(int[] indices,
Population population)
shouldChooseSecondOne
protected boolean shouldChooseSecondOne(Fitness first,
Fitness second)
toString
public java.lang.String toString()