Skip to content

Commit

Permalink
added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danielturek committed Feb 11, 2024
1 parent cbddb03 commit ebab5d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nimbleHMC/R/HMC_samplers.R
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ hmc_checkTarget <- function(model, targetNodes, hmcType) {
for(i in seq_along(dists)) {
## these distributions get re-named to a nimble-version, and won't be found:
if(dists[i] %in% c('dweib', 'dmnorm', 'dmvt', 'dwish', 'dinvwish')) next
##
## if/when modelDef$checkADsupportForDistribution() is added to core nimble,
## change the following code to instead be:
## ADoak[i] <- model$getModelDef()$checkADsupportForDistribution(dists[i]) ## or something like that
##
## find the function or this distribution:
nfObj <- get(dists[i], envir = parent.frame(4)) ## this took a bit of an investigation to make work
## is a user-defined distribution:
Expand Down

0 comments on commit ebab5d7

Please sign in to comment.