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 :: Bool -> String -> a -> a
assert Bool
_ String
_ = a -> a
forall a. a -> a
id
eq :: Double -> Double -> Bool
eq :: Double -> Double -> Bool
eq Double
a Double
b = Double -> Double
forall a. Num a => a -> a
abs (Double
aDouble -> Double -> Double
forall a. Num a => a -> a -> a
-Double
b) Double -> Double -> Bool
forall a. Ord a => a -> a -> Bool
< Double
1e-6
negInf :: Double
negInf :: Double
negInf = Double -> Double
forall a. Num a => a -> a
negate Double
posInf
posInf :: Double
posInf :: Double
posInf = Double
1Double -> Double -> Double
forall a. Fractional a => a -> a -> a
/Double
0