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

export(dbarts, bart, bart2)
export(dbartsControl)
export(dbartsData)
export(updatePredictorPerObservationJointly)
export(pdbart, pd2bart)
export(xbart)
export(rbart_vi)
export(guessNumCores)

export(makeind, makeModelMatrixFromDataFrame, makeTestModelMatrix)

exportClasses(dbartsSampler)
export(extract)

S3method(plot, bart)
S3method(plot, rbart)
S3method(plot, pdbart)
S3method(plot, pd2bart)
S3method(fitted, bart)
S3method(extract, bart)
S3method(predict, bart)
S3method(residuals, bart)
S3method(fitted, rbart)
S3method(extract, rbart)
S3method(predict, rbart)
S3method(residuals, rbart)
S3method(print, bart)
S3method(print, rbart)

importFrom(methods, setRefClass, setClass, setClassUnion, callNextMethod, validObject, new, setValidity, setMethod)

importFrom(stats, model.frame, model.offset, model.response, model.weights, is.empty.model, terms, na.omit, complete.cases)
importFrom(stats, lm, pnorm, quantile)
importFrom(stats, as.formula, setNames)

importFrom(parallel, makeCluster, clusterExport, clusterEvalQ, clusterMap, stopCluster)
importFrom(stats, sd, rnorm, rexp, runif, rbinom, optim, optimHess, dnorm)

importFrom(graphics, abline, contour, image, lines, par, plot, title, strheight, text)
