It introduces a new Parameter private subtype of Variable, which holds onto its own density function. These must be constructed via Real.parameter{x => density(x)}.
The intent here is to experiment with alternative APIs that don't need a RandomVariable wrapper.
This PR also adds parameter methods to Continuous which are equivalent to param but make use of Parameter to return a bare Real instead of a RandomVariable[Real] (however there's no way yet to sample a model built from this).
This is a follow up to https://github.com/stripe/rainier/pull/401 .
It introduces a new
Parameter
private subtype ofVariable
, which holds onto its owndensity
function. These must be constructed viaReal.parameter{x => density(x)}
.The intent here is to experiment with alternative APIs that don't need a
RandomVariable
wrapper.This PR also adds
parameter
methods toContinuous
which are equivalent toparam
but make use ofParameter
to return a bareReal
instead of aRandomVariable[Real]
(however there's no way yet to sample a model built from this).