probability-0.2.4.1: Probabilistic Functional Programming

Safe HaskellSafe-Inferred

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 -> StringSource

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

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 ()Source

Print distribution as table with configurable precision.

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

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

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

type Dist a = T T aSource

type Spread a = [a] -> Dist aSource

type RDist a = T (Dist a)Source

type Trans a = a -> Dist aSource

type Space a = Trace (Dist a)Source

type Expand a = a -> Space aSource

type RTrans a = a -> RDist aSource

type RSpace a = T (Space a)Source

type RExpand a = a -> RSpace aSource