Inverts the DNA of the individual. Inversion for genetic algorithms means flipping the bits of the chromosome. For genetic programs, inversion means a point mutation (replacing a node with another node of the same arity in the tree).
Note that inversion is not guaranteed to occur but is dependent on the
InversionProbability. The function calls the
OnInversion event and then DoInvert method.
The Invert method is called by the Reproduce method. The function returns true if inversion occurred.