probability-0.2.5: Probabilistic Functional Programming

Safe HaskellSafe-Inferred
LanguageHaskell98

Numeric.Probability.Percentage

Contents

Description

Number type based on Float with formatting in percents.

Synopsis

Probabilities

newtype T Source

Constructors

Cons Float 

showPfix :: (RealFrac prob, Show prob) => Int -> prob -> String Source

roundRel :: RealFrac a => Int -> a -> a Source

Deprecated: was used to implemented showPfix, but is no longer needed for this purpose, and should not be exported anyway, and does not contribute to a safe way to format fixed point values, because the rounded value may not be accurate

(//) :: (Ord a, Show a) => Dist a -> Int -> IO () infix 0 Source

Print distribution as table with configurable precision.

(//*) :: (Ord a, Show a) => Dist a -> (Int, Int) -> IO () Source

liftP :: (Float -> Float) -> T -> T Source

liftP2 :: (Float -> Float -> Float) -> T -> T -> T Source

type Dist a = T T a Source

type Spread a = [a] -> Dist a Source

type RDist a = T (Dist a) Source

type Trans a = a -> Dist a Source

type Space a = Trace (Dist a) Source

type Expand a = a -> Space a Source

type RTrans a = a -> RDist a Source

type RSpace a = T (Space a) Source

type RExpand a = a -> RSpace a Source