Ejemplo n.º 1
0
        /// <summary>
        /// Clone the gene.
        /// </summary>
        ///
        /// <remarks><para>The method clones the chromosome returning the exact copy of it.</para></remarks>
        ///
        public IGPGene Clone( )
        {
            // create new gene ...
            ExtendedGeneFunction clone = new ExtendedGeneFunction(variablesCount, false);

            // ... with the same type and value
            clone.type           = type;
            clone.val            = val;
            clone.argumentsCount = argumentsCount;

            return(clone);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Clone the gene.
        /// </summary>
        /// 
        /// <remarks><para>The method clones the chromosome returning the exact copy of it.</para></remarks>
        /// 
        public IGPGene Clone( )
        {
            // create new gene ...
            ExtendedGeneFunction clone = new ExtendedGeneFunction( variablesCount, false );
            // ... with the same type and value
            clone.type = type;
            clone.val  = val;
            clone.argumentsCount = argumentsCount;

            return clone;
        }