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::Fitness::Any(3) User Contributed Perl Documentation Algorithm::Evolutionary::Fitness::Any(3)

Algorithm::Evolutionary::Fitness::Any - Façade for any function so that it can be used as fitness

   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;

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

Assigns default variables

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

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

  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
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.