useDynLib(stan4bart, .registration = TRUE, .fixes = "C_")

export(stan4bart)
S3method(extract, stan4bartFit)
S3method(fitted, stan4bartFit)
S3method(predict, stan4bartFit)

S3method(as.array, stan4bartFit)
S3method(as.matrix, stan4bartFit)

importFrom(dbarts, extract)
importFrom(Matrix, t, sparseMatrix, drop0, diag, rankMatrix, fac2sparse, KhatriRao, bdiag)
importFrom(parallel, makeCluster, clusterExport, clusterEvalQ, clusterMap, stopCluster)

importFrom(stats, rnorm, dnorm, pnorm, dlogis, qexp, runif, qbeta, rbinom)
importFrom(stats, binomial, gaussian)
importFrom(stats, formula, as.formula, terms.formula, reformulate, terms)

importFrom(stats, contrasts, "contrasts<-")
importFrom(stats, model.frame, model.frame.default, model.matrix,
           model.offset, model.response, model.weights,
           delete.response)
importFrom(stats, fitted, uniroot, sigma, sd, na.pass, var, setNames)

importFrom(methods, as, new)

# This is only to "touch" the package, to ensure that its shared sub-library is
# loaded.
importFrom(RcppParallel, RcppParallelLibs)
