module Data.TDigest.Internal where
type Mean = Double
type Weight = Double
type Centroid = (Mean, Weight)
type Size = Int
{-# INLINE assert #-}
assert :: Bool -> String -> a -> a
assert :: forall a. Bool -> String -> a -> a
assert Bool
_ String
_ = forall a. a -> a
id
eq :: Double -> Double -> Bool
eq :: Double -> Double -> Bool
eq Double
a Double
b = forall a. Num a => a -> a
abs (Double
aforall a. Num a => a -> a -> a
-Double
b) forall a. Ord a => a -> a -> Bool
< Double
1e-6
negInf :: Double
negInf :: Double
negInf = forall a. Num a => a -> a
negate Double
posInf
posInf :: Double
posInf :: Double
posInf = Double
1forall a. Fractional a => a -> a -> a
/Double
0