line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Algorithm::NCS; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
34319
|
use 5.020002; |
|
2
|
|
|
|
|
8
|
|
4
|
2
|
|
|
2
|
|
9
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
40
|
|
5
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
56
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
1336
|
use Data::Dumper; |
|
2
|
|
|
|
|
16664
|
|
|
2
|
|
|
|
|
487
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
require Exporter; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
14
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
15
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# This allows declaration use Algorithm::NCS ':all'; |
18
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
19
|
|
|
|
|
|
|
# will save memory. |
20
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw( |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
) ] ); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
our @EXPORT = qw( |
27
|
|
|
|
|
|
|
ncs |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
require XSLoader; |
33
|
|
|
|
|
|
|
XSLoader::load('Algorithm::NCS', $VERSION); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Preloaded methods go here. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub ncs{ |
38
|
35
|
100
|
33
|
35
|
0
|
2904
|
return 0 unless defined $_[0] and defined $_[1] and $_[0] ne "" and $_[1] ne "" ; |
|
|
|
66
|
|
|
|
|
|
|
|
100
|
|
|
|
|
39
|
32
|
|
|
|
|
1194440
|
return xs_ncs ([unpack('U*', $_[0])], [unpack('U*', $_[1])] ); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
__END__ |