line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::LIBSVM; |
2
|
|
|
|
|
|
|
# ABSTRACT: Alien package for the LIBSVM library |
3
|
|
|
|
|
|
|
$Alien::LIBSVM::VERSION = '0.004'; |
4
|
2
|
|
|
2
|
|
174376
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
59
|
|
5
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
55
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
990
|
use parent 'Alien::Base'; |
|
2
|
|
|
|
|
604
|
|
|
2
|
|
|
|
|
11
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub version { |
10
|
0
|
|
|
0
|
1
|
0
|
my ($class) = @_; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
0
|
( "" . $class->SUPER::version) =~ s/^\d/$&./gr; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub inline_auto_include { |
16
|
0
|
|
|
0
|
1
|
0
|
return [ "svm.h" ]; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
sub libs { |
19
|
1
|
|
|
1
|
1
|
20759
|
my ($class) = @_; |
20
|
|
|
|
|
|
|
|
21
|
1
|
50
|
|
|
|
6
|
join ' ', ( |
22
|
|
|
|
|
|
|
$class->install_type eq 'share' ? ('-L' . File::Spec->catfile($class->dist_dir, qw(lib)) ) : (), |
23
|
|
|
|
|
|
|
'-lsvm', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub cflags { |
28
|
0
|
|
|
0
|
1
|
0
|
my ($class) = @_; |
29
|
0
|
0
|
|
|
|
0
|
join ' ', ( |
30
|
|
|
|
|
|
|
$class->install_type eq 'share' ? ('-I' . File::Spec->catfile($class->dist_dir, qw(include)) ) : (), |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub Inline { |
35
|
0
|
0
|
|
0
|
0
|
0
|
return unless $_[-1] eq 'C'; # Inline's error message is good |
36
|
0
|
|
|
|
|
0
|
my $params = Alien::Base::Inline(@_); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub svm_train_path { |
40
|
1
|
|
|
1
|
1
|
4100
|
my ($self) = @_; |
41
|
1
|
|
|
|
|
18
|
File::Spec->catfile( $self->dist_dir , 'bin', 'svm-train' ); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub svm_predict_path { |
45
|
1
|
|
|
1
|
1
|
13580
|
my ($self) = @_; |
46
|
1
|
|
|
|
|
23
|
File::Spec->catfile( $self->dist_dir , 'bin', 'svm-predict' ); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub svm_scale_path { |
50
|
1
|
|
|
1
|
1
|
11916
|
my ($self) = @_; |
51
|
1
|
|
|
|
|
30
|
File::Spec->catfile( $self->dist_dir , 'bin', 'svm-scale' ); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |