Creates new gene with certain type and random value.

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

Syntax

C#
public IGPGene CreateNew(
	GPGeneType type
)

Parameters

type
Type: AForge.Genetic..::.GPGeneType
Gene type to create.

Return Value

[Missing <returns> documentation for M:AForge.Genetic.SimpleGeneFunction.CreateNew(AForge.Genetic.GPGeneType)]

Implements

IGPGene..::.CreateNew(GPGeneType)

Remarks

The method creates new gene with specified type, but random value. The method is useful as factory method for those classes, which work with gene's interface, but not with particular gene class.

See Also