NAME
Algorithm::Evolutionary::Fitness::String - Base class for string-based fitness functors
SYNOPSIS
package My::Own::Fitness;
use base 'Algorithm::Evolutionary::Fitness::String'; #Mainly for deriving
my $evaluator = new My::Own::Fitness;
my $cache_hits = $evaluator->cached_evals();
DESCRIPTION
Base class for fitness functions applied to string-based chromosomes; extracts common code, and saves time. Provides a hash called %cache
to be used as a, well, cache for evaluations.
METHODS
new()
Initializes the cache
_apply( $individual )
Applies the instantiated problem to a chromosome, delegating to a specific function
_really_apply( $string )
This one applies the function to the string. Should be overloaded
cached_evals
Returns the number of keys in the evaluation cache
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: 2008/06/21 11:15:16 $
$Header: /cvsroot/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Fitness/ONEMAX.pm,v 1.1 2008/06/21 11:15:16 jmerelo Exp $
$Author: jmerelo $
$Revision: 1.1 $
$Name $