dripolles / histogram

Small histogram implementation in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

histogram

Build Status GoDoc

Simple Histogram library, with support for interpolation and percentile calculation.

The Histogram stores a count of the number of occurrences for each value. This count can later be used to interpolate expected counts for unknown values, and to calculate the percentile position of a value (number of equal or smaller values). The percentile calculation also does implicit interpolation if needed.

Sample usage

 h := NewHistogram()
 for _ , v := range values {
     h.Add(v)
 }
 p := GetPercentile(x)

Full documentation: http://godoc.org/github.com/dripolles/histogram

About

Small histogram implementation in Go

License:MIT License


Languages

Language:Go 100.0%