J. J. Merelo-Guervós > Algorithm-Evolutionary-0.71 > Algorithm::Evolutionary::Fitness::Base

Download:
Algorithm-Evolutionary-0.71.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 3.0   Source  

NAME ^

Algorithm::Evolutionary::Fitness::Base - Base class for Fitness functions

SYNOPSIS ^

Shouldn't be used directly, it's an abstract class whose siblings are used to implement fitness functions

DESCRIPTION ^

This module includes functionality that should be common to all fitness. Or at least it would be nice to have it in common.

METHODS ^

new()

Initializes common variables, like the number of evaluations. Cache is not initialized.

initialize()

Called from new, initializes the evaluations counter.

apply( $individual )

Applies the instantiated problem to a chromosome. Actually it is a wrapper around _apply

_apply( $individual )

This is the one that really does the stuff. Should be overloaded by derived clases

evaluations()

Returns the number of evaluations made with this object. Useful for collecting stats

reset_evaluations()

Sets to 0 the number of evaluations; useful for repeated use of the fitness object

cache()

Returns a reference to the internal evaluations cache. Not very encapsulated, but...

Known subclasses ^

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/07/24 08:46:59 $ 
  $Header: /cvsroot/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Fitness/Base.pm,v 3.0 2009/07/24 08:46:59 jmerelo Exp $ 
  $Author: jmerelo $ 
  $Revision: 3.0 $
  $Name $