bayes-stack-0.2.0.1: Framework for inferring generative probabilistic models with Gibbs sampling

Safe HaskellNone

BayesStack.UniqueKey

Synopsis

Documentation

getUniqueKey :: (Monad m, Applicative m, Ord key, Ord val) => val -> UniqueKeyT val key m keySource

getValueMap :: (Monad m, Applicative m, Ord key, Ord val) => UniqueKeyT val key m (Map val key)Source

Get map of values to unique keys

getKeyMap :: (Monad m, Applicative m, Ord key, Ord val) => UniqueKeyT val key m (Map key val)Source

Get map of unique keys to values

mapTraversable :: (Traversable t, Ord key, Ord val) => [key] -> t val -> (t key, Map key val)Source

type UniqueKey val key = UniqueKeyT val key IdentitySource

'UniqueKey val key' is a monad for a calculation of a mapping unique keys key onto values val

data UniqueKeyT val key m a Source

Instances

MonadTrans (UniqueKeyT val key) 
Monad m => Monad (UniqueKeyT val key m) 
Functor m => Functor (UniqueKeyT val key m) 
(Functor (UniqueKeyT val key m), Monad m, Functor m) => Applicative (UniqueKeyT val key m) 

runUniqueKey :: Ord key => [key] -> UniqueKey val key a -> aSource

runUniqueKeyT :: (Monad m, Ord key) => [key] -> UniqueKeyT val key m a -> m aSource

runUniqueKey' :: (Ord key, Ord val) => [key] -> UniqueKey val key a -> (a, Map key val)Source

Run a UniqueKey, returning the result and the associated key map

runUniqueKeyT' :: (Monad m, Applicative m, Ord key, Ord val) => [key] -> UniqueKeyT val key m a -> m (a, Map key val)Source

Run a UniqueKeyT, returning the result and the associated key map