Algorithm::Evolutionary::Fitness::Any - Façade for any function to look like 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. Actually it is a wrapper around _apply
_apply
This is the one that really does the stuff. It applies the defined function to each individual
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/07/22 12:07:03 $ $Header: /cvsroot/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Fitness/Any.pm,v 2.1 2009/07/22 12:07:03 jmerelo Exp $ $Author: jmerelo $ $Revision: 2.1 $
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Façade'. Assuming CP1252
To install Algorithm::Evolutionary, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Algorithm::Evolutionary
CPAN shell
perl -MCPAN -e shell install Algorithm::Evolutionary
For more information on module installation, please visit the detailed CPAN module installation guide.