Class: Rating
Instance Attribute Summary collapse
-
#exposure ⇒ Object
Returns the value of attribute exposure.
Attributes inherited from Gaussian
Instance Method Summary collapse
-
#initialize(mu = nil, sigma = nil) ⇒ Rating
constructor
A new instance of Rating.
- #to_s ⇒ Object
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
#exposure ⇒ Object
Returns the value of attribute exposure.
3 4 5 |
# File 'lib/TrueSkill/Rating.rb', line 3 def exposure @exposure end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/TrueSkill/Rating.rb', line 20 def to_s return "[mu="+mu.to_s+",sigma="+sigma.to_s+"]" end |