Class: Rating

Inherits:
Gaussian show all
Defined in:
lib/TrueSkill/Rating.rb

Instance Attribute Summary collapse

Attributes inherited from Gaussian

#mu, #pi, #sigma, #tau

Instance Method Summary collapse

Methods inherited from Gaussian

#*, #/

Constructor Details

#initialize(mu = nil, sigma = nil) ⇒ Rating

Returns a new instance of Rating



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/TrueSkill/Rating.rb', line 4

def initialize(mu=nil,sigma=nil)
  if mu.kind_of?(Array)
    mu,sigma=mu
  end
  if mu.nil?
    mu=g().mu
  end
  if sigma.nil?
    sigma=g().sigma
  end
  super(mu,sigma)
end

Instance Attribute Details

#exposureObject

Returns the value of attribute exposure



3
4
5
# File 'lib/TrueSkill/Rating.rb', line 3

def exposure
  @exposure
end

Instance Method Details

#to_sObject



20
21
22
# File 'lib/TrueSkill/Rating.rb', line 20

def to_s
  return "[mu="+mu.to_s+",sigma="+sigma.to_s+"]"
end