R/compileJunction.R

compileJunction <- function( bn.fit ){
  print("Compiling junction...")
  junction <- tryCatch(
    {
      compile(as.grain(bn.fit), propagate = TRUE)
    },
    error=function(cond) {
    message("Warning: junction could not be compiled. Exact inference deactivated.
            Original message: ")
    message(cond)
    return(NA)
    }
  )
  print(" Done.")
  return(junction)
}
MNLR/downscaleR.BN documentation built on June 12, 2019, 5:39 p.m.