MutationOne - BitFlip mutation
my $xmlStr5=<<EOC; #Create using XML from base class <op name='VectorCrossover' type='binary' rate='1'> <param name='numpoints' value='1' /> </op> EOC my $ref5 = XMLin($xmlStr5); my $op5 = OpBase->fromXML( $ref5 ); print $op5->asXML(), "\n";
my $indi5 = new VectorIndi 10; print $indi5->asString(), "\n"; $op5->apply( $indi4, $indi5 ); print $indi4->asString(), "\n";
my $op = new VectorCrossover 1; # Using ctor, with a single crossing point
Crossover operator for a vector-rep individual
Creates a new 1 or 2 point crossover operator. But this is just to have a non-empty chromosome Defaults to 2 point
Creates a new 1 or 2 point crossover operator. But this is just to have a non-empty chromosome Defaults to 2 point
Sets the instance variables. Takes a ref-to-hash as input
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/10/25 12:33:11 $ $Header: /cvsroot/opeal/opeal/VectorCrossover.pm,v 1.4 2001/10/25 12:33:11 jmerelo Exp $ $Author: jmerelo $ $Revision: 1.4 $