![]() |
![]()
| ![]() |
![]()
NAMEAlgorithm::Evolutionary::Individual::Any - Wrapper around any Perl data structure, turns it into a Chromosome SYNOPSISuse 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(); Base ClassAlgorithm::Evolutionary::Individual::Base DESCRIPTIONBitstring 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 METHODSnew( $base_class, $base_class_args )Creates a new individual by instantiating one of the given class with the arguments also issued here, which are forwarded to the class constructor. Atom([$index])No matter what kind of underlying structure is there, it will return the wrapped object. You can subclass and overload, however, but then you earn nothing to use this class; you're better off creating a new one altogether. size()Returns 1. Here for compatibility CopyrightThis file is released under the GPL. See the LICENSE file included in this distribution, or go to http://www.fsf.org/licenses/gpl.txt
|