GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Algorithm::Evolutionary::Op::Crossover(3) User Contributed Perl Documentation Algorithm::Evolutionary::Op::Crossover(3)

Algorithm::Evolutionary::Op::Crossover - n-point crossover operator; puts fragments of the second operand into the first operand

  #Create from XML description using EvoSpec
  my $xmlStr3=<<EOC;
  <op name='Crossover' type='binary' rate='1'>
    <param name='numPoints' value='3' /> #Max is 2, anyways
  </op>
  EOC
  my $op3 = Algorithm::Evolutionary::Op::Base->fromXML( $xmlStr3 );
  print $op3->asXML(), "\n";

  #Apply to 2 Individuals of the String class
  my $indi = new Algorithm::Evolutionary::Individual::BitString 10;
  my $offspring = $op3->apply( $indi2, $indi3 ); #$indi2 == $offspring

  #Initialize using OO interface
  my $op4 = new Algorithm::Evolutionary::Op::Crossover 2; #Crossover with 2 crossover points

Algorithm::Evolutionary::Op::Base

Crossover operator for a Individuals of type Algorithm::Evolutionary::Individual::String and their descendants (Algorithm::Evolutionary::Individual::BitString). Crossover for Algorithm::Evolutionary::Individual::Vector would be Algorithm::Evolutionary::Op::VectorCrossover

Creates a new n-point crossover operator, with 2 as the default number of points, that is, the default would be my $options_hash = { numPoints => 2 }; my $priority = 1;

Applies xover operator to a "Chromosome", a string, really. Can be applied only to victims with the "_str" instance variable; but it checks before application that both operands are of type BitString.

Changes the first parent, and returns it. If you want to change both parents at the same time, check QuadXOver

Algorithm::Evolutionary::Op::QuadXOver for pass-by-reference xover
Algorithm::Evolutionary::Op::Uniform_Crossover another more mutation-like xover
Algorithm::Evolutionary::Op::Gene_Boundary_Crossover don't disturb the building blocks!
Algorithm::Evolutionary::Op::Uniform_Crossover_Diff vive la difference!

  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: 2011/02/14 06:55:36 $ 
  $Header: /media/Backup/Repos/opeal/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Op/Crossover.pm,v 3.2 2011/02/14 06:55:36 jmerelo Exp $ 
  $Author: jmerelo $ 
  $Revision: 3.2 $
  $Name $
2014-10-25 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.