File Coverage

blib/lib/Algorithm/Genetic/Diploid.pm
Criterion Covered Total %
statement 27 34 79.4
branch 0 2 0.0
condition n/a
subroutine 9 10 90.0
pod n/a
total 36 46 78.2


line stmt bran cond sub pod time code
1             package Algorithm::Genetic::Diploid;
2 2     2   95134 use strict;
  2         4  
  2         86  
3 2     2   1243 use Algorithm::Genetic::Diploid::Logger;
  2         5  
  2         107  
4 2     2   1298 use Algorithm::Genetic::Diploid::Base;
  2         7  
  2         66  
5 2     2   22761 use Algorithm::Genetic::Diploid::Chromosome;
  2         7  
  2         56  
6 2     2   1262 use Algorithm::Genetic::Diploid::Experiment;
  2         6  
  2         48  
7 2     2   1203 use Algorithm::Genetic::Diploid::Gene;
  2         5  
  2         47  
8 2     2   7101 use Algorithm::Genetic::Diploid::Individual;
  2         9  
  2         172  
9 2     2   1406 use Algorithm::Genetic::Diploid::Population;
  2         6  
  2         56  
10 2     2   1396 use Algorithm::Genetic::Diploid::Factory;
  2         5  
  2         310  
11              
12             our $AUTOLOAD;
13             our $VERSION = '0.3';
14              
15             =head1 NAME
16              
17             Algorithm::Genetic::Diploid - Extensible implementation of a diploid genetic algorithm
18              
19             =head1 DESCRIPTION
20              
21             This utility package can be used as the sole import (i.e. just
22             C) to load all the required packages at once. It also
23             provides static factory methods to create instances of these packages, e.g. C
24             and so on.
25              
26             =cut
27              
28             sub AUTOLOAD {
29 0     0     my ( $self, %args ) = @_;
30 0           my $method = $AUTOLOAD;
31 0           $method =~ s/.+://;
32 0 0         if ( $method =~ /^create_(\s+)$/ ) {
33 0           my $class = $1;
34 0           my $package = 'Algorithm::Genetic::Diploid::' . ucfirst $class;
35 0           return $package->new(%args);
36             }
37             }
38              
39             1;