mcmc-0.8.2.0: Sample from a posterior using Markov chain Monte Carlo
Copyright2021 Dominik Schrempf
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Mcmc.Chain.Trace

Description

Creation date: Wed May 20 09:11:25 2020.

Synopsis

Documentation

data Trace a Source #

A Trace is a mutable circular stack that passes through a list of states with associated priors and likelihoods called Links.

replicateT :: Int -> Link a -> IO (Trace a) Source #

Initialize a trace of given length by replicating the same value.

Be careful not to compute summary statistics before pushing enough values.

Call error if the maximum size is zero or negative.

fromVectorT :: Vector (Link a) -> IO (Trace a) Source #

Create a trace from a vector. The length is determined by the vector.

Call error if the vector is empty.

pushT :: Link a -> Trace a -> IO (Trace a) Source #

Push a Link on the Trace.

headT :: Trace a -> IO (Link a) Source #

Get the most recent link of the trace (see get).

takeT :: Int -> Trace a -> IO (Vector (Link a)) Source #

Get the k most recent links of the trace (see take).

freezeT :: Trace a -> IO (Stack Vector (Link a)) Source #

Freeze the mutable trace for storage (see freeze).

thawT :: Stack Vector (Link a) -> IO (Trace a) Source #

Thaw a circular stack (see thaw).