#####################################################################################
## Author: Daniel Sabanes Bove [daniel *.* sabanesbove *a*t* ifspm *.* uzh *.* ch]
## Project: Bayesian FPs with Hyper-g-prior
## 
## Time-stamp: <[NAMESPACE] by DSB Mit 26/01/2011 14:09 (CET)>
##
## Description:
## Namespace file for bfp package.
##
## History:
## 03/07/2008   copied from BayesMfp.
## 10/11/2008   added predict and its print method for BmaSamples.
## 13/11/2008   add pit and crps functions.
## 26/02/2009   add transformMfp function and C++ interfaces getPostExpectedg,
##              getPostExpectedShrinkage
## 29/09/2009   remove pit/crps stuff for bfp package on R-forge.
## 01/10/2009   add empiricalHpd
## 02/10/2009   remove import of rmvt, because now we copied the small code into
##              the package,
##              add scrHpd
## 26/01/2011   add scrBesag
#####################################################################################

## export new methods and functions
export(BayesMfp, BmaSamples, bmaPredict,
       findModel,
       getLogMargLik, getLogPrior, getPosteriorParms,
       getPostExpectedg, getPostExpectedShrinkage,
       inclusionProbs, posteriors,
       plotCurveEstimate,
       bfp, uc,
       transformMfp,
       empiricalHpd, scrHpd, scrBesag)

## register S3 methods for our classes
S3method('[', BayesMfp)
S3method(print, BayesMfp)
S3method(fitted, BayesMfp)
S3method(residuals, BayesMfp)
S3method(predict, BayesMfp)
S3method(as.data.frame, BayesMfp)
S3method(plotCurveEstimate, BayesMfp)
S3method(summary, BayesMfp)

S3method(print, summary.BayesMfp)

S3method(print, BmaSamples)
S3method(fitted, BmaSamples)
S3method(residuals, BmaSamples)
S3method(plotCurveEstimate, BmaSamples)
S3method(summary, BmaSamples)
S3method(predict, BmaSamples)

S3method(print, summary.BmaSamples)
S3method(print, predict.BmaSamples)

## register the compiled code functions
useDynLib(bfp,                                  # package
          ## samplingGaussian, exhaustiveGaussian, # functions
          ## logMargLik, postExpectedg, postExpectedShrinkage,
          .registration = TRUE, .fixes="C_") 

## need one import statement for Rcpp:
importFrom(Rcpp, evalCpp)

## other required imports:
importFrom("graphics", "legend", "matplot")
importFrom("stats", "as.formula", "fitted", "gaussian", "median",
         "model.matrix", "model.response", "na.omit", "pbeta",
         "pgamma", "qbeta", "qgamma", "qt", "quantile", "rchisq",
         "residuals", "rgamma", "rnorm", "rt", "runif", "terms",
         "uniroot", "update")

