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

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::Wheel - Random selector of things depending on probabilities

SYNOPSIS ^

    my $wheel = new Algorithm::Evolutionary::Wheel( @probs );
    print $wheel->spin(); #Returns an element according to probabilities;

DESCRIPTION ^

Creates a "roulette wheel" for spinning and selecting stuff. It will be used in several places; mainly in the Algorithm::Evolutionary::Op::CanonicalGA.

METHODS ^

new( @probabilites )

Creates a new roulette wheel. Takes an array of numbers, which need not be normalized

spin()

Returns an individual whose probability is related to its fitness

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/Wheel.pm,v 3.0 2009/07/24 08:46:59 jmerelo Exp $ 
  $Author: jmerelo $