line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# This file is auto-generated from nearest_neighbor.idl(0.4.5-347-g86989a6) with jenerator version 0.4.5-532-g61b108e/develop |
2
|
|
|
|
|
|
|
# *** DO NOT EDIT *** |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Jubatus::NearestNeighbor::Client; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
7
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
8
|
1
|
|
|
1
|
|
887
|
use utf8; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
1051
|
use autodie; |
|
1
|
|
|
|
|
18861
|
|
|
1
|
|
|
|
|
8
|
|
10
|
1
|
|
|
1
|
|
7984
|
use AnyEvent::MPRPC; |
|
1
|
|
|
|
|
99834
|
|
|
1
|
|
|
|
|
72
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
974
|
use parent 'Jubatus::Common::Client'; |
|
1
|
|
|
|
|
394
|
|
|
1
|
|
|
|
|
7
|
|
13
|
|
|
|
|
|
|
require Jubatus::NearestNeighbor::Types; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub clear { |
16
|
|
|
|
|
|
|
my ($self) = @_; |
17
|
|
|
|
|
|
|
return $self->_call("clear", Jubatus::Common::TBool->new(), [], []); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub set_row { |
21
|
|
|
|
|
|
|
my ($self, $id, $d) = @_; |
22
|
|
|
|
|
|
|
return $self->_call("set_row", Jubatus::Common::TBool->new(), [$id, $d], |
23
|
|
|
|
|
|
|
[Jubatus::Common::TString->new(), Jubatus::Common::TDatum->new()]); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub neighbor_row_from_id { |
27
|
|
|
|
|
|
|
my ($self, $id, $size) = @_; |
28
|
|
|
|
|
|
|
return $self->_call("neighbor_row_from_id", Jubatus::Common::TList->new( |
29
|
|
|
|
|
|
|
Jubatus::Common::TUserDef->new(Jubatus::NearestNeighbor::IdWithScore->new( |
30
|
|
|
|
|
|
|
))), [$id, $size], [Jubatus::Common::TString->new(), |
31
|
|
|
|
|
|
|
Jubatus::Common::TInt->new(0, 4)]); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub neighbor_row_from_data { |
35
|
|
|
|
|
|
|
my ($self, $query, $size) = @_; |
36
|
|
|
|
|
|
|
return $self->_call("neighbor_row_from_data", Jubatus::Common::TList->new( |
37
|
|
|
|
|
|
|
Jubatus::Common::TUserDef->new(Jubatus::NearestNeighbor::IdWithScore->new( |
38
|
|
|
|
|
|
|
))), [$query, $size], [Jubatus::Common::TDatum->new(), |
39
|
|
|
|
|
|
|
Jubatus::Common::TInt->new(0, 4)]); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub similar_row_from_id { |
43
|
|
|
|
|
|
|
my ($self, $id, $ret_num) = @_; |
44
|
|
|
|
|
|
|
return $self->_call("similar_row_from_id", Jubatus::Common::TList->new( |
45
|
|
|
|
|
|
|
Jubatus::Common::TUserDef->new(Jubatus::NearestNeighbor::IdWithScore->new( |
46
|
|
|
|
|
|
|
))), [$id, $ret_num], [Jubatus::Common::TString->new(), |
47
|
|
|
|
|
|
|
Jubatus::Common::TInt->new(1, 4)]); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub similar_row_from_data { |
51
|
|
|
|
|
|
|
my ($self, $query, $ret_num) = @_; |
52
|
|
|
|
|
|
|
return $self->_call("similar_row_from_data", Jubatus::Common::TList->new( |
53
|
|
|
|
|
|
|
Jubatus::Common::TUserDef->new(Jubatus::NearestNeighbor::IdWithScore->new( |
54
|
|
|
|
|
|
|
))), [$query, $ret_num], [Jubatus::Common::TDatum->new(), |
55
|
|
|
|
|
|
|
Jubatus::Common::TInt->new(1, 4)]); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; # Jubatus::NearestNeighbor::Client; |
61
|
|
|
|
|
|
|
|