line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Range::Compare::Stream::Sort; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
17208
|
use strict; |
|
13
|
|
|
|
|
36
|
|
|
13
|
|
|
|
|
552
|
|
4
|
13
|
|
|
13
|
|
70
|
use warnings; |
|
13
|
|
|
|
|
94
|
|
|
13
|
|
|
|
|
526
|
|
5
|
13
|
|
|
13
|
|
68
|
use Exporter; |
|
13
|
|
|
|
|
20
|
|
|
13
|
|
|
|
|
4968
|
|
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
|
39
|
my ($cmp_a,$cmp_b)=@_; |
20
|
18
|
|
|
|
|
47
|
$cmp_a->cmp_ranges($cmp_b); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub sort_in_consolidate_order_asc ($$) { |
24
|
106369
|
|
|
106369
|
0
|
161771
|
my ($range_a,$range_b)=@_; |
25
|
106369
|
100
|
|
|
|
279940
|
$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
|
94
|
my ($range_a,$range_b)=@_; |
32
|
54
|
100
|
|
|
|
142
|
$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
|
27
|
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
|
32
|
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
|
33
|
my ($range_a,$range_b)=@_; |
49
|
18
|
|
|
|
|
36
|
$range_a->cmp_range_end($range_b) |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub sort_largest_range_start_first ($$) { |
54
|
14
|
|
|
14
|
0
|
25
|
my ($range_a,$range_b)=@_; |
55
|
14
|
|
|
|
|
31
|
$range_b->cmp_range_start($range_a) |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |