useDynLib(kergp, .registration=TRUE)

import("methods")
import("MASS")
import("numDeriv")
import("Rcpp")
import("testthat")
import("nloptr")
import("doFuture")
importFrom("stats", "predict", "influence", "coef", "coefficients", "simulate",
           "contr.helmert", "D")
importFrom("stats4", "coef")
importFrom("parallel", "makeCluster", "stopCluster")
importFrom("doParallel", "registerDoParallel")
## importFrom("DiceKriging", "coef<-")

importFrom("graphics", "par",
           "plot", "lines", "points",
           "matplot", "matlines", "matpoints")
importFrom("grDevices", "col2rgb")
importFrom("stats", "rnorm")

importFrom("stats", "delete.response", "lm", "model.frame",
           "model.matrix", "model.response", "optim", "qnorm",
           "qqline", "qqnorm", "qt", "rcauchy", "rexp", "runif",
           "terms", "var")
importFrom("utils", "read.table")

## S4
exportClasses(covTS, covMan, covAll, covComp, covQual, covQualNested, covRadial)

## All methods, for own or "foreign" generics:
exportMethods(
    npar, kernelName, inputNames, "inputNames<-",  parMap, checkX, 
    show,
    coef, "coef<-", coefLower, "coefLower<-", coefUpper, "coefUpper<-",
    simulPar,
    covMat, scores, varVec,
    simulate,
    mle, gls,
    coerce
)

export(k1FunExp, k1FunGauss, k1FunPowExp,                  ## related funs
       k1FunMatern3_2, k1FunMatern5_2,
       k1Exp, k1Gauss, k1PowExp,                  ## related funs
       k1Matern3_2, k1Matern5_2,
       kMatern, kGauss,
       covTS, covMan, gp,                                  ## constructors
       covComp,                                            ## constructors
       covQualNested,
       q1CompSymm, q1Symm, q1Diag,
       npar, kernelName, inputNames,
       parMap, checkX,
       mle,
       prinKrige,
       checkGrad, checkPar,
       contr.helmod,
       parNamesSymm,
       parseCovFormula,
       corLevSymm, corLevCompSymm, corLevDiag,
       covRadial,
       k1Fun1Exp, k1Fun1Gauss, k1Fun1Matern3_2, 
       k1Fun1Matern5_2, k1Fun1PowExp,
       symIndices, optimMethods)

S3method(coef, gp)
S3method(predict, gp)
S3method(influence, gp)
S3method(plot, gp)
S3method(print, gp)
S3method(summary, gp)
S3method(print, summary.gp)
S3method(simulate, gp)
S3method(plot, simulate.gp)
