random-extras-0.18.1: Additional functions for random values.

Portabilityportable
Stabilityexperimental

Data.Random.Distribution.Uniform.Exclusive

Description

An uniform distribution that excludes the first parameter.

Synopsis

Documentation

class Excludable a whereSource

A class for excluding discrete values. No change for floating point values.

Note: Uniform is exclusive on the second argument for floating point values, so Excludable does not need to exclude anything for them.

Methods

smaller :: a -> aSource

bigger :: a -> aSource

uniformExclusiveDist :: (Excludable a, Ord a) => a -> a -> Uniform aSource

A uniform distribution that excludes the first parameter , but includes the second.

Note: Uniform behaves the opposite way for floating point values.

uniformExclusive :: (Distribution Uniform a, Excludable a, Ord a) => a -> a -> RVar aSource

A uniformly distributed random value that excludes the first parameter.