random-fu-0.1.4: Random number generation

Data.Random.Distribution.Uniform

Synopsis

Documentation

stdUniform :: Distribution StdUniform a => RVar aSource

Get a "standard" uniformly distributed variable. For integral types, this means uniformly distributed over the full range of the type (there is no support for Integer). For fractional types, this means uniformly distributed on the interval [0,1).

stdUniformT :: Distribution StdUniform a => RVarT m aSource

Get a "standard" uniformly distributed process. For integral types, this means uniformly distributed over the full range of the type (there is no support for Integer). For fractional types, this means uniformly distributed on the interval [0,1).

stdUniformPos :: (Distribution StdUniform a, Num a) => RVar aSource

Like stdUniform but only returns positive values.

stdUniformPosT :: (Distribution StdUniform a, Num a) => RVarT m aSource

Like stdUniform but only returns positive values.

integralUniform :: Integral a => a -> a -> RVarT m aSource

Compute a random Integral value between the 2 values provided (inclusive).

realFloatUniform :: RealFloat a => a -> a -> RVarT m aSource

realFloatUniform a b computes a uniform random value in the range [a,b) for any RealFloat type

floatUniform :: Float -> Float -> RVarT m FloatSource

floatUniform a b computes a uniform random Float value in the range [a,b)

doubleUniform :: Double -> Double -> RVarT m DoubleSource

doubleUniform a b computes a uniform random Double value in the range [a,b)

fixedUniform :: HasResolution r => Fixed r -> Fixed r -> RVarT m (Fixed r)Source

fixedUniform a b computes a uniform random Fixed value in the range [a,b), with any desired precision.

boundedStdUniform :: (Distribution Uniform a, Bounded a) => RVar aSource

Compute a random value for a Bounded type, between minBound and maxBound (inclusive for Integral or Enum types, in [minBound, maxBound) for Fractional types.)

boundedEnumStdUniform :: (Enum a, Bounded a) => RVarT m aSource

Compute a random value for a Bounded Enum type, between minBound and maxBound (inclusive)

realFloatStdUniform :: RealFloat a => RVarT m aSource

Compute a uniform random value in the range [0,1) for any RealFloat type

fixedStdUniform :: HasResolution r => RVarT m (Fixed r)Source

Compute a uniform random Fixed value in the range [0,1), with any desired precision.

floatStdUniform :: RVarT m FloatSource

Compute a uniform random Float value in the range [0,1)

doubleStdUniform :: RVarT m DoubleSource

Compute a uniform random Double value in the range [0,1)

realStdUniformCDF :: Real a => a -> DoubleSource

The CDF of the random variable realFloatStdUniform.

realUniformCDF :: RealFrac a => a -> a -> a -> DoubleSource

realUniformCDF a b is the CDF of the random variable realFloatUniform a b.