AForge.Genetic.SimpleGeneFunction.SimpleGeneFunction C# (CSharp) Метод

SimpleGeneFunction() публичный Метод

Initializes a new instance of the SimpleGeneFunction class.

The constructor creates randomly initialized gene with random value and preset gene type.

public SimpleGeneFunction ( int variablesCount, GPGeneType type ) : System
variablesCount int Total amount of variables in the task which is supposed /// to be solved.
type GPGeneType Gene type to set.
Результат System
        public SimpleGeneFunction( int variablesCount, GPGeneType type )
        {
            this.variablesCount = variablesCount;
            // generate the gene value
            Generate( type );
        }

Same methods

SimpleGeneFunction::SimpleGeneFunction ( int variablesCount ) : System
SimpleGeneFunction::SimpleGeneFunction ( int variablesCount, bool random ) : System