class Jubatus::Graph::Edge

Constants

TYPE

Attributes

property[R]
source[R]
target[R]

Public Class Methods

from_msgpack(m) click to toggle source
# File lib/jubatus/graph/types.rb, line 127
def Edge.from_msgpack(m)
  val = TYPE.from_msgpack(m)
  Edge.new(*val)
end
new(property, source, target) click to toggle source
# File lib/jubatus/graph/types.rb, line 116
def initialize(property, source, target)
  @property = property
  @source = source
  @target = target
end

Public Instance Methods

to_msgpack(out = '') click to toggle source
# File lib/jubatus/graph/types.rb, line 122
def to_msgpack(out = '')
  t = [@property, @source, @target]
  return TYPE.to_msgpack(t)
end
to_s() click to toggle source
# File lib/jubatus/graph/types.rb, line 132
def to_s
  gen = Jubatus::Common::MessageStringGenerator.new
  gen.open("edge")
  gen.add("property", @property)
  gen.add("source", @source)
  gen.add("target", @target)
  gen.close()
  return gen.to_s
end