AForge.Genetic.GPCustomTree.GPCustomTree C# (CSharp) Method

GPCustomTree() public method

Initializes a new instance of the GPTreeChromosome class.

This constructor creates a randomly generated genetic tree, which has all genes of the same type and properties as the specified ancestor.

public GPCustomTree ( NoteGene ancestor ) : System
ancestor NoteGene A gene, which is used as generator for the genetic tree.
return System
        public GPCustomTree(NoteGene ancestor)
        {
            // make the ancestor gene to be as temporary root of the tree
            root.Gene = ancestor.Clone();
            // call tree regeneration function
            Generate();
        }

Same methods

GPCustomTree::GPCustomTree ( GPCustomTree source ) : System