line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package POE::Component::Algorithm::Evolutionary::Island::POEtic; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
139077
|
use lib qw( ../../../../../../Algorithm-Evolutionary/lib ../Algorithm-Evolutionary/lib ); #For development and perl syntax mode |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
208
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
91
|
|
6
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
7
|
1
|
|
|
1
|
|
4
|
use Carp; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
131
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = sprintf "%d.%03d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/g; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
1633
|
use POE; |
|
1
|
|
|
|
|
50774
|
|
|
1
|
|
|
|
|
7
|
|
12
|
1
|
|
|
1
|
|
113946
|
use base 'POE::Component::Algorithm::Evolutionary::Island'; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
803
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Module implementation here |
15
|
|
|
|
|
|
|
sub new { |
16
|
|
|
|
|
|
|
my $class = shift; |
17
|
|
|
|
|
|
|
my %arg = @_; |
18
|
|
|
|
|
|
|
$arg{'After_Step'} = \&after_step; |
19
|
|
|
|
|
|
|
my $self = $class->SUPER::new( %arg ); |
20
|
|
|
|
|
|
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub after_step { |
24
|
|
|
|
|
|
|
my ($kernel, $heap, $arg ) = @_[KERNEL, HEAP, ARG0]; |
25
|
|
|
|
|
|
|
for my $node ( @{$heap->{'peers'}} ) { #Sessions by name |
26
|
|
|
|
|
|
|
$kernel->post($node, 'new_population', [$heap->{'population'}->[0]] ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
"No man is an island" ; # Magic true value required at end of module |
32
|
|
|
|
|
|
|
__END__ |