Perform migration between two populations.
Namespace:
AForge.GeneticAssembly: AForge.Genetic (in AForge.Genetic.dll) Version: 2.2.4.0 (2.2.4.0)
Syntax
| C# |
|---|
public void Migrate( Population anotherPopulation, int numberOfMigrants, ISelectionMethod migrantsSelector ) |
Parameters
- anotherPopulation
- Type: AForge.Genetic..::.Population
Population to do migration with.
- numberOfMigrants
- Type: System..::.Int32
Number of chromosomes from each population to migrate.
- migrantsSelector
- Type: AForge.Genetic..::.ISelectionMethod
Selection algorithm used to select chromosomes to migrate.
Remarks
The method performs migration between two populations – current and the anotherPopulation. During migration numberOfMigrants of chromosomes is choosen from each population using migrantsSelector and put into another population replacing worst members there.