line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Algorithm::Evolutionary::Op::Population_Output; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
459
|
use lib qw( ../../../../../../Algorithm-Evolutionary/lib ../Algorithm-Evolutionary/lib ); #For development and perl syntax mode |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
121
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
6
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
7
|
1
|
|
|
1
|
|
4
|
use Carp; |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
82
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = sprintf "%d.%03d", q$Revision: 3.1 $ =~ /(\d+)\.(\d+)/g; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
4
|
use base 'Algorithm::Evolutionary::Op::Base'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
377
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
|
|
|
|
|
|
my $class = shift; |
15
|
|
|
|
|
|
|
my $hash = { printer => shift || |
16
|
|
|
|
|
|
|
sub { my $member = shift; |
17
|
|
|
|
|
|
|
print $member->as_string, "\n"; } |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
my $self = Algorithm::Evolutionary::Op::Base::new( __PACKAGE__, 1, $hash ); |
20
|
|
|
|
|
|
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub apply { |
24
|
|
|
|
|
|
|
my $self = shift; |
25
|
|
|
|
|
|
|
my $population_hashref=shift; |
26
|
|
|
|
|
|
|
for my $p (@$population_hashref) { |
27
|
|
|
|
|
|
|
$self->{'_printer'}->($p); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
"No man is an island" ; # Magic true value required at end of module |
32
|
|
|
|
|
|
|
__END__ |