line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# This file is auto-generated from graph.idl(0.4.5-347-g86989a6) with jenerator version 0.4.5-532-g61b108e/develop |
2
|
|
|
|
|
|
|
# *** DO NOT EDIT *** |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Jubatus::Graph::Client; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
11098
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
49
|
|
7
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
8
|
1
|
|
|
1
|
|
6
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
9
|
1
|
|
|
1
|
|
25
|
use autodie; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
9
|
|
10
|
1
|
|
|
1
|
|
5787
|
use AnyEvent::MPRPC; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
91
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
5
|
use parent 'Jubatus::Common::Client'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
10
|
|
13
|
|
|
|
|
|
|
require Jubatus::Graph::Types; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub create_node { |
16
|
|
|
|
|
|
|
my ($self) = @_; |
17
|
|
|
|
|
|
|
return $self->_call("create_node", Jubatus::Common::TString->new(), [], []); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub remove_node { |
21
|
|
|
|
|
|
|
my ($self, $node_id) = @_; |
22
|
|
|
|
|
|
|
return $self->_call("remove_node", Jubatus::Common::TBool->new(), [$node_id], |
23
|
|
|
|
|
|
|
[Jubatus::Common::TString->new()]); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub update_node { |
27
|
|
|
|
|
|
|
my ($self, $node_id, $property) = @_; |
28
|
|
|
|
|
|
|
return $self->_call("update_node", Jubatus::Common::TBool->new(), [$node_id, |
29
|
|
|
|
|
|
|
$property], [Jubatus::Common::TString->new(), Jubatus::Common::TMap->new( |
30
|
|
|
|
|
|
|
Jubatus::Common::TString->new(), Jubatus::Common::TString->new())]); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub create_edge { |
34
|
|
|
|
|
|
|
my ($self, $node_id, $e) = @_; |
35
|
|
|
|
|
|
|
return $self->_call("create_edge", Jubatus::Common::TInt->new(0, 8), |
36
|
|
|
|
|
|
|
[$node_id, $e], [Jubatus::Common::TString->new(), |
37
|
|
|
|
|
|
|
Jubatus::Common::TUserDef->new(Jubatus::Graph::Edge->new())]); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub update_edge { |
41
|
|
|
|
|
|
|
my ($self, $node_id, $edge_id, $e) = @_; |
42
|
|
|
|
|
|
|
return $self->_call("update_edge", Jubatus::Common::TBool->new(), [$node_id, |
43
|
|
|
|
|
|
|
$edge_id, $e], [Jubatus::Common::TString->new(), |
44
|
|
|
|
|
|
|
Jubatus::Common::TInt->new(0, 8), Jubatus::Common::TUserDef->new( |
45
|
|
|
|
|
|
|
Jubatus::Graph::Edge->new())]); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub remove_edge { |
49
|
|
|
|
|
|
|
my ($self, $node_id, $edge_id) = @_; |
50
|
|
|
|
|
|
|
return $self->_call("remove_edge", Jubatus::Common::TBool->new(), [$node_id, |
51
|
|
|
|
|
|
|
$edge_id], [Jubatus::Common::TString->new(), Jubatus::Common::TInt->new(0, |
52
|
|
|
|
|
|
|
8)]); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub get_centrality { |
56
|
|
|
|
|
|
|
my ($self, $node_id, $centrality_type, $query) = @_; |
57
|
|
|
|
|
|
|
return $self->_call("get_centrality", Jubatus::Common::TFloat->new(), |
58
|
|
|
|
|
|
|
[$node_id, $centrality_type, $query], [Jubatus::Common::TString->new(), |
59
|
|
|
|
|
|
|
Jubatus::Common::TInt->new(1, 4), Jubatus::Common::TUserDef->new( |
60
|
|
|
|
|
|
|
Jubatus::Graph::PresetQuery->new())]); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub add_centrality_query { |
64
|
|
|
|
|
|
|
my ($self, $query) = @_; |
65
|
|
|
|
|
|
|
return $self->_call("add_centrality_query", Jubatus::Common::TBool->new(), |
66
|
|
|
|
|
|
|
[$query], [Jubatus::Common::TUserDef->new( |
67
|
|
|
|
|
|
|
Jubatus::Graph::PresetQuery->new())]); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub add_shortest_path_query { |
71
|
|
|
|
|
|
|
my ($self, $query) = @_; |
72
|
|
|
|
|
|
|
return $self->_call("add_shortest_path_query", Jubatus::Common::TBool->new(), |
73
|
|
|
|
|
|
|
[$query], [Jubatus::Common::TUserDef->new( |
74
|
|
|
|
|
|
|
Jubatus::Graph::PresetQuery->new())]); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub remove_centrality_query { |
78
|
|
|
|
|
|
|
my ($self, $query) = @_; |
79
|
|
|
|
|
|
|
return $self->_call("remove_centrality_query", Jubatus::Common::TBool->new(), |
80
|
|
|
|
|
|
|
[$query], [Jubatus::Common::TUserDef->new( |
81
|
|
|
|
|
|
|
Jubatus::Graph::PresetQuery->new())]); |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub remove_shortest_path_query { |
85
|
|
|
|
|
|
|
my ($self, $query) = @_; |
86
|
|
|
|
|
|
|
return $self->_call("remove_shortest_path_query", Jubatus::Common::TBool->new( |
87
|
|
|
|
|
|
|
), [$query], [Jubatus::Common::TUserDef->new( |
88
|
|
|
|
|
|
|
Jubatus::Graph::PresetQuery->new())]); |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub get_shortest_path { |
92
|
|
|
|
|
|
|
my ($self, $query) = @_; |
93
|
|
|
|
|
|
|
return $self->_call("get_shortest_path", Jubatus::Common::TList->new( |
94
|
|
|
|
|
|
|
Jubatus::Common::TString->new()), [$query], |
95
|
|
|
|
|
|
|
[Jubatus::Common::TUserDef->new(Jubatus::Graph::ShortestPathQuery->new( |
96
|
|
|
|
|
|
|
))]); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub update_index { |
100
|
|
|
|
|
|
|
my ($self) = @_; |
101
|
|
|
|
|
|
|
return $self->_call("update_index", Jubatus::Common::TBool->new(), [], []); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub clear { |
105
|
|
|
|
|
|
|
my ($self) = @_; |
106
|
|
|
|
|
|
|
return $self->_call("clear", Jubatus::Common::TBool->new(), [], []); |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
sub get_node { |
110
|
|
|
|
|
|
|
my ($self, $node_id) = @_; |
111
|
|
|
|
|
|
|
return $self->_call("get_node", Jubatus::Common::TUserDef->new( |
112
|
|
|
|
|
|
|
Jubatus::Graph::Node->new()), [$node_id], [Jubatus::Common::TString->new( |
113
|
|
|
|
|
|
|
)]); |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
sub get_edge { |
117
|
|
|
|
|
|
|
my ($self, $node_id, $edge_id) = @_; |
118
|
|
|
|
|
|
|
return $self->_call("get_edge", Jubatus::Common::TUserDef->new( |
119
|
|
|
|
|
|
|
Jubatus::Graph::Edge->new()), [$node_id, $edge_id], |
120
|
|
|
|
|
|
|
[Jubatus::Common::TString->new(), Jubatus::Common::TInt->new(0, 8)]); |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub create_node_here { |
124
|
|
|
|
|
|
|
my ($self, $node_id) = @_; |
125
|
|
|
|
|
|
|
return $self->_call("create_node_here", Jubatus::Common::TBool->new(), |
126
|
|
|
|
|
|
|
[$node_id], [Jubatus::Common::TString->new()]); |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
sub remove_global_node { |
130
|
|
|
|
|
|
|
my ($self, $node_id) = @_; |
131
|
|
|
|
|
|
|
return $self->_call("remove_global_node", Jubatus::Common::TBool->new(), |
132
|
|
|
|
|
|
|
[$node_id], [Jubatus::Common::TString->new()]); |
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub create_edge_here { |
136
|
|
|
|
|
|
|
my ($self, $edge_id, $e) = @_; |
137
|
|
|
|
|
|
|
return $self->_call("create_edge_here", Jubatus::Common::TBool->new(), |
138
|
|
|
|
|
|
|
[$edge_id, $e], [Jubatus::Common::TInt->new(0, 8), |
139
|
|
|
|
|
|
|
Jubatus::Common::TUserDef->new(Jubatus::Graph::Edge->new())]); |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
1; |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
__END__ |