…lines 1–44 unchanged (44 lines)
45 * @throws OutOfRangeException if the elitism rate is outside the [0, 1] range
46 */
47 public ElitisticListPopulation(final List<Chromosome> chromosomes,
48 final int populationLimit,
49 final double elitismRate) {
50 super(chromosomes, populationLimit);
51 this.elitismRate = elitismRate;
52 }
53
54 /**
55 * Creates a new ListPopulation instance and initializes its inner
56 * chromosome list.
57 *
58 * @param populationLimit maximal size of the population
59 * @param elitismRate how many best chromosomes will be directly transferred to the
60 * next generation [in %]
61 * @throws OutOfRangeException if the elitism rate is outside the [0, 1] range
62 */
63 public ElitisticListPopulation(final int populationLimit, final double elitismRate) {
64 super(populationLimit);
65 this.elitismRate = elitismRate;
66 }
67
68 /**
69 * Start the population for the next generation. The <code>{@link #elitismRate}</code>
70 * percents of the best chromosomes are directly copied to the next generation.
71 *
…lines 72–113 unchanged (42 lines)