NAME

  ChangeLengthMutation - Increases/decreases by one the length of the string


SYNOPSIS

  my $xmlStr2=<<EOC;
  <op name='ChangeLengthMutation' 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 ChangeLengthMutation; #Create from scratch


Base Class

OpBase


DESCRIPTION

Mutation operator for a GA; changes a single element in a string

create

Creates a new mutation operator.

set

Sets the instance variables. Takes a ref-to-hash as input

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

asXML

Prints as XML, following the EvoSpec 0.2 XML specification. Should be called from derived classes, not by itself.


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: 2001/09/04 18:18:16 $ 
  $Header: /cvsroot/opeal/opeal/ChangeLengthMutation.pm,v 1.1 2001/09/04 18:18:16 jmerelo Exp $ 
  $Author: jmerelo $ 
  $Revision: 1.1 $