Sha256: a9b34d6b83167f569d9c47e78bcb7281de2389596ed7845e019846d7a82a93ff

Contents?: true

Size: 240 Bytes

Versions: 20

Compression:

Stored size: 240 Bytes

Contents

class ProgressBar
  class RunningAverageCalculator
    def self.calculate(current_average, new_value_to_average, smoothing_factor)
      new_value_to_average * (1.0 - smoothing_factor) + current_average * smoothing_factor
    end
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
rubyjobbuilderdsl-0.0.2 vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/running_average_calculator.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.6.1 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.6.0 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.5.1 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.5.0 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.4.2 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.4.1 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.4.0 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.3.2 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.3.1 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.3.0 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.2.0 lib/ruby-progressbar/running_average_calculator.rb
ruby-progressbar-1.1.1 lib/progress_bar/running_average_calculator.rb
ruby-progressbar-1.1.0 lib/progress_bar/running_average_calculator.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/ruby-progressbar-1.0.2/lib/progress_bar/running_average_calculator.rb
ruby-progressbar-1.0.2 lib/progress_bar/running_average_calculator.rb
ruby-progressbar-1.0.1 lib/progress_bar/running_average_calculator.rb
ruby-progressbar-1.0.0 lib/progress_bar/running_average_calculator.rb
ruby-progressbar-1.0.0rc1 lib/progress_bar/running_average_calculator.rb