NAME
Algorithm::Evolutionary::Op::Permutation - Per-mutation. Got it?
SYNOPSIS
use Algorithm::Evolutionary::Op::Mutation;
my $xmlStr=<<EOC;
<op name='Permutation' type='unary' rate='2' />
EOC
my $ref = XMLin($xmlStr);
my $op = Algorithm::Evolutionary::Op::->fromXML( $ref );
print $op->asXML(), "\n*Arity ->", $op->arity(), "\n";
my $op = new Algorithm::Evolutionary::Op::Permutation ; #Create from scratch
my $bitChrom = new Algorithm::Evolutionary::Individual::BitString 10;
$op->apply( $bitChrom );
Base Class
Algorithm::Evolutionary::Op::Base
DESCRIPTION
Class independent permutation operator; any individual that has the _str
instance variable (like Algorithm::Evolutionary::Individual::String and Algorithm::Evolutionary::Individual::BitString) of its elements swapped.
METHODS
new
Creates a new permutation operator; see Algorithm::Evolutionary::Op::Base for details.
create
Creates a new mutation 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 Mutation Operator
apply
Applies mutation operator to a "Chromosome" that includes the _str
instance variable, swapping positions for two of its components.
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: 2008/02/12 17:49:39 $
$Header: /cvsroot/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Op/Permutation.pm,v 1.1.1.1 2008/02/12 17:49:39 jmerelo Exp $
$Author: jmerelo $
$Revision: 1.1.1.1 $
$Name $