![]() |
![]()
| ![]() |
![]()
NAMEAlgorithm::Evolutionary::Op::IncMutation - Increments/decrements
by one the value of one of the components
SYNOPSISmy $op = new Algorithm::Evolutionary::Op::IncMutation; #Create from scratch Base ClassAlgorithm::Evolutionary::Op::Base DESCRIPTIONMutation operator for a GA; changes a single element in a string by changing it to the next in the sequence deducted from the chromosome itself. create()Creates a new mutation operator. apply( $indiv )Applies mutation operator to a "Chromosome", a string,
really. Can be applied only to victims with the
"_str" instance variable; but it checks
before application that both operands are of the required type. The chosen
character is changed to the next or previous in the array of chars used for
coding the the string
Issues an error if there is no "_chars" array, which is needed for computing the next. CopyrightThis file is released under the GPL. See the LICENSE file included in this distribution, or go to http://www.fsf.org/licenses/gpl.txt
|