hdr-histogram-0.1.0.0: Haskell implementation of High Dynamic Range (HDR) Histograms

Copyright(c) Josh Bohde 2015
LicenseGPL-3
Maintainerjosh@joshbohde.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Data.HdrHistogram.Config

Contents

Description

A Haskell implementation of HdrHistogram. It allows storing counts of observed values within a range, while maintaining precision to a configurable number of significant digits.

This module captures the common functionality of converting values to and from Int indices, regardless of mutability or memory layout.

Synopsis

Config

data Config lowest highest sig Source #

Type-safe configuration for a Histogram

Instances

(KnownNat low, KnownNat high, KnownNat sig, HighLow low high, SigBounds sig) => HasConfig (Config low high sig) Source # 

Methods

getConfig :: (Integral a, FiniteBits a) => Proxy * (Config low high sig) -> HistogramConfig a Source #

type HighLow a b = a <= (b - 1) Source #

type SigBounds sig = (1 <= sig, sig <= 5) Source #

Significant Figures must be between 1 & 5

class HasConfig s where Source #

Typeclass to specify the types which can produce a HistogramConfig

Minimal complete definition

getConfig

Instances

(KnownNat low, KnownNat high, KnownNat sig, HighLow low high, SigBounds sig) => HasConfig (Config low high sig) Source # 

Methods

getConfig :: (Integral a, FiniteBits a) => Proxy * (Config low high sig) -> HistogramConfig a Source #

HistogramConfig

size :: HistogramConfig a -> Int Source #

the total number of elements distinct indices

indexForValue :: (FiniteBits a, Integral a) => HistogramConfig a -> a -> Int Source #

The index for a value

data Range a Source #

A range of values between lower and upper

Constructors

Range 

Fields

Instances

Eq a => Eq (Range a) Source # 

Methods

(==) :: Range a -> Range a -> Bool #

(/=) :: Range a -> Range a -> Bool #

Show a => Show (Range a) Source # 

Methods

showsPrec :: Int -> Range a -> ShowS #

show :: Range a -> String #

showList :: [Range a] -> ShowS #

rangeForIndex :: (Integral a, Bits a) => HistogramConfig a -> Int -> Range a Source #

The possible range of values for a given index