Class: Jubatus::Graph::ShortestPathQuery
- Inherits:
-
Object
- Object
- Jubatus::Graph::ShortestPathQuery
- Includes:
- Common
- Defined in:
- lib/jubatus/graph/types.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#max_hop ⇒ Object
readonly
Returns the value of attribute max_hop.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(source, target, max_hop, query) ⇒ ShortestPathQuery
constructor
A new instance of ShortestPathQuery.
- #to_msgpack(out = '') ⇒ Object
- #to_s ⇒ Object
Methods included from Common
Constructor Details
#initialize(source, target, max_hop, query) ⇒ ShortestPathQuery
Returns a new instance of ShortestPathQuery.
151 152 153 154 155 156 |
# File 'lib/jubatus/graph/types.rb', line 151 def initialize(source, target, max_hop, query) @source = source @target = target @max_hop = max_hop @query = query end |
Instance Attribute Details
#max_hop ⇒ Object (readonly)
Returns the value of attribute max_hop.
179 180 181 |
# File 'lib/jubatus/graph/types.rb', line 179 def max_hop @max_hop end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
179 180 181 |
# File 'lib/jubatus/graph/types.rb', line 179 def query @query end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
179 180 181 |
# File 'lib/jubatus/graph/types.rb', line 179 def source @source end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
179 180 181 |
# File 'lib/jubatus/graph/types.rb', line 179 def target @target end |
Class Method Details
.from_msgpack(m) ⇒ Object
163 164 165 166 |
# File 'lib/jubatus/graph/types.rb', line 163 def ShortestPathQuery.from_msgpack(m) val = TYPE.from_msgpack(m) ShortestPathQuery.new(*val) end |
Instance Method Details
#to_msgpack(out = '') ⇒ Object
158 159 160 161 |
# File 'lib/jubatus/graph/types.rb', line 158 def to_msgpack(out = '') t = [@source, @target, @max_hop, @query] return TYPE.to_msgpack(t) end |
#to_s ⇒ Object
168 169 170 171 172 173 174 175 176 177 |
# File 'lib/jubatus/graph/types.rb', line 168 def to_s gen = Jubatus::Common::MessageStringGenerator.new gen.open("shortest_path_query") gen.add("source", @source) gen.add("target", @target) gen.add("max_hop", @max_hop) gen.add("query", @query) gen.close() return gen.to_s end |