1212# Default definitions for the interface #
1313# ########################################
1414
15+ const DEFAULT_CHAIN_TYPE = MCMCChains. Chains
16+
1517function AbstractMCMC. sample (
1618 model:: AbstractModel , alg:: InferenceAlgorithm , N:: Integer ; kwargs...
1719)
@@ -24,10 +26,11 @@ function AbstractMCMC.sample(
2426 alg:: InferenceAlgorithm ,
2527 N:: Integer ;
2628 check_model:: Bool = true ,
29+ chain_type= DEFAULT_CHAIN_TYPE,
2730 kwargs... ,
2831)
2932 check_model && _check_model (model, alg)
30- return AbstractMCMC. sample (rng, model, Sampler (alg), N; kwargs... )
33+ return AbstractMCMC. sample (rng, model, Sampler (alg), N; chain_type, kwargs... )
3134end
3235
3336function AbstractMCMC. sample (
@@ -50,9 +53,12 @@ function AbstractMCMC.sample(
5053 ensemble:: AbstractMCMC.AbstractMCMCEnsemble ,
5154 N:: Integer ,
5255 n_chains:: Integer ;
56+ chain_type= DEFAULT_CHAIN_TYPE,
5357 check_model:: Bool = true ,
5458 kwargs... ,
5559)
5660 check_model && _check_model (model, alg)
57- return AbstractMCMC. sample (rng, model, Sampler (alg), ensemble, N, n_chains; kwargs... )
61+ return AbstractMCMC. sample (
62+ rng, model, Sampler (alg), ensemble, N, n_chains; chain_type, kwargs...
63+ )
5864end
0 commit comments