packages feed

hasty-hamiltonian 1.1.5 → 1.2.0

raw patch · 2 files changed

+8/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Numeric.MCMC.Hamiltonian: mcmc :: (Num (IxValue (t Double)), Show (t Double), Traversable t, FunctorWithIndex (Index (t Double)) t, Ixed (t Double), IxValue (t Double) ~ Double) => Int -> Double -> Int -> t Double -> Target (t Double) -> Gen RealWorld -> IO ()
+ Numeric.MCMC.Hamiltonian: mcmc :: (MonadIO m, PrimMonad m, Num (IxValue (t Double)), Show (t Double), Traversable t, FunctorWithIndex (Index (t Double)) t, Ixed (t Double), IxValue (t Double) ~ Double) => Int -> Double -> Int -> t Double -> Target (t Double) -> Gen (PrimState m) -> m ()

Files

Numeric/MCMC/Hamiltonian.hs view
@@ -35,8 +35,9 @@   ) where  import Control.Lens hiding (index)+import Control.Monad.IO.Class (MonadIO, liftIO)+import Control.Monad.Primitive (PrimState, PrimMonad) import Control.Monad.Trans.State.Strict hiding (state)-import Control.Monad.Primitive (PrimState, PrimMonad, RealWorld) import qualified Data.Foldable as Foldable (sum) import Data.Maybe (fromMaybe) import Data.Sampling.Types@@ -50,7 +51,8 @@ -- -- >>> withSystemRandom . asGenIO $ mcmc 3 1 [0, 0] target mcmc-  :: (Num (IxValue (t Double)), Show (t Double), Traversable t+  :: ( MonadIO m, PrimMonad m+     , Num (IxValue (t Double)), Show (t Double), Traversable t      , FunctorWithIndex (Index (t Double)) t, Ixed (t Double)      , IxValue (t Double) ~ Double)   => Int@@ -58,12 +60,12 @@   -> Int   -> t Double   -> Target (t Double)-  -> Gen RealWorld-  -> IO ()+  -> Gen (PrimState m)+  -> m () mcmc n step leaps chainPosition chainTarget gen = runEffect $         chain step leaps Chain {..} gen     >-> Pipes.take n-    >-> Pipes.mapM_ print+    >-> Pipes.mapM_ (liftIO . print)   where     chainScore    = lTarget chainTarget chainPosition     chainTunables = Nothing
hasty-hamiltonian.cabal view
@@ -1,5 +1,5 @@ name:                hasty-hamiltonian-version:             1.1.5+version:             1.2.0 synopsis:            Speedy traversal through parameter space. homepage:            http://github.com/jtobin/hasty-hamiltonian license:             MIT