Sha256: b695e68c823391af369fade6c57eea1089919cb5a5050eecd0ff227ef763665a

Contents?: true

Size: 541 Bytes

Versions: 13

Compression:

Stored size: 541 Bytes

Contents

module Alf
  class Aggregator
    #
    # Defines a `stddev()` aggregation operator.
    #
    # Example:
    #
    #   # direct ruby usage
    #   Alf::Aggregator.stddev{ qty }.aggregate(...)
    #
    #   # lispy 
    #   (summarize :supplies, [:sid], :stddev => stddev{ qty })
    #
    class Stddev < Variance

      # Finalizes the computation.
      #
      # @see Aggregator::InstanceMethods#finalize
      def finalize(memo) 
        Math.sqrt(super(memo))
      end

    end # class Stddev
  end # class Aggregator
end # module Alf

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
alf-core-0.16.3 lib/alf/aggregator/stddev.rb
alf-core-0.16.2 lib/alf/aggregator/stddev.rb
alf-core-0.16.1 lib/alf/aggregator/stddev.rb
alf-core-0.16.0 lib/alf/aggregator/stddev.rb
alf-core-0.15.0 lib/alf/aggregator/stddev.rb
alf-core-0.14.0 lib/alf-aggregator/alf/aggregator/stddev.rb
alf-core-0.13.1 lib/alf-aggregator/alf/aggregator/stddev.rb
alf-core-0.13.0 lib/alf-aggregator/alf/aggregator/stddev.rb
alf-0.12.2 lib/alf/aggregator/stddev.rb
alf-0.12.1 lib/alf/aggregator/stddev.rb
alf-0.12.0 lib/alf/aggregator/stddev.rb
alf-0.11.1 lib/alf/aggregator/stddev.rb
alf-0.11.0 lib/alf/aggregator/stddev.rb