org.jgap.impl
Class FittestPopulationMerger
- java.lang.Object
-
- org.jgap.impl.FittestPopulationMerger
-
- All Implemented Interfaces:
- IPopulationMerger
public class FittestPopulationMerger extends java.lang.Object implements IPopulationMerger
A implementation of the IPopulationMerger interface that merges two populations as specified based on the fitness function, that is, the n fittest chromosomes are returned in the new population, where n is supplied by parameter.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor and Description FittestPopulationMerger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description PopulationmergePopulations(Population a_population1, Population a_population2, int a_new_population_size)Merges two populations into one that has the given size.
-
-
-
Method Detail
-
mergePopulations
public Population mergePopulations(Population a_population1, Population a_population2, int a_new_population_size)
Description copied from interface:IPopulationMergerMerges two populations into one that has the given size.- Specified by:
mergePopulationsin interfaceIPopulationMerger- Parameters:
a_population1- first populationa_population2- second populationa_new_population_size- size of merged population- Returns:
- the resulting population
-
-
DMelt 3.0 © DataMelt by jWork.ORG