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

ToString() public method

Get string representation of the gene.
public ToString ( ) : string
return string
        public override string ToString( )
        {
            if ( type == GPGeneType.Function )
            {
                // get function string representation
                switch ( (Functions) val )
                {
                    case Functions.Add:			// addition
                        return "+";

                    case Functions.Subtract:	// subtraction
                        return "-";

                    case Functions.Multiply:	// multiplication
                        return "*";

                    case Functions.Divide:		// division
                        return "/";
                }
            }

            // get argument string representation
            return string.Format( "${0}", val );
        }