line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::ConvexHull::MonotoneChain; |
2
|
2
|
|
|
2
|
|
62499
|
use 5.008001; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
133
|
|
3
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
153
|
|
4
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
831
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
require Exporter; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
9
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
10
|
|
|
|
|
|
|
convex_hull |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
our @EXPORT = qw(); |
13
|
|
|
|
|
|
|
our %EXPORT_TAGS = ('all' => \@EXPORT_OK); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
require XSLoader; |
18
|
|
|
|
|
|
|
XSLoader::load('Math::ConvexHull::MonotoneChain', $VERSION); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub convex_hull { |
21
|
6
|
|
|
6
|
1
|
5162
|
my $ary_ref = shift; |
22
|
37
|
50
|
|
|
|
132
|
return convex_hull_sorted([ |
23
|
6
|
|
|
|
|
29
|
sort {$a->[0] <=> $b->[0] || $a->[1] <=> $b->[1]} @$ary_ref |
24
|
|
|
|
|
|
|
]); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
__END__ |