importFrom("utils", packageDescription)
#exportPattern("^[[:alpha:]]+")

#for graphics
importFrom("graphics", abline, plot, points,image, legend, lines, pairs)
importFrom("grDevices", colorRampPalette)
importFrom("stats", pgamma)

#user version of the MBBEFD distribution
export(dmbbefd, pmbbefd, qmbbefd, rmbbefd, ecmbbefd, mmbbefd, tlmbbefd)
export(dMBBEFD, pMBBEFD, qMBBEFD, rMBBEFD, ecMBBEFD, mMBBEFD, tlMBBEFD)

#for internal use (fitting process)
export(dmbbefd1, dmbbefd2, dMBBEFD1, dMBBEFD2, dgbeta1)

export(g2a) #backward compatibility

#C++ version of the MBBEFD distribution (not exported)
#export(mbbefdExposure, rmbbefdC, qmbbefdC, dmbbefd2, pmbbefd2, dG) #deprecated functions
#export(rmbbefdCpp, rMBBEFDCpp)

#R version of the MBBEFD distribution (no longer exported)
#export(dmbbefdR, pmbbefdR, qmbbefdR, rmbbefdR, ecmbbefdR, mmbbefdR, tlmbbefdR)
#export(dMBBEFDR, pMBBEFDR, qMBBEFDR, rMBBEFDR, ecMBBEFDR, mMBBEFDR, tlMBBEFDR)

#Swiss Re curves
export(swissRe)


#finite-support distributions 
importFrom("stats", dbeta, dunif, integrate, 
           pbeta, punif, qbeta, qunif, rbeta, 
           rbinom, runif, constrOptim, cov2cor, median, optim,
              optimize, quantile, var)
importFrom("actuar", munif, levunif, mbeta, levbeta) #d,p,q,r in base R
export(ecunif)
export(ecbeta)
importFrom("gsl", dilog) #dilogarithm function used variance
export(dstpareto, pstpareto, qstpareto, rstpareto, ecstpareto, mstpareto)
export(dgbeta, pgbeta, qgbeta, rgbeta, ecgbeta, mgbeta)

#one-inflated distributions (on the unit interval)
export(doifun, poifun, qoifun, roifun, ecoifun, moifun, tloifun)
export(doiunif, poiunif, qoiunif, roiunif, ecoiunif, moiunif, tloiunif)
export(doibeta, poibeta, qoibeta, roibeta, ecoibeta, moibeta, tloibeta)
export(doistpareto, poistpareto, qoistpareto, roistpareto, ecoistpareto, moistpareto, tloistpareto)
export(doigbeta, poigbeta, qoigbeta, roigbeta, ecoigbeta, moigbeta, tloigbeta)

#empirical total loss
export(etl)

#eecf class for empirical exposure curve function
export(eecf)
S3method(summary, eecf)
S3method(print, eecf)
S3method(print, summary.eecf)
S3method(plot, eecf)
S3method(lines, eecf)

#new generic function for DR class similar to cdfcomp
export(eccomp)

#fitting methods
importFrom("fitdistrplus", fitdist, mledist)
importFrom("alabama", constrOptim.nl) #only for MBBEFD
export(fitDR) #fitDR class inheriting from fitdist class
export(bootDR) #bootDR class inheriting from bootdist class

#temporary 
importFrom(MASS, kde2d)

#data
#export(aon,asiacomrisk,)

importFrom(Rcpp,sourceCpp)
useDynLib(mbbefd, .registration=TRUE)
