aboutsummaryrefslogtreecommitdiff
path: root/src/PPL/Sampling.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/PPL/Sampling.hs')
-rw-r--r--src/PPL/Sampling.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/PPL/Sampling.hs b/src/PPL/Sampling.hs
index 5ad346d..59126ba 100644
--- a/src/PPL/Sampling.hs
+++ b/src/PPL/Sampling.hs
@@ -27,7 +27,8 @@ import qualified System.Random as R
import Data.IORef
import Control.Monad
import qualified Data.Vector.Hashtables as H
-import qualified Data.Vector as V
+import qualified Data.Vector.Unboxed as V
+import Data.Word
mh :: (MonadIO m) => StdGen -> Double -> Meas a -> Stream (Of (a, Log Double)) m ()
mh g p m = do
@@ -50,7 +51,7 @@ mh g p m = do
yield (x'', w'')
step g2 omega'' x'' w''
- mutate :: MonadIO m => StdGen -> IORef (HashMap [Bool] Double, StdGen) -> m (IORef (HashMap [Bool] Double, StdGen))
+ mutate :: MonadIO m => StdGen -> IORef (HashMap Word64 Double, StdGen) -> m (IORef (HashMap Word64 Double, StdGen))
mutate g omega = liftIO $ do
(m, g0) <- readIORef omega
m' <- H.clone m