Class: Factor
- Inherits:
-
Object
- Object
- Factor
- Defined in:
- lib/TrueSkill/FactorGraph/Factor.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#vars ⇒ Object
Returns the value of attribute vars.
Instance Method Summary collapse
-
#initialize(vars) ⇒ Factor
constructor
A new instance of Factor.
- #to_s ⇒ Object
- #var ⇒ Object
Constructor Details
#initialize(vars) ⇒ Factor
Returns a new instance of Factor.
6 7 8 9 10 11 12 |
# File 'lib/TrueSkill/FactorGraph/Factor.rb', line 6 def initialize(vars) @vars=vars @vars.each do |var| var[self]=Gaussian.new end end |
Instance Attribute Details
#vars ⇒ Object
Returns the value of attribute vars.
4 5 6 |
# File 'lib/TrueSkill/FactorGraph/Factor.rb', line 4 def vars @vars end |
Instance Method Details
#to_s ⇒ Object
17 18 19 |
# File 'lib/TrueSkill/FactorGraph/Factor.rb', line 17 def to_s return "<Factor "+self.object_id.to_s+">" end |
#var ⇒ Object
14 15 16 |
# File 'lib/TrueSkill/FactorGraph/Factor.rb', line 14 def var @vars[0] end |