packages feed

mwc-probability 2.0.0 → 2.0.1

raw patch · 3 files changed

+15/−2 lines, 3 files

Files

CHANGELOG view
@@ -1,4 +1,7 @@-# Changelog+	# Changelog++	- 2.0.1 (2018-01-30)+	* Add Normal-Gamma and Pareto distributions  	- 2.0.0 (2018-01-29) 	* Add Laplace and Zipf-Mandelbrot distribution
mwc-probability.cabal view
@@ -1,5 +1,5 @@ name:                mwc-probability-version:             2.0.0+version:             2.0.1 homepage:            http://github.com/jtobin/mwc-probability license:             MIT license-file:        LICENSE
src/System/Random/MWC/Probability.hs view
@@ -77,6 +77,7 @@   , chiSquare   , beta   , student+  , pareto   -- *** Dirichlet process   , dirichlet   , symmetricDirichlet  @@ -261,6 +262,15 @@   w <- gamma b 1   return $ u / (u + w) {-# INLINABLE beta #-}++-- | The Pareto distribution with specified index `a` and minimum `xmin` parameters.+--+-- Both `a` and `xmin` must be positive.+pareto :: PrimMonad m => Double -> Double -> Prob m Double+pareto a xmin = do+  y <- exponential a+  return $ xmin * exp y+{-# INLINABLE pareto #-}    -- | The Dirichlet distribution. dirichlet