homepage: https://github.com/ocramz/splitmix-distributions#readme
changelog-type: markdown
hash: 73275a363ed17c24c701e0240666e194bf41c007bbf1574ce22cd5750be9efcf
test-bench-deps:
  base: '>=4.7 && <5'
  hspec: -any
  splitmix: -any
  erf: -any
  splitmix-distributions: -any
  mtl: -any
  transformers: -any
maintainer: ocramz
synopsis: Random samplers for some common distributions, based on splitmix.
changelog: |
  # Changelog for splitmix-distributions

  ## Unreleased changes
basic-deps:
  base: '>=4.7 && <5'
  splitmix: -any
  erf: -any
  mtl: -any
  transformers: -any
all-versions:
- 0.1.0.0
author: Marco Zocca
latest: 0.1.0.0
description-type: markdown
description: |
  # splitmix-distributions

  Random samplers for some common distributions, as well as a convenient interface for composing them, based on `splitmix`.


  ## Usage

  Compose your random sampler out of simpler ones thanks to the Applicative and Monad interface, e.g. this is how you would declare and sample a binary mixture of Gaussian random variables:


      import Control.Monad (replicateM)
      import System.Random.SplitMix.Distributions (Gen, sample, bernoulli, normal)

      process :: Gen Double
      process = do
          coin <- bernoulli 0.7
          if coin
          then
              normal 0 2
          else
              normal 3 1

      dataset :: [Double]
      dataset = sample 1234 $ replicateM 20 process


  and sample your data in a pure (`sample`) or monadic (`sampleT`) setting.

  ## Implementation details

  The library is built on top of `splitmix`, so the caveats on safety and performance that apply there are relevant here as well.
license-name: BSD-3-Clause

Update from Hackage at 2021-05-03T09:46:23Z
Update from Hackage at 2021-05-03T09:46:23Z
