HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduletdigest-0.3Haskell2010

Data.TDigest.Postprocess

  • 1 type
  • 2 classes
  • 7 values
  • Packagetdigest-0.3
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInternal.hs

Histogram

2 declarations
classclass Affine f => HasHistogram a (f :: Type -> Type) | a -> f where
#

Types from which we can extract histogram.

Methods

Instances5HasHistogram
datadata HistBin
#

Histogram bin

Constructors

Instances3Show, HasHistogram

Quantiles

2 declarations

Mean & variance

3 declarations

As we have "full" histogram, we can calculate other statistical variables.

valuemean :: HasHistogram a f => a -> f Double
#

Mean.

Example1 expression
mean (Tree.tdigest [1..100] :: Tree.TDigest 10)Just 50.5

Note: if you only need the mean, calculate it directly.

CDF

2 declarations
valuecdf :: HasHistogram a f => Double -> a -> Double
#

Cumulative distribution function.

Note: if this is the only thing you need, it's more efficient to count this directly.

Affine

1 declaration
classclass Traversable t => Affine (t :: Type -> Type) where
#

Affine containers, i.e. containing at most 1 element

This class doesn't have traverse analogie as it would require using Pointed which is disputed type class.

traverseAff :: Pointed f => (a -> f b) -> t a -> f (t b)

Methods

Instances4Affine