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
- Author:
- Henrique Goulart
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FittestPopulationMerger
public FittestPopulationMerger()
mergePopulations
public Population mergePopulations(Population a_population1,
Population a_population2,
int a_new_population_size)
- Description copied from interface:
IPopulationMerger
- Merges two Population's into one that has the given size.
- Specified by:
mergePopulations in interface IPopulationMerger
- Parameters:
a_population1 - Population first Populationa_population2 - Population second Populationa_new_population_size - int size of merged Population
- Returns:
- Population the resulting Population