line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Range::Compare::Stream::Sort; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
7117
|
use strict; |
|
13
|
|
|
|
|
30
|
|
|
13
|
|
|
|
|
322
|
|
4
|
13
|
|
|
13
|
|
63
|
use warnings; |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
355
|
|
5
|
13
|
|
|
13
|
|
63
|
use Exporter; |
|
13
|
|
|
|
|
20
|
|
|
13
|
|
|
|
|
4733
|
|
6
|
|
|
|
|
|
|
our @ISA=qw(Exporter); |
7
|
|
|
|
|
|
|
our @EXPORT=qw( |
8
|
|
|
|
|
|
|
sort_in_presentation_order |
9
|
|
|
|
|
|
|
sort_in_consolidate_order_asc |
10
|
|
|
|
|
|
|
sort_in_consolidate_order_desc |
11
|
|
|
|
|
|
|
sort_largest_range_end_first |
12
|
|
|
|
|
|
|
sort_smallest_range_start_first |
13
|
|
|
|
|
|
|
sort_smallest_range_end_first |
14
|
|
|
|
|
|
|
sort_largest_range_start_first |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub sort_in_presentation_order ($$) { |
19
|
18
|
|
|
18
|
0
|
33
|
my ($cmp_a,$cmp_b)=@_; |
20
|
18
|
|
|
|
|
44
|
$cmp_a->cmp_ranges($cmp_b); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub sort_in_consolidate_order_asc ($$) { |
24
|
106369
|
|
|
106369
|
0
|
170161
|
my ($range_a,$range_b)=@_; |
25
|
106369
|
100
|
|
|
|
274528
|
$range_a->cmp_range_start($range_b) |
26
|
|
|
|
|
|
|
|| |
27
|
|
|
|
|
|
|
$range_b->cmp_range_end($range_a); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub sort_in_consolidate_order_desc($$) { |
31
|
54
|
|
|
54
|
0
|
110
|
my ($range_a,$range_b)=@_; |
32
|
54
|
100
|
|
|
|
147
|
$range_b->cmp_range_end($range_a) |
33
|
|
|
|
|
|
|
|| |
34
|
|
|
|
|
|
|
$range_a->cmp_range_start($range_b); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub sort_largest_range_end_first ($$) { |
38
|
15
|
|
|
15
|
0
|
33
|
my ($range_a,$range_b)=@_; |
39
|
15
|
|
|
|
|
35
|
$range_b->cmp_range_end($range_a) |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub sort_smallest_range_start_first ($$) { |
43
|
18
|
|
|
18
|
0
|
36
|
my ($range_a,$range_b)=@_; |
44
|
18
|
|
|
|
|
43
|
$range_a->cmp_range_start($range_b) |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub sort_smallest_range_end_first ($$) { |
48
|
18
|
|
|
18
|
0
|
32
|
my ($range_a,$range_b)=@_; |
49
|
18
|
|
|
|
|
47
|
$range_a->cmp_range_end($range_b) |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub sort_largest_range_start_first ($$) { |
54
|
14
|
|
|
14
|
0
|
27
|
my ($range_a,$range_b)=@_; |
55
|
14
|
|
|
|
|
36
|
$range_b->cmp_range_start($range_a) |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |