line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# This file is auto-generated from recommender.idl(0.4.5-347-g86989a6) with jenerator version 0.4.5-532-g61b108e/develop |
2
|
|
|
|
|
|
|
# *** DO NOT EDIT *** |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Jubatus::Recommender::Client; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6247
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
7
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
8
|
1
|
|
|
1
|
|
6
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
9
|
1
|
|
|
1
|
|
37
|
use autodie; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
10
|
1
|
|
|
1
|
|
5318
|
use AnyEvent::MPRPC; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
79
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
5
|
use parent 'Jubatus::Common::Client'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
13
|
|
|
|
|
|
|
require Jubatus::Recommender::Types; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub clear_row { |
16
|
|
|
|
|
|
|
my ($self, $id) = @_; |
17
|
|
|
|
|
|
|
return $self->_call("clear_row", Jubatus::Common::TBool->new(), [$id], |
18
|
|
|
|
|
|
|
[Jubatus::Common::TString->new()]); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub update_row { |
22
|
|
|
|
|
|
|
my ($self, $id, $row) = @_; |
23
|
|
|
|
|
|
|
return $self->_call("update_row", Jubatus::Common::TBool->new(), [$id, $row], |
24
|
|
|
|
|
|
|
[Jubatus::Common::TString->new(), Jubatus::Common::TDatum->new()]); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub clear { |
28
|
|
|
|
|
|
|
my ($self) = @_; |
29
|
|
|
|
|
|
|
return $self->_call("clear", Jubatus::Common::TBool->new(), [], []); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub complete_row_from_id { |
33
|
|
|
|
|
|
|
my ($self, $id) = @_; |
34
|
|
|
|
|
|
|
return $self->_call("complete_row_from_id", Jubatus::Common::TDatum->new(), |
35
|
|
|
|
|
|
|
[$id], [Jubatus::Common::TString->new()]); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub complete_row_from_datum { |
39
|
|
|
|
|
|
|
my ($self, $row) = @_; |
40
|
|
|
|
|
|
|
return $self->_call("complete_row_from_datum", Jubatus::Common::TDatum->new(), |
41
|
|
|
|
|
|
|
[$row], [Jubatus::Common::TDatum->new()]); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub similar_row_from_id { |
45
|
|
|
|
|
|
|
my ($self, $id, $size) = @_; |
46
|
|
|
|
|
|
|
return $self->_call("similar_row_from_id", Jubatus::Common::TList->new( |
47
|
|
|
|
|
|
|
Jubatus::Common::TUserDef->new(Jubatus::Recommender::IdWithScore->new())), |
48
|
|
|
|
|
|
|
[$id, $size], [Jubatus::Common::TString->new(), |
49
|
|
|
|
|
|
|
Jubatus::Common::TInt->new(0, 4)]); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub similar_row_from_datum { |
53
|
|
|
|
|
|
|
my ($self, $row, $size) = @_; |
54
|
|
|
|
|
|
|
return $self->_call("similar_row_from_datum", Jubatus::Common::TList->new( |
55
|
|
|
|
|
|
|
Jubatus::Common::TUserDef->new(Jubatus::Recommender::IdWithScore->new())), |
56
|
|
|
|
|
|
|
[$row, $size], [Jubatus::Common::TDatum->new(), |
57
|
|
|
|
|
|
|
Jubatus::Common::TInt->new(0, 4)]); |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub decode_row { |
61
|
|
|
|
|
|
|
my ($self, $id) = @_; |
62
|
|
|
|
|
|
|
return $self->_call("decode_row", Jubatus::Common::TDatum->new(), [$id], |
63
|
|
|
|
|
|
|
[Jubatus::Common::TString->new()]); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub get_all_rows { |
67
|
|
|
|
|
|
|
my ($self) = @_; |
68
|
|
|
|
|
|
|
return $self->_call("get_all_rows", Jubatus::Common::TList->new( |
69
|
|
|
|
|
|
|
Jubatus::Common::TString->new()), [], []); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub calc_similarity { |
73
|
|
|
|
|
|
|
my ($self, $lhs, $rhs) = @_; |
74
|
|
|
|
|
|
|
return $self->_call("calc_similarity", Jubatus::Common::TFloat->new(), [$lhs, |
75
|
|
|
|
|
|
|
$rhs], [Jubatus::Common::TDatum->new(), Jubatus::Common::TDatum->new()]); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub calc_l2norm { |
79
|
|
|
|
|
|
|
my ($self, $row) = @_; |
80
|
|
|
|
|
|
|
return $self->_call("calc_l2norm", Jubatus::Common::TFloat->new(), [$row], |
81
|
|
|
|
|
|
|
[Jubatus::Common::TDatum->new()]); |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |