Package org.openjdk.jmh.samples
Class JMHSample_25_API_GA.Population
- java.lang.Object
-
- org.openjdk.jmh.samples.JMHSample_25_API_GA.Population
-
- Enclosing class:
- JMHSample_25_API_GA
public static class JMHSample_25_API_GA.Population extends java.lang.Object
Population.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<JMHSample_25_API_GA.Chromosome>
list
-
Constructor Summary
Constructors Constructor Description Population()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChromosome(JMHSample_25_API_GA.Chromosome c)
java.util.List<JMHSample_25_API_GA.Chromosome>
getAll()
JMHSample_25_API_GA.Chromosome
selectToBreed()
Select the breeding material.int
size()
-
-
-
Field Detail
-
list
private final java.util.List<JMHSample_25_API_GA.Chromosome> list
-
-
Method Detail
-
addChromosome
public void addChromosome(JMHSample_25_API_GA.Chromosome c)
-
selectToBreed
public JMHSample_25_API_GA.Chromosome selectToBreed()
Select the breeding material. Solutions with better score have better chance to be selected.- Returns:
- breed
-
size
public int size()
-
getAll
public java.util.List<JMHSample_25_API_GA.Chromosome> getAll()
-
-