NAME

  Algorithm::Evolutionary::Op::Bitflip - BitFlip mutation


SYNOPSIS

  my $xmlStr2=<<EOC; #howMany should be integer
  <op name='Bitflip' type='unary' rate='0.5' >
    <param name='howMany' value='2' /> 
  </op>
  EOC
  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::Bitflip 2; #Create from scratch with default rate


Base Class

Algorithm::Evolutionary::Op::Base


DESCRIPTION

Mutation operator for a GA; changes a single bit in the bitstring; does not need a rate


METHODS

create

Creates a new mutation operator.

apply

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 BitString.


Copyright


  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: 2002/07/26 07:14:56 $ 
  $Header: /cvsroot/opeal/opeal/Algorithm/Evolutionary/Op/Bitflip.pm,v 1.4 2002/07/26 07:14:56 jmerelo Exp $ 
  $Author: jmerelo $ 
  $Revision: 1.4 $
  $Name $