## we use S4
import("methods")

importFrom("graphics", "plot", "barplot", "lines", "text") ## we need the generic for plot
importFrom("utils", "head")
importFrom("stats", "sd", "median", "princomp", "loadings", "runif",
  "rnorm", "cor")

importFrom("registry", "registry", "match_partial_ignorecase", "match_exact")
importFrom("proxy", "dist", "as.dist")

## get generics, cladses and methods
importClassesFrom("Matrix", "Matrix", "dsparseMatrix", "dgCMatrix", "ngCMatrix", "dgTMatrix")
importFrom("Matrix", "rowSums", "colSums", "rowMeans", "colMeans",
  "summary", "drop0", "rBind")
## get just methods
importMethodsFrom("Matrix", "image", "t", "crossprod", "tcrossprod", "which")
importFrom("matrixStats", "colMaxs", "colMins")

## get generics and methods
importFrom("arules", "predict", "nitems", "sample", "LIST",
  "dissimilarity", "apriori", "itemLabels", "encode")
## get just methods
importMethodsFrom("arules", "sort", "summary",
  "lhs", "rhs", "quality", "quality<-", "is.subset", "interestMeasure")

### truncated SVD
importFrom("irlba", "irlba")

### LIBMF
importFrom("recosystem", "Reco", "data_memory", "out_memory")

## export functions
export(
  "dropNA",
  "dropNA2matrix",
  "dropNAis.na",
  "funkSVD",
  "RMSE",
  "MSE",
  "MAE",
  "frobenius",
  "HybridRecommender",
  "returnRatings",
  "getParameters"
)

## registry uses S3
export("recommenderRegistry")
S3method("print", "recommender_method")

## recommenderlab exports
exportClasses(
#  "sparseNAMatrix",
  "ratingMatrix",
  "realRatingMatrix",
  "binaryRatingMatrix",
  "Recommender",
  "topNList",
  "evaluationScheme",
  "confusionMatrix",
  "evaluationResults",
  "evaluationResultList"
)

S3method("predict", "funkSVD")

exportMethods(
  "[",
  "c",
  "coerce",	## setAs
  "show",
  "plot",
  "image",
  "sample",
  "summary",

  "calcPredictionAccuracy",
  "predict",
  #		"colMeans",
  #		"rowMeans",
  "colCounts",
  "rowCounts",
  "colSds",
  "rowSds",
  "binarize",
  "avg",
  "evaluate",
  "bestN",
  "nratings",
  "normalize",
  "denormalize",
  "getNormalize",
  "getRatings",
  "getRatingMatrix",
  "getRuns",
  "getModel",
  "getData",
  "getConfusionMatrix",
  "getResults",
  "getTopNLists",
  "hasRating",
  "dissimilarity",
  "similarity",
  "evaluationScheme",
  "removeKnownRatings",
  "removeKnownItems",
  "Recommender",
  "getList",
  "getData.frame"
)
