useDynLib(kergp, .registration=TRUE)

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

importFrom("graphics", "par", "axis",
           "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,
              covOrd, covTP, covANOVA)

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

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, covOrd,                                    ## constructors
       covQualNested,
       q1CompSymm, q1Symm, q1Diag, q1LowRank,
       npar, kernelName, inputNames,
       parMap, checkX,
       mle,
       prinKrige,
       checkGrad, checkPar,
       contr.helmod,
       parNamesSymm,
       parseCovFormula, 
       plot.covQual,
       corLevSymm, corLevCompSymm, corLevDiag, corLevLowRank,
       covRadial,
       k1Fun1Exp, k1Fun1Gauss, k1Fun1Matern3_2, 
       k1Fun1Matern5_2, k1Fun1PowExp,
       k1Fun1Cos,
       symIndices, optimMethods,
       warpPower, warpNorm,
       covTP, covANOVA)

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