line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Heap::Fibonacci::Fast; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.0101'; |
4
|
|
|
|
|
|
|
|
5
|
25
|
|
|
25
|
|
212506
|
use XSLoader; |
|
25
|
|
|
|
|
53
|
|
|
25
|
|
|
|
|
6823
|
|
6
|
|
|
|
|
|
|
XSLoader::load(__PACKAGE__, $VERSION); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new{ |
9
|
32
|
|
|
32
|
1
|
10102
|
my $class = shift; |
10
|
32
|
|
|
|
|
78
|
my $type = shift; |
11
|
|
|
|
|
|
|
|
12
|
32
|
100
|
100
|
|
|
347
|
if ( |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
13
|
|
|
|
|
|
|
!defined $type |
14
|
|
|
|
|
|
|
|| |
15
|
|
|
|
|
|
|
$type eq 'min' |
16
|
|
|
|
|
|
|
){ |
17
|
12
|
|
|
|
|
217
|
return $class->new_minheap(); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
}elsif ($type eq 'max'){ |
20
|
8
|
|
|
|
|
133
|
return $class->new_maxheap(); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
}elsif ($type eq 'code'){ |
23
|
11
|
|
|
|
|
168
|
return $class->new_codeheap(shift); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
}else{ |
26
|
1
|
|
|
|
|
14
|
die "Unknown type supplied: $type"; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |