flat-mcmc

Painless, efficient, general-purpose sampling from continuous distributions.
Log | Files | Refs | README | LICENSE

commit 96aa8b5c3d168c1f7b615883afc39ef5f630e132
parent 9dc746eb8a341a58b45b677280d7e6be91149d94
Author: Jared Tobin <jared@jtobin.ca>
Date:   Thu,  1 Dec 2016 10:31:57 +1300

Fix gitignore.

Diffstat:
M.gitignore | 1-
Alib/Data/Vector/Extended.hs | 29+++++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore @@ -4,7 +4,6 @@ dist *.hi *.o -data _cache/ _site/ build diff --git a/lib/Data/Vector/Extended.hs b/lib/Data/Vector/Extended.hs @@ -0,0 +1,29 @@ +-- | +-- Module: Data.Vector.Extended +-- Copyright: (c) 2016 Jared Tobin +-- License: MIT +-- +-- Maintainer: Jared Tobin <jared@jtobin.ca> +-- Stability: unstable +-- Portability: ghc + +module Data.Vector.Extended ( + ensemble + , particle + ) where + +import qualified Data.Vector as V (fromList, Vector) +import qualified Data.Vector.Unboxed as U (fromList, Vector) + +-- | A type-specialized alias for Data.Vector.fromList. +-- +-- Use this to create ensembles from lists of particles. +ensemble :: [U.Vector Double] -> V.Vector (U.Vector Double) +ensemble = V.fromList + +-- | A type-specialized alias for Data.Vector.Unboxed.fromList +-- +-- Use this to create particles from lists of doubles. +particle :: [Double] -> U.Vector Double +particle = U.fromList +