lol-0.7.0.0: A library for lattice cryptography.

Copyright(c) Eric Crockett 2011-2017
Chris Peikert 2011-2017
LicenseGPL-3
Maintainerecrockett0@email.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Crypto.Lol.GaussRandom

Description

Functions for sampling from a continuous Gaussian distribution.

Synopsis

Documentation

realGaussian :: forall v q m. (ToRational v, OrdFloat q, Random q, MonadRandom m) => v -> m (q, q) Source #

Using polar form of Box-Muller transform, returns a pair of centered, Gaussian-distributed real numbers with scaled variance svar = true variance * (2*pi). See <http://www.alpheratz.net/murison/Maple/GaussianDistribution/GaussianDistribution.pdf this link> for details.

realGaussians :: (ToRational svar, OrdFloat i, Random i, Vector v i, MonadRandom m) => svar -> Int -> m (v i) Source #

Generate n real, independent gaussians of scaled variance svar = true variance * (2*pi).