Skip to content

Commit

Permalink
updaetd comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danielturek committed Feb 12, 2024
1 parent ebab5d7 commit d9c1ca0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nimbleHMC/R/HMC_samplers.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,14 @@ hmc_checkTarget <- function(model, targetNodes, hmcType) {
dists <- targetDists_unique
ADok <- rep(TRUE, length(dists))
for(i in seq_along(dists)) {
##
## if/when modelDef$checkADsupportForDistribution() is added to core nimble,
## change the entire body of this for-loop to instead be:
## ADoak[i] <- model$getModelDef()$checkADsupportForDistribution(dists[i])
##
## 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
Expand Down

0 comments on commit d9c1ca0

Please sign in to comment.