Catalano.Evolutionary.Genetic.Selection
Class TournamentSelection
- java.lang.Object
-
- Catalano.Evolutionary.Genetic.Selection.TournamentSelection
-
- All Implemented Interfaces:
- ISelection
public class TournamentSelection extends java.lang.Object implements ISelection
Tournament Selection.
-
-
Constructor Summary
Constructors Constructor and Description TournamentSelection()Initializes a new instance of the TournamentSelection class.TournamentSelection(int k)Initializes a new instance of the TournamentSelection class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int[]Compute(java.util.List<IChromosome> chromosomes)Selection operator.intgetK()Get Number of individuals.voidsetK(int k)Set Number of individuals.
-
-
-
Constructor Detail
-
TournamentSelection
public TournamentSelection()
Initializes a new instance of the TournamentSelection class.
-
TournamentSelection
public TournamentSelection(int k)
Initializes a new instance of the TournamentSelection class.- Parameters:
k- Number of individuals
-
-
Method Detail
-
getK
public int getK()
Get Number of individuals.- Returns:
- Number of indviduals.
-
setK
public void setK(int k)
Set Number of individuals.- Parameters:
k- Number of individuals.
-
Compute
public int[] Compute(java.util.List<IChromosome> chromosomes)
Description copied from interface:ISelectionSelection operator.- Specified by:
Computein interfaceISelection- Parameters:
chromosomes- Chromosomes.- Returns:
- Selected chromosomes.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG