|
Algorithm::Evolutionary::Op::QuadXOver - n-point crossover operator; puts a part of the second operand into the first operand; can be 1 or 2 points. |
Algorithm::Evolutionary::Op::QuadXOver - n-point crossover operator; puts a part of the second operand
into the first operand; can be 1 or 2 points.
my $xmlStr3=<<EOC;
<op name='QuadXOver' type='binary' rate='1'>
<param name='numPoints' value='3' /> #Max is 2, anyways
</op>
EOC
my $ref3 = XMLin($xmlStr3);
my $op3 = Algorithm::Evolutionary::Op::Base->fromXML( $ref3 ); print $op3->asXML(), "\n";
my $indi = new Algorithm::Evolutionary::Individual::BitString 10; my $indi2 = $indi->clone(); my $indi3 = $indi->clone(); $op3->apply( $indi2, $indi3 );
my $op4 = new Algorithm::Evolutionary::Op::QuadXOver 3; #QuadXOver with 3 crossover points
Algorithm::Evolutionary::Op::Base
Crossover operator for a GA, takes args by reference and issues two children from two parents
Same as the Algorithm::Evolutionary::Op::Crossover manpage, but changes parents, does not return anything
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/09/01 15:34:19 $ $Header: /cvsroot/opeal/opeal/Algorithm/Evolutionary/Op/QuadXOver.pm,v 1.1 2002/09/01 15:34:19 jmerelo Exp $ $Author: jmerelo $ $Revision: 1.1 $ $Name $
|
Algorithm::Evolutionary::Op::QuadXOver - n-point crossover operator; puts a part of the second operand into the first operand; can be 1 or 2 points. |