File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 6565
6666function LogDensityFunction (
6767 model:: Model ,
68- varinfo:: AbstractVarInfo = VarInfo (model),
6968 context:: Union{Nothing,AbstractContext} = nothing ,
7069)
70+ # Determine the suitable varinfo for the given model and context.
71+ varinfo = determine_suitable_varinfo (model, context === nothing ? leafcontext (model. context) : context)
7172 return LogDensityFunction (varinfo, model, context)
7273end
7374
75+ function LogDensityFunction (
76+ model:: Model ,
77+ varinfo:: AbstractVarInfo ,
78+ context:: Union{Nothing,AbstractContext} = nothing ,
79+ )
80+ return LogDensityFunction (varinfo, model, context)
81+ end
82+
83+
7484# If a `context` has been specified, we use that. Otherwise we just use the leaf context of `model`.
7585function getcontext (f:: LogDensityFunction )
7686 return f. context === nothing ? leafcontext (f. model. context) : f. context
You can’t perform that action at this time.
0 commit comments