Sha256: 853c6d0dba3de1e78bc4d71794b00e06a64f96123b3d54df0bd06b8bcee65d54

Contents?: true

Size: 714 Bytes

Versions: 1

Compression:

Stored size: 714 Bytes

Contents

# frozen_string_literal: true

module DDSketch
  # The default implementation of DDSketch, with optimized memory usage at
  # the cost of lower ingestion speed, using an unlimited number of bins. The
  # number of bins will not exceed a reasonable number unless the data is
  # distributed with tails heavier than any subexponential.
  class Sketch < BaseSketch
    # @param [Float] relative_accuracy The guaranteed relative accuracy for sketch
    def initialize(relative_accuracy: DEFAULT_REL_ACC)
      super(
        mapping: Mapping::LogarithmicKeyMapping.new(relative_accuracy: relative_accuracy),
        store: Store::DenseStore.new,
        negative_store: Store::DenseStore.new
      )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ddsketch-0.1.0 lib/ddsketch/sketch.rb