Manual Reference Pages - ALGORITHM::EVOLUTIONARY::OP::INCMUTATION (3)
Algorithm::Evolutionary::Op::IncMutation - Increments/decrements by one the value of one of the components
of the string, takes into account the char class
<op name=IncMutation type=unary rate=0.5 />
my $ref2 = XMLin($xmlStr2);
my $op2 = Algorithm::Evolutionary::Op::Base->fromXML( $ref2 );
print $op2->asXML(), "\n*Arity ", $op->arity(), "\n";
my $op = new Algorithm::Evolutionary::Op::IncMutation; #Create from scratch
Mutation operator for a GA; changes a single element in a string by
changing it to the next in the sequence deducted from the chromosome
Creates a new mutation operator.
apply( CW$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
my $strChrom = new Algorithm::Evolutionary::Individual::String [a,c,g,t] 10;
my $xmen = new Algorithm::Evolutionary::Op::IncMutation;
$xmen->apply( $strChrom ) # will change acgt into aagt or
# aggt, for instance
Issues an error if there is no _chars array, which is needed for computing the next.
This file is released under the GPL. See the LICENSE file included in this distribution,
or go to http://www.fsf.org/licenses/gpl.txt
CVS Info: $Date: 2011/02/14 06:55:36 $
$Header: /media/Backup/Repos/opeal/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Op/IncMutation.pm,v 3.1 2011/02/14 06:55:36 jmerelo Exp $
$Author: jmerelo $
$Revision: 3.1 $
|perl v5.20.3 ||ALGORITHM::EVOLUTIONARY::OP::INCMUTATION (3) ||2014-10-25 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.