package prbnmcn-dagger
Module type Intf.SSource
Module type describing the DSL, implemented by inference backends.
val return : 'a -> 'a treturn x injects a value x as a computation
If-then-else, mostly useful for monads featuring incremental computation. Allows to efficiently bind on a boolean computation.
sample dist builds a computation that samples from dist. Note that dist must be a pure computation.
map_score m f behaves similarly to m except that the associated computation will be reweighted according to the result of evaluating f on the value of m.
val map_log_score : 'a t -> ('a -> Log_space.t) -> 'a tSame as map_score excepts that a log-space likelihood is expected.
val score : float -> unit tscore s reweights the computation by s.
val log_score : Log_space.t -> unit tlog_score behaves as score except that a log-space weight is expected.