MutationOne - BitFlip mutation
my $xmlStr2=<<EOC; <op name='MutationOne' type='unary' rate='0.5' /> EOC my $ref2 = XMLin($xmlStr2);
my $op2 = OpBase->fromXML( $ref2 ); print $op2->asXML(), "\n*Arity ", $op->arity(), "\n";
my $op = new MutationOne; #Create from scratch
Mutation operator for a GA; changes a single bit in the bitstring; does not need a rate
Creates a new mutation operator.
Applies mutation operator to a ``Chromosome'', a bitstring, really. Can be
applied only to victims with the
_str instance variable; but
it checks before application that both operands are of type
Prints as XML, following the EvoSpec 0.2 XML specification. Should be called from derived classes, not by itself.
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: 2001/11/27 13:22:58 $ $Header: /cvsroot/opeal/opeal/MutationOne.pm,v 1.5 2001/11/27 13:22:58 jmerelo Exp $ $Author: jmerelo $ $Revision: 1.5 $