line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Graph::MSTHeapElem; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
61
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
386
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
3072
|
|
|
3072
|
0
|
4922
|
my $class = shift; |
8
|
3072
|
|
|
|
|
13540
|
bless { u => $_[0], v => $_[1], w => $_[2] }, $class; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub heap { |
12
|
6144
|
|
|
6144
|
0
|
62554
|
my $self = shift; |
13
|
6144
|
50
|
|
|
|
13492
|
@_ ? ($self->{heap} = shift) : $self->{heap}; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub cmp { |
17
|
22705
|
|
50
|
22705
|
0
|
669128
|
($_[0]->{ w } || 0) <=> ($_[1]->{ w } || 0); |
|
|
|
50
|
|
|
|
|
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub val { |
21
|
3072
|
|
|
3072
|
0
|
3794
|
@{ $_[0] }{ qw(u v w) }; |
|
3072
|
|
|
|
|
9877
|
|
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |