ArithCrossover - Arithmetic crossover operator; performs the average of the n parents crossed
my $xmlStr6=<<EOC; #Create it from XML <op name='ArithCrossover' type='binary' rate='1' /> EOC my $ref6 = XMLin($xmlStr6); my $op6 = OpBase->fromXML( $ref6 ); print $op6->asXML(), "\n"; $op6->apply( $indi4, $indi5 ); print $indi4->asString(), "\n"
my $op = new ArithCrossover; #Create from scratch
Crossover operator for a vector-rep individual
Creates the operator, but is more or less empty. Doesn't have instance variables
Applies xover operator to a ``Chromosome'', a vector of stuff,
really. Can be applied only to victims with the _array
instance
variable; but it checks before application that both operands are of
type VectorIndi.
Prints as XML, following the EvoSpec 0.2 XML specification. Should be called from derived classes, not by itself.
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: 2001/08/30 16:27:58 $ $Header: /cvsroot/opeal/opeal/ArithCrossover.pm,v 1.2 2001/08/30 16:27:58 jmerelo Exp $ $Author: jmerelo $ $Revision: 1.2 $