Module: ExoBasic::AvgTraits
- Included in:
- DecayingAvg, MeanAvg, ShortTermAvg
- Defined in:
- lib/exobasic/stats/avg_traits.rb
Instance Method Summary collapse
- #approx=(other) ⇒ Object
- #count ⇒ Object
- #deep_copy ⇒ Object
- #maximum ⇒ Object
- #minimum ⇒ Object
- #offer_many(xs) ⇒ Object
Instance Method Details
#approx=(other) ⇒ Object
21 22 23 |
# File 'lib/exobasic/stats/avg_traits.rb', line 21 def approx=(other) StatsHelpers.double_equals(self.avg, other.avg) end |
#count ⇒ Object
9 10 11 |
# File 'lib/exobasic/stats/avg_traits.rb', line 9 def count self..n end |
#deep_copy ⇒ Object
25 26 27 |
# File 'lib/exobasic/stats/avg_traits.rb', line 25 def deep_copy Marshal.load(Marshal.dump(self)) end |
#maximum ⇒ Object
17 18 19 |
# File 'lib/exobasic/stats/avg_traits.rb', line 17 def maximum self..possibilityRange[1] end |
#minimum ⇒ Object
13 14 15 |
# File 'lib/exobasic/stats/avg_traits.rb', line 13 def minimum self..possibilityRange[0] end |
#offer_many(xs) ⇒ Object
29 30 31 |
# File 'lib/exobasic/stats/avg_traits.rb', line 29 def offer_many(xs) xs.each { |x| self.offer(x) } end |