class Jubatus::Bandit::ArmInfo

Constants

TYPE

Attributes

trial_count[R]
weight[R]

Public Class Methods

from_msgpack(m) click to toggle source
# File lib/jubatus/bandit/types.rb, line 25
def ArmInfo.from_msgpack(m)
  val = TYPE.from_msgpack(m)
  ArmInfo.new(*val)
end
new(trial_count, weight) click to toggle source
# File lib/jubatus/bandit/types.rb, line 15
def initialize(trial_count, weight)
  @trial_count = trial_count
  @weight = weight
end

Public Instance Methods

to_msgpack(out = '') click to toggle source
# File lib/jubatus/bandit/types.rb, line 20
def to_msgpack(out = '')
  t = [@trial_count, @weight]
  return TYPE.to_msgpack(t)
end
to_s() click to toggle source
# File lib/jubatus/bandit/types.rb, line 30
def to_s
  gen = Jubatus::Common::MessageStringGenerator.new
  gen.open("arm_info")
  gen.add("trial_count", @trial_count)
  gen.add("weight", @weight)
  gen.close()
  return gen.to_s
end