line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Graph::Fast::GraphPM; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1146
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
5
|
1
|
|
|
1
|
|
6
|
use base 'Graph::Fast'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
229
|
|
6
|
|
|
|
|
|
|
|
7
|
0
|
|
|
0
|
0
|
|
sub noop { 1; } |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
*add_weighted_edge = \&Graph::Fast::add_edge; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub add_edge { |
12
|
0
|
|
|
0
|
1
|
|
Graph::Fast::add_edge($_[0], $_[1], $_[2], 1); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
*SP_Dijkstra = \&Graph::Fast::dijkstra; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
*SPT_Dijkstra_clear_cache = |
18
|
|
|
|
|
|
|
*SPT_Bellman_Ford_clear_cache = |
19
|
|
|
|
|
|
|
\&noop; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
package Graph::Fast_LPQ::GraphPM; |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
1
|
|
7
|
use base 'Graph::Fast::GraphPM'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
240
|
|
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
|
|
sub has_lpq { Graph::Fast::GraphPM->new(queue_maker => sub { List::PriorityQueue->new() }); } |
|
0
|
|
|
0
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
|
|
sub no_lpq { print STDERR "Creating Graph::Fast_LPQ::GraphPM with Hash::PriorityQueue because List::PriorityQueue isn't installed.\n"; |
30
|
0
|
|
|
|
|
|
Graph::Fast::GraphPM->new(); } |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
eval { require List::PriorityQueue }; |
33
|
|
|
|
|
|
|
if ($@) { |
34
|
|
|
|
|
|
|
*new = \&no_lpq; |
35
|
|
|
|
|
|
|
} else { |
36
|
|
|
|
|
|
|
*new = \&has_lpq; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |