Class: Vangrail::Session::Track
- Inherits:
-
Object
- Object
- Vangrail::Session::Track
- Defined in:
- lib/vangrail/session.rb
Overview
One rank's running total. Attack and contamination each have one; they decay and accumulate on their own clock and they do not add.
Instance Attribute Summary collapse
-
#cusum ⇒ Object
Returns the value of attribute cusum.
-
#log_odds ⇒ Object
Returns the value of attribute log_odds.
-
#turns ⇒ Object
readonly
Returns the value of attribute turns.
Instance Method Summary collapse
- #bits(prior) ⇒ Object
-
#initialize(log_odds) ⇒ Track
constructor
A new instance of Track.
- #posterior ⇒ Object
Constructor Details
#initialize(log_odds) ⇒ Track
Returns a new instance of Track.
61 62 63 64 65 |
# File 'lib/vangrail/session.rb', line 61 def initialize(log_odds) @log_odds = log_odds @cusum = 0.0 @turns = [] end |
Instance Attribute Details
#cusum ⇒ Object
Returns the value of attribute cusum.
58 59 60 |
# File 'lib/vangrail/session.rb', line 58 def cusum @cusum end |
#log_odds ⇒ Object
Returns the value of attribute log_odds.
58 59 60 |
# File 'lib/vangrail/session.rb', line 58 def log_odds @log_odds end |
#turns ⇒ Object (readonly)
Returns the value of attribute turns.
59 60 61 |
# File 'lib/vangrail/session.rb', line 59 def turns @turns end |