| 1 | package Math::ConvexHull::MonotoneChain; | ||||||||||||||||||||
| 2 | 2 | ▶ | use 5.008001; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 2 | require Exporter; | |||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 2 | our @ISA = qw(Exporter); | |||||||||||||||||||
| 9 | 2 | our @EXPORT_OK = qw( | |||||||||||||||||||
| 10 | convex_hull | ||||||||||||||||||||
| 11 | ); | ||||||||||||||||||||
| 12 | 2 | our @EXPORT = qw(); | |||||||||||||||||||
| 13 | 2 | our %EXPORT_TAGS = ('all' => \@EXPORT_OK); | |||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 2 | our $VERSION = '0.01'; | |||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 2 | require XSLoader; | |||||||||||||||||||
| 18 | 2 | XSLoader::load('Math::ConvexHull::MonotoneChain', $VERSION); | |||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 6 | ▶ | sub convex_hull { | ||||||||||||||||||
|
Subroutine
convex_hull: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 21 | 6 | my $ary_ref = shift; | |||||||||||||||||||
| 22 | return convex_hull_sorted([ | ||||||||||||||||||||
| 23 | 6 | ▶ | sort {$a->[0] <=> $b->[0] || $a->[1] <=> $b->[1]} @$ary_ref | ||||||||||||||||||
|
Condition100%3/3
$Math::ConvexHull::MonotoneChain::a->[0] <=> $Math::ConvexHull::MonotoneChain::b->[0] || $Math::ConvexHull::MonotoneChain::a->[1] <=> $Math::ConvexHull::MonotoneChain::b->[1]
MC/DC100%2/2
$Math::ConvexHull::MonotoneChain::a->[0] <=> $Math::ConvexHull::MonotoneChain::b->[0] || $Math::ConvexHull::MonotoneChain::a->[1] <=> $Math::ConvexHull::MonotoneChain::b->[1]
$Math::ConvexHull::MonotoneChain::a->[0] <=> $Math::ConvexHull::MonotoneChain::b->[0]
$Math::ConvexHull::MonotoneChain::a->[1] <=> $Math::ConvexHull::MonotoneChain::b->[1]
Truth table100%3/3
A || B
A= $Math::ConvexHull::MonotoneChain::a->[0] <=> $Math::ConvexHull::MonotoneChain::b->[0]B= $Math::ConvexHull::MonotoneChain::a->[1] <=> $Math::ConvexHull::MonotoneChain::b->[1]
| |||||||||||||||||||||
| 24 | ]); | ||||||||||||||||||||
| 25 | } | ||||||||||||||||||||
| 26 | 2 | 1; | |||||||||||||||||||
| 27 | __END__ | ||||||||||||||||||||