J. J. Merelo-Guervós > Algorithm-Evolutionary-0.67 > Algorithm::Evolutionary::Utils

Download:
Algorithm-Evolutionary-0.67.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 2.6   Source   Latest Release: Algorithm-Evolutionary-0.71

NAME ^

Algorithm::Evolutionary::Utils - Container module with a hodgepodge of functions

SYNOPSIS ^

  use Algorithm::Evolutionary::Utils qw(entropy);

  my $this_entropy = entropy( $population );

  #Computes consensus sequence (for binary chromosomes
  my $this_consensus = consensus( $population); 

DESCRIPTION ^

Miscellaneous class that contains functions that might be useful somewhere else, especially when computing EA statistics.

METHODS ^

entropy( $population)

Computes the entropy using the well known Shannon's formula: http://en.wikipedia.org/wiki/Information_entropy 'to avoid botching highlighting

hamming( $string_a, $string_b )

Computes the number of positions that are different among two strings

consensus( $population, $rough = 0 )

Consensus sequence representing the majoritary value for each bit; returns the consensus string. If "rough", then the bit is set only if the difference is bigger than 0.4 (70/30 proportion)

average( $population )

Computes an average of population fitness

random_bitstring( $bits )

Returns a random bitstring with the stated number of bits. Useful for testing,mainly

parse_xml( $string )

Parses the string and returns an XML tree

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/03/29 09:42:41 $ 
  $Header: /cvsroot/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Utils.pm,v 2.6 2009/03/29 09:42:41 jmerelo Exp $ 
  $Author: jmerelo $ 
  $Revision: 2.6 $
  $Name $