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: 2009/07/24 08:46:59 $ 
$Header: /cvsroot/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Op/Permutation.pm,v 3.0 2009/07/24 08:46:59 jmerelo Exp $ 
$Author: jmerelo $ 
$Revision: 3.0 $
$Name $