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