Copyright | (c) Edward Kmett 2013 |
---|---|
License | BSD3 |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell98 |
- data Approximate a = Approximate !(Log Double) 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
Documentation
data Approximate a Source #
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 |
class HasApproximate c a | c -> a where Source #
approximate :: Lens' c (Approximate a) Source #
confidence :: Lens' c (Log Double) Source #
HasApproximate (Approximate a0) a0 Source # | |
withMin :: Ord a => a -> Approximate a -> Approximate a Source #
withMax :: Ord a => a -> Approximate a -> Approximate a Source #