useDynLib(rrcovHD, .registration=TRUE)
importFrom("Rcpp", sourceCpp)
importFrom(Rcpp, evalCpp)

# Export all names
# exportPattern(".")
# exportPattern("^[[:alpha:]]+")

# Import all packages listed as Imports or Depends
importFrom(stats4, plot, summary)
importFrom(methods, show)
#importFrom(lattice, xyplot, panel.xyplot, panel.abline, ltext)
importFrom("grDevices", "dev.interactive", "palette")
importFrom("graphics", "abline", "arrows", "axis", "barplot", "box", "hist",
         "legend", "lines", "pairs", "par", "points", "rect",
         "strwidth", "text", "title")
importFrom("methods", "is", "new")
importFrom("stats", ".getXlevels", "cor", "cov", "cov.wt", "cov2cor",
         "dchisq", "density", "dnorm", "ecdf", "mad", "mahalanobis",
         "median", "model.matrix", "model.response", "na.fail",
         "pchisq", "pf", "pgamma", "pnorm", "princomp", "qchisq",
         "qf", "qnorm", "quantile", "rnorm", "runif", "sd", "terms",
         "uniroot", "var")
importFrom("utils", "combn")
importFrom("pcaPP", "sPCAgrid")

importFrom(robustHD, sparseLTS, robStandardize)
import(
  robustbase,
  pcaPP,
  rrcov,
  pls,
  spls
)

export(OutlierMahdist,
       OutlierPCDist,
       OutlierPCOut,
       OutlierSign1,
       OutlierSign2,

       CSimca,
       RSimca,

       SPcaGrid,

       SosDiscRobust
)

##S3 generics
S3method(CSimca, default)
S3method(CSimca, formula)
S3method(RSimca, default)
S3method(RSimca, formula)
S3method(OutlierPCDist, default)
S3method(OutlierPCDist, formula)
S3method(OutlierMahdist, default)
S3method(OutlierMahdist, formula)
S3method(OutlierPCOut, default)
S3method(OutlierPCOut, formula)
S3method(OutlierSign1, default)
S3method(OutlierSign1, formula)
S3method(OutlierSign2, default)
S3method(OutlierSign2, formula)
S3method(SPcaGrid, default)
S3method(SPcaGrid, formula)
S3method(SosDiscRobust, default)
S3method(SosDiscRobust, formula)

## S4 generics
export(getClassLabels,
       getWeight,
       getOutliers,
       getCutoff
)

exportClasses(Outlier,
              OutlierMahdist,
              OutlierPCOut,
              OutlierPCDist,
              OutlierSign1,
              OutlierSign2,

              SPcaGrid,

              Simca,
              CSimca,
              RSimca,
              PredictSimca,
              SummarySimca,

              SosDisc,
              SosDiscClassic,
              SosDiscRobust,
              SummarySosDisc,
              PredictSosDisc
)

exportMethods(getCutoff,
              getClassLabels,
              getDistance,
              getFlag,
              getWeight,
              getOutliers,
              getQuan
)
