import(methods, rlecuyer, pbdMPI, pbdSLAP, pbdBASE)

# All internal functions
exportPattern("^dmat\\.[[:alpha:]]+")

exportClasses("ddmatrix")

export(
  # Arithmetic
  "+", 
  "-", 
  "*", 
  "/", 
  "^", 
  "%%", 
  "%/%", 
  # Algebra
  t, 
  "%*%", 
  crossprod, 
  tcrossprod, 
  chol2inv, 
  solve, 
  La.svd, 
  svd, 
  lu, 
  eigen,
  chol, 
  kappa.ddmatrix, 
  rcond,
  # Math
  abs, 
  sqrt, 
  log, 
  log2, 
  log10, 
  log1p, 
  round, 
  ceiling, 
  floor,
  # Principal Components
  scale, 
  prcomp, 
  diag,
  # Covariance
  var, 
  cov, 
  sd, 
  cor, 
  cov2cor, 
  scale, 
  sweep,
  # Reductions
  sum, 
  mean, 
  prod, 
  rowSums, 
  colSums, 
  rowMeans, 
  colMeans,
  rowMin,
  colMin,
  rowMax,
  colMax,
  # Misc
  as.matrix, 
  ownany, 
  ddmatrix, 
  ddmatrix.local, 
  as.ddmatrix, 
  is.ddmatrix, 
  is.na, 
  is.nan, 
  is.infinite, 
  is.numeric, 
  head.ddmatrix, 
  tail.ddmatrix,
  "[", 
  "[<-", 
  distribute, 
  # redistributions
  redistribute,
  as.rowcyclic,
  as.colcyclic,
  as.blockcyclic,
  as.block,
  as.rowblock,
  as.colblock
)

exportMethods(
  "median", 
  "apply", 
  "scale", 
  "sweep",
  "rowMin",
  "colMin",
  "rowMax",
  "colMax",
  "qr", 
  "qr.Q", 
  "qr.R", 
  "qr.qty", 
  "qr.qy", 
  "chol2inv",
  "rcond", 
  "norm",
  "lm.fit", 
  "diag", 
  "crossprod", 
  "tcrossprod", 
  "lu", 
  "eigen", 
  "isSymmetric",
  "as.matrix", 
  "as.vector", 
  "as.ddmatrix", 
  "ddmatrix", 
  "ddmatrix.local",
  "submatrix", 
  "submatrix<-",
  "[", 
  "[<-", 
  "na.exclude",
  "nrow", 
  "NROW", 
  "ncol", 
  "NCOL", 
  "dim", 
  "ldim", 
  "bldim", 
  "ICTXT", 
  "submatrix",
  "any", 
  "all",
  "summary",
  "rbind", 
  "cbind",
  "print",
  "show",
  "cov", 
  "cor", 
  "cov2cor", 
  "|", 
  "&"
)
