commit e56d43e42e56fd580cb98c932957e2cd90dec51c
parent 1ffe11f520412b1be9da537f59e72522997439f5
Author: Jared Tobin <jared@jtobin.ca>
Date: Sun, 3 Apr 2016 10:50:10 +0700
src -> lib, etc.
Diffstat:
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/flat-mcmc.cabal b/flat-mcmc.cabal
@@ -20,7 +20,7 @@ Source-repository head
library
default-language: Haskell2010
ghc-options: -Wall
- hs-source-dirs: src
+ hs-source-dirs: lib
exposed-modules: Numeric.MCMC.Flat
build-depends:
base < 5
@@ -33,3 +33,15 @@ library
, transformers
, vector
+Test-suite rosenbrock
+ type: exitcode-stdio-1.0
+ hs-source-dirs: test
+ main-is: Rosenbrock.hs
+ default-language: Haskell2010
+ ghc-options:
+ -rtsopts -threaded
+ build-depends:
+ base < 5
+ , flat-mcmc
+ , vector
+
diff --git a/src/Numeric/MCMC/Flat.hs b/lib/Numeric/MCMC/Flat.hs
diff --git a/test/Rosenbrock.hs b/test/Rosenbrock.hs
@@ -11,7 +11,7 @@ rosenbrock xs = negate (5 *(x1 - x0 ^ 2) ^ 2 + 0.05 * (1 - x0) ^ 2) where
[x0, x1] = V.toList xs
main :: IO ()
-main = withSystemRandom . asGenIO $ mcmc 100 ensemble rosenbrock where
+main = withSystemRandom . asGenIO $ mcmc 10 ensemble rosenbrock where
ensemble = V.fromList [
V.fromList [negate 1.0 :: Double, negate 1.0]
, V.fromList [negate 1.0, 1.0]
@@ -19,3 +19,5 @@ main = withSystemRandom . asGenIO $ mcmc 100 ensemble rosenbrock where
, V.fromList [1.0, 1.0]
]
+-- ensemble = V.fromList [ V.fromList [negate 1.0 :: Double, negate 1.0], V.fromList [negate 1.0, 1.0], V.fromList [1.0, negate 1.0], V.fromList [1.0, 1.0]]
+