Algorithm-Evolutionary
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use ExtUtils::MakeMaker; #-*-cperl-*-
my @scripts = grep {-f } glob("scripts/*.pl "); # Ripped from Text::PDF
my %make;
if ($ExtUtils::MakeMaker::VERSION > 6.64) {
$make{META_MERGE} = {
'meta-spec' => { version => 2 },
resources => {
repository => {
type => 'git',
url => 'https://github.com/JJ/Algorithm-Evolutionary.git',
web => 'https://github.com/JJ/Algorithm-Evolutionary',
lib/Algorithm/Evolutionary/Op/NoChangeTerm.pm view on Meta::CPAN
my $nct = new Algorithm::Evolutionary::Op::NoChangeTerm 10;
#nct->apply( \@pop ) will return false after 10 generations w/o change
=head1 Base Class
L<Algorithm::Evolutionary::Op::Base|Algorithm::Evolutionary::Op::Base>
=head1 DESCRIPTION
Algorithm::Evolutionary::Op::NoChangeTerm is used when we want an
algorithm to finish when the population has stagnated, or the global
optimum is found. It counts how many generations the population has
not changed, and returns false after that limit is reached.
It is useful if you want to run an algorithm for a certain time, or if
you want to apply some fancy diversity operator
=head1 METHODS
=cut
( run in 0.674 second using v1.01-cache-2.11-cpan-49f99fa48dc )