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::FITNESS::ANY (3)

.ds Aq ’

NAME

Algorithm::Evolutionary::Fitness::Any - Fac\k:,ade for any function so that it can be used as fitness

CONTENTS

SYNOPSIS



   use Algorithm::Evolutionary::Utils qw( string_decode )

   sub squares {
     my $chrom = shift;
     my @values = string_decode( $chrom, 10, -1, 1 );
     return $values[0] * $values[1];
   }

   my $any_eval = new Algorithm::Evolutionary::Fitness::Any \&squares;



DESCRIPTION

Turns any subroutine or closure into a fitness function. Useful mainly if you want results cached; it’s not really needed otherwise.

METHODS

new( CW$function )

Assigns default variables

apply( CW$individual )

Applies the instantiated problem to a chromosome. It is actually a wrapper around _apply.

_apply( CW$individual )

This is the one that really does the stuff. It applies the defined function to each individual. Itis cached for efficiency.

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



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


perl v5.20.3 ALGORITHM::EVOLUTIONARY::FITNESS::ANY (3) 2014-10-25

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