22 Mar 2016 19:19:48 UTC
- Distribution: Algorithm-Evolutionary-Fitness
- Module version: v3.102
- Source (raw)
- Browse (raw)
- How to Contribute
- KwaliteeBus factor: 1
- License: open_source
- Download (23.53KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- JJ Merelo <jj /at/ merelo.net>
- Known subclasses
Algorithm::Evolutionary::Fitness - Base class for fitness functions
Shouldn't be used directly, it's an abstract class whose siblings are used to implement fitness functions.
This module includes functionality that should be common to all fitness functions. Or at least it would be nice to have it in common. It counts the number of evaluations and includes a common API for caching evaluations.
Initializes common variables, like the number of evaluations. Cache is not initialized.
Called from new, initializes the evaluations counter.
Applies the instantiated problem to a chromosome. Actually it is a wrapper around
This is the one that really does the stuff. Should be overloaded by derived clases
Returns the number of evaluations made with this object. Useful for collecting stats, but it's up to the offspring to update it by using apply (which could make it slower anyway).
Sets to 0 the number of evaluations; useful for repeated use of the fitness object
Returns a reference to the internal evaluations cache. Not very encapsulated, but...
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
Module Install Instructions
To install Algorithm::Evolutionary::Fitness, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Algorithm::Evolutionary::Fitness
For more information on module installation, please visit the detailed CPAN module installation guide.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|