![]() |
![]()
| ![]() |
![]()
NAMEAlgorithm::Evolutionary::Op::Permutation - Per-mutation. Got it? SYNOPSISuse Algorithm::Evolutionary::Op::Permutation; my $op = new Algorithm::Evolutionary::Op::Permutation ; #Create from scratch my $bit_chromosome = new Algorithm::Evolutionary::Individual::BitString 10; $op->apply( $bit_chromosome ); my $priority = 2; my $max_iterations = 100; # Less than 10!, absolute maximum number # of permutations $op = new Algorithm::Evolutionary::Op::Permutation $priority, $max_iterations; 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"; Base ClassAlgorithm::Evolutionary::Op::Base DESCRIPTIONClass independent permutation operator; any individual that has
the
This kind of operator is used extensively in combinatorial
And, of course, Algorithm::MasterMind, where it is used in the
METHODSnew( [$rate = 1][, $max_iterations = 10] )Creates a new permutation operator; see
createCreates a new mutation operator with an application priority,
which
Called create to distinguish from the classwide ctor, new. It just makes simpler to create an Operator apply( $chromosome )Applies at most "max_iterations"
permutations to a "Chromosome" that includes the
"_str"
SEE ALSOUses Algorithm::Permute, which is purported to be the fastest
CopyrightThis 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: 2013/01/09 07:22:50 $ $Header: /media/Backup/Repos/opeal/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Op/Permutation.pm,v 3.7 2013/01/09 07:22:50 jmerelo Exp $ $Author: jmerelo $ $Revision: 3.7 $
|