Skip to content
Browse files

avoid redefining "mean"

mean is not (currently) an instance variable/attribute
  • Loading branch information...
1 parent a65a3c2 commit 387d874b4c0f4176a7d1b4376bc823e8ea741ff1 Eric Wong committed Feb 23, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/aggregate.rb
View
4 lib/aggregate.rb
@@ -2,9 +2,6 @@
# configurable histogram for a set of given samples. Convenient for tracking
# high throughput data.
class Aggregate
- #The current average of all samples
- attr_reader :mean
-
#The current number of samples
attr_reader :count
@@ -88,6 +85,7 @@ def << data
@buckets[to_index(data)] += 1 unless outlier?(data)
end
+ #The current average of all samples
def mean
@sum / @count
end

0 comments on commit 387d874

Please sign in to comment.
Something went wrong with that request. Please try again.