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


Manual Reference Pages  -  ALGORITHM::EVOLUTIONARY::OP::STRINGRAND (3)

.ds Aq ’

NAME



  Algorithm::Evolutionary::Op::StringRand - randomly change chars in a string



CONTENTS

SYNOPSIS



  my $xmlStr2=<<EOC;
    <op name=StringRand type=unary rate=0.5 />
      <param name=numchars value=1 />
    </op>
  EOC
  my $ref2 = XMLin($xmlStr2);

  my $op2 = Algorithm::Evolutionary::Op::Base->fromXML( $ref2 );
  print $op2->asXML(), "\n*Arity ", $op->arity(), "\n";

  my $op = new Algorithm::Evolutionary::Op::StringRand 3; #Change 3 characters



Base Class

Algorithm::Evolutionary::Op::Base

DESCRIPTION



  Mutation operator for a GA; changes a single element in a string by
  changing it to the next in the sequence deducted from the chromosome
  itself.



create()

Creates a new mutation operator.

apply( CW$victim )

Applies mutation 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 the required type. The chosen character is changed to the next or previous in the array of chars used for coding the the string
my $strChrom = new Algorithm::Evolutionary::Individual::String [’a’,’c’,’g’,’t’] 10;
my $xmen = new Algorithm::Evolutionary::Op::IncMutation;
$xmen->apply( $strChrom ) # will change ’acgt’ into ’aagt’ or
                         # ’aggt’, for instance

Copyright



  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: 2009/11/17 19:19:41 $
  $Header: /media/Backup/Repos/opeal/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Op/StringRand.pm,v 3.1 2009/11/17 19:19:41 jmerelo Exp $
  $Author: jmerelo $
  $Revision: 3.1 $
  $Name $



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


perl v5.20.3 ALGORITHM::EVOLUTIONARY::OP::STRINGRAND (3) 2014-10-25

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