AForge.Genetic.SimpleGeneFunction.CreateNew C# (CSharp) Method

CreateNew() public method

Creates new gene with certain type and random value.

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.

public CreateNew ( GPGeneType type ) : IGPGene
type GPGeneType Gene type to create.
return IGPGene
        public IGPGene CreateNew( GPGeneType type )
        {
            return new SimpleGeneFunction( variablesCount, type );
        }
    }

Same methods

SimpleGeneFunction::CreateNew ( ) : IGPGene