Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Approximate a = Approximate !(Log Double) a a a
- class HasApproximate c a | c -> a where
- exact :: Eq a => Prism' (Approximate a) a
- zero :: (Num a, Eq a) => Prism' (Approximate a) ()
- one :: (Num a, Eq a) => Prism' (Approximate a) ()
- withMin :: Ord a => a -> Approximate a -> Approximate a
- withMax :: Ord a => a -> Approximate a -> Approximate a
Approximate
data Approximate a #
An approximate number, with a likely interval, an expected value and a lower bound on the log
of probability that the answer falls in the interval.
NB: The probabilities associated with confidence are stored in the log
domain.
Approximate !(Log Double) a a a |
Instances
class HasApproximate c a | c -> a where #
approximate :: Lens' c (Approximate a) #
confidence :: Lens' c (Log Double) #
Instances
HasApproximate (Approximate a) a | |
Defined in Data.Approximate.Type approximate :: Lens' (Approximate a) (Approximate a) # confidence :: Lens' (Approximate a) (Log Double) # estimate :: Lens' (Approximate a) a # hi :: Lens' (Approximate a) a # lo :: Lens' (Approximate a) a # |
exact :: Eq a => Prism' (Approximate a) a #
withMin :: Ord a => a -> Approximate a -> Approximate a #
withMax :: Ord a => a -> Approximate a -> Approximate a #