affine-invariant-ensemble-mcmc-0.1.0.0: General-purpose sampling
Numeric.MCMC.Util
Description
Various internal utilities.
Synopsis
genDiffInt :: PrimMonad m => Int -> (Int, Int) -> Gen (PrimState m) -> m IntSource
Given Int, bounds, and generator, generate a different Int in the bound.
mean :: [Double] -> DoubleSource
Tail-recursive, list-fused mean function.
mapPair :: (a -> b) -> (a, a) -> (b, b)Source
Map a function over a pair.
shortListToPair :: [a] -> (a, a)Source
Convert a list to a pair.
shuffle :: [a] -> Seed -> [a]Source
Knuth-shuffle a list. Uses Seq internally.
Seq
sample :: Int -> [a] -> Seed -> [a]Source
Sample from a list without replacement.