View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
J. J. Merelo-Guervós > Algorithm-Evolutionary-0.79_1 > Algorithm::Evolutionary::Op::Bitflip

Download:
Algorithm-Evolutionary-0.79_1.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 3.3   Source   Latest Release: Algorithm-Evolutionary-0.80

NAME ^

Algorithm::Evolutionary::Op::Bitflip - Bit-flip 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 ^

new( [$how_many] [,$priority] )

Creates a new mutation operator with a bitflip application rate, which defaults to 0.5, and an operator application rate (general for all ops), which defaults to 1.

create()

Creates a new mutation operator.

apply( $chromosome )

Applies mutation operator to a "Chromosome", a bitstring, really. Can be applied only to victims composed of [0,1] atoms, independently of representation; but it checks before application that the operand is 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: 2011/02/13 17:45:53 $ 
  $Header: /media/Backup/Repos/opeal/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Op/Bitflip.pm,v 3.3 2011/02/13 17:45:53 jmerelo Exp $ 
  $Author: jmerelo $ 
  $Revision: 3.3 $
  $Name $
syntax highlighting: