Skip to content

Commit

Permalink
Test and fix for basic outlier handling
Browse files Browse the repository at this point in the history
  • Loading branch information
josephruscio committed Aug 9, 2009
1 parent af41141 commit 6a6b6d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aggregate.rb
Expand Up @@ -11,6 +11,8 @@ def initialize (low=nil, high=nil, width=nil)
@count = 0
@sum = 0.0
@sum2 = 0.0
@outliers_low = 0
@outliers_high = 0

# If the user asks we maintain a linear histogram
if (nil != low && nil != high && nil != width)
Expand Down
4 changes: 4 additions & 0 deletions test.rb
Expand Up @@ -80,6 +80,10 @@ def test_histogram
puts @stats.to_s
end

def test_outlier
@stats << -1
@stats << 2**129
end
end

=begin
Expand Down

0 comments on commit 6a6b6d0

Please sign in to comment.