histogram - ActiveState ActiveGo 1.8
...

Package histogram

import "github.com/beorn7/perks/histogram"
Overview
Index

Overview ▾

Package histogram provides a Go implementation of BigML's histogram package for Clojure/Java. It is currently experimental.

type Bin

type Bin struct {
    Count int
    Sum   float64
}

func (*Bin) Mean

func (b *Bin) Mean() float64

func (*Bin) Update

func (b *Bin) Update(x *Bin)

type Bins

type Bins []*Bin

func (Bins) Len

func (bs Bins) Len() int

func (Bins) Less

func (bs Bins) Less(i, j int) bool

func (*Bins) Pop

func (bs *Bins) Pop() interface{}

func (*Bins) Push

func (bs *Bins) Push(x interface{})

func (Bins) Swap

func (bs Bins) Swap(i, j int)

type Histogram

type Histogram struct {
    // contains filtered or unexported fields
}

func New

func New(maxBins int) *Histogram

func (*Histogram) Bins

func (h *Histogram) Bins() Bins

func (*Histogram) Insert

func (h *Histogram) Insert(f float64)