Initializes a new instance of the Population class.Namespace: AForge.Genetic
Assembly: AForge.Genetic (in AForge.Genetic.dll) Version: 22.214.171.124 (126.96.36.199)
public Population( int size, IChromosome ancestor, IFitnessFunction fitnessFunction, ISelectionMethod selectionMethod )
- Type: System..::.Int32
Initial size of population.
- Type: AForge.Genetic..::.IChromosome
Ancestor chromosome to use for population creatioin.
- Type: AForge.Genetic..::.IFitnessFunction
Fitness function to use for calculating chromosome's fitness values.
- Type: AForge.Genetic..::.ISelectionMethod
Selection algorithm to use for selection chromosome's to new generation.
Creates new population of specified size. The specified ancestor becomes first member of the population and is used to create other members with same parameters, which were used for ancestor's creation.
|System..::.ArgumentException||Too small population's size was specified. The exception is thrown in the case if size is smaller than 2.|