@@ -342,7 +342,7 @@ struct GibbsState{V<:DynamicPPL.AbstractVarInfo,S}
342
342
states:: S
343
343
end
344
344
345
- varinfo (state:: GibbsState ) = state. vi
345
+ get_varinfo (state:: GibbsState ) = state. vi
346
346
347
347
"""
348
348
Initialise a VarInfo for the Gibbs sampler.
@@ -464,7 +464,7 @@ function gibbs_initialstep_recursive(
464
464
initial_params= initial_params_local,
465
465
kwargs... ,
466
466
)
467
- new_vi_local = varinfo (new_state)
467
+ new_vi_local = get_varinfo (new_state)
468
468
# Merge in any new variables that were introduced during the step, but that
469
469
# were not in the domain of the current sampler.
470
470
vi = merge (vi, get_global_varinfo (context))
@@ -492,7 +492,7 @@ function AbstractMCMC.step(
492
492
state:: GibbsState ;
493
493
kwargs... ,
494
494
)
495
- vi = varinfo (state)
495
+ vi = get_varinfo (state)
496
496
alg = spl. alg
497
497
varnames = alg. varnames
498
498
samplers = alg. samplers
@@ -512,7 +512,7 @@ function AbstractMCMC.step_warmup(
512
512
state:: GibbsState ;
513
513
kwargs... ,
514
514
)
515
- vi = varinfo (state)
515
+ vi = get_varinfo (state)
516
516
alg = spl. alg
517
517
varnames = alg. varnames
518
518
samplers = alg. samplers
@@ -607,7 +607,7 @@ state for this sampler. This is relevant when multilple samplers are sampling th
607
607
variables, and one might need it to be linked while the other doesn't.
608
608
"""
609
609
function match_linking!! (varinfo_local, prev_state_local, model)
610
- prev_varinfo_local = varinfo (prev_state_local)
610
+ prev_varinfo_local = get_varinfo (prev_state_local)
611
611
was_linked = DynamicPPL. istrans (prev_varinfo_local)
612
612
is_linked = DynamicPPL. istrans (varinfo_local)
613
613
if was_linked && ! is_linked
@@ -689,7 +689,7 @@ function gibbs_step_recursive(
689
689
# Take a step with the local sampler.
690
690
new_state = last (step_function (rng, conditioned_model, sampler, state; kwargs... ))
691
691
692
- new_vi_local = varinfo (new_state)
692
+ new_vi_local = get_varinfo (new_state)
693
693
# Merge the latest values for all the variables in the current sampler.
694
694
new_global_vi = merge (get_global_varinfo (context), new_vi_local)
695
695
new_global_vi = setlogp!! (new_global_vi, getlogp (new_vi_local))
0 commit comments