Algorithm::Evolutionary::Individual::Any - Wrapper around any Perl class, turns it into a Chromosome
use Algorithm::Evolutionary::Individual::Any; use Class::Name; # Your class here; it's required if not included anyways my $indi = new Algorithm::Evolutionary::Individual::Any Class::Name $class_args ; $indi->Fitness( $fitness ); print $indi->Fitness();
Algorithm::Evolutionary::Individual::Base
Bitstring Individual for a Genetic Algorithm. Used, for instance, in a canonical GA. That does not mean it can be used for mutation or crossover; normally you'll have to write your own classes
Creates a new individual by instantiating one of the given class with the arguments also issued here, which are forwarded to the class constructor.
No matter what you write, it will return the object wrapped. You can subclass and overload, however, but then you win nothing to use this class; you're better off creating a new one altogether
Returns 1. Here for compatibility
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/Individual/Any.pm,v 3.0 2009/07/24 08:46:59 jmerelo Exp $ $Author: jmerelo $ $Revision: 3.0 $ $Name $
To install Algorithm::Evolutionary, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Algorithm::Evolutionary
CPAN shell
perl -MCPAN -e shell install Algorithm::Evolutionary
For more information on module installation, please visit the detailed CPAN module installation guide.