Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

quantile

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quantile

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Quantile

Ruby Implementation of Graham Cormode and S. Muthukrishnan's Effective Computation of Biased Quantiles over Data Streams in ICDE’05.

Installation

gem install quantile

Usage

require 'quantile'

estimator = Quantile::Estimator.new

# Record any amount of Numeric values
10_000.times do
  estimator.observe(rand)
end

# Retrieve the value of a given quantile
estimator.query(0.5)

# Retrieve the number of observations
estimator.observations

# Get the sum of all observed values.
estimator.sum

Tests Build Status

# Install dependencies
gem install bundler
bundle install

# Run tests
rake test

Resources

Author

Matt T. Proud <matt.proud@gmail.com>

FAQs

Package last updated on 04 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc