Swap parts of two chromosomes.

Namespace:  AForge.Genetic
Assembly:  AForge.Genetic (in AForge.Genetic.dll) Version: 2.2.4.0 (2.2.4.0)

Syntax

C#
protected static void Recombine(
	IGPGene[] src1,
	IGPGene[] src2,
	int point,
	int length
)

Parameters

src1
Type: array< AForge.Genetic..::.IGPGene >[]()[]
First chromosome participating in genes' interchange.
src2
Type: array< AForge.Genetic..::.IGPGene >[]()[]
Second chromosome participating in genes' interchange.
point
Type: System..::.Int32
Index of the first gene in the interchange sequence.
length
Type: System..::.Int32
Length of the interchange sequence - number of genes to interchange.

Remarks

The method performs interchanging of genes between two chromosomes starting from the point position.

See Also