NAME

  Permutation - permutation, permute several atoms, depending on the probability


SYNOPSIS

  my $xmlStr=<<EOC;
  <op name='Permutation' type='unary' rate='2'>
    <param name='probability' value='0.5' />
  </op>
  EOC
  my $ref = XMLin($xmlStr);
  my $op = OpBase->fromXML( $ref );
  print $op->asXML(), "\n*Arity ->", $op->arity(), "\n";
  my $op = new Permutation (0.5 ); #Create from scratch with 0.5 probability


Base Class

OpBase


DESCRIPTION

Permutation operator for a GA

create

Creates a new permutation operator with an application rate. Rate defaults to 0.5.

Called create to distinguish from the classwide ctor, new. It just makes simpler to create a Permutation Operator

set

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

apply

Applies permutation operator to a ``Chromosome''. Can be applied to any victims.

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: 2002/04/23 12:33:47 $ 
  $Header: /cvsroot/opeal/opeal/Permutation.pm,v 1.5 2002/04/23 12:33:47 jmerelo Exp $ 
  $Author: jmerelo $ 
  $Revision: 1.5 $