Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Algorithm::EvolutionarUserhContributed Perl DAlgorithm::Evolutionary::Wheel(3)

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.  Take care that fitness must
       be non-zero positives; since if they aren't, roulette wheel won't work
       at all

METHODS
   new(	@probabilites )
       Creates a new roulette wheel. Takes an array of numbers,	which need not
       be normalized

   spin( [$number_of_individuals = 1])
       Returns an individual whose probability is related to its fitness

   first( $item, $ref_to_list )
       Returns the index of the	first individual smaller than the item

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: 2010/12/08 09:31:24 $
	 $Header: /media/Backup/Repos/opeal/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Wheel.pm,v 3.6 2010/12/08 09:31:24 jmerelo Exp $
	 $Author: jmerelo $

perl v5.32.0			  2014-10-25 Algorithm::Evolutionary::Wheel(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS | Copyright

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Algorithm::Evolutionary::Wheel&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help