|   | SimpleGeneFunction Class | 
 Inheritance Hierarchy
Inheritance HierarchyNamespace: Accord.Genetic
 Syntax
SyntaxThe SimpleGeneFunction type exposes the following members.
 Constructors
Constructors| Name | Description | |
|---|---|---|
|  | SimpleGeneFunction(Int32) | 
            Initializes a new instance of the SimpleGeneFunction class.
             | 
|  | SimpleGeneFunction(Int32, GPGeneType) | 
            Initializes a new instance of the SimpleGeneFunction class.
             | 
 Properties
Properties| Name | Description | |
|---|---|---|
|  | ArgumentsCount | 
            Arguments count.
             | 
|  | GeneType | 
            Gene type.
             | 
|  | MaxArgumentsCount | 
            Maximum arguments count.
             | 
 Methods
Methods| Name | Description | |
|---|---|---|
|  | Clone | 
            Clone the gene.
             | 
|  | CreateNew | 
            Creates new gene with random type and value.
             | 
|  | CreateNew(GPGeneType) | 
            Creates new gene with certain type and random value.
             | 
|  | Equals | Determines whether the specified object is equal to the current object.(Inherited from Object.) | 
|  | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) | 
|  | Generate | 
            Randomize gene with random type and value.
             | 
|  | Generate(GPGeneType) | 
             Randomize gene with random value.
              | 
|  | GetHashCode | Serves as the default hash function. (Inherited from Object.) | 
|  | GetType | Gets the Type of the current instance.(Inherited from Object.) | 
|  | MemberwiseClone | Creates a shallow copy of the current Object.(Inherited from Object.) | 
|  | ToString | 
            Get string representation of the gene.
            (Overrides ObjectToString.) | 
 Fields
Fields| Name | Description | |
|---|---|---|
|   | FunctionsCount | 
            Number of different functions supported by the class.
             | 
 Extension Methods
Extension Methods| Name | Description | |
|---|---|---|
|  | HasMethod | 
              Checks whether an object implements a method with the given name.
            (Defined by ExtensionMethods.) | 
|  | IsEqual | 
                Compares two objects for equality, performing an elementwise 
                comparison if the elements are vectors or matrices.
            (Defined by Matrix.) | 
|  | To(Type) | Overloaded. 
              Converts an object into another type, irrespective of whether
              the conversion can be done at compile time or not. This can be
              used to convert generic types to numeric types during runtime.
            (Defined by ExtensionMethods.) | 
|  | ToT | Overloaded. 
              Converts an object into another type, irrespective of whether
              the conversion can be done at compile time or not. This can be
              used to convert generic types to numeric types during runtime.
            (Defined by ExtensionMethods.) | 
 Remarks
RemarksSimple gene function may represent an arithmetic function (+, -, *, /) or an argument to function. This class is used by Genetic Programming (or Gene Expression Programming) chromosomes to build arbitrary expressions with help of genetic operators.
 See Also
See Also