useDynLib(mgcv, .registration = TRUE, .fixes = "C_")

export(anova.gam, bam, bam.update,bandchol, betar, cox.ph,concurvity, 
       cSplineDes,dDeta,
       exclude.too.far,extract.lme.cov, extract.lme.cov2,
       formXtViX, full.score, formula.gam,fixDependence,fix.family.link,
       fix.family.var, fix.family.ls, fix.family.qf,fix.family.rd,   
       fs.test,fs.boundary,gam, gam2derivative, 
       gam2objective,
       gamm, gam.check, gam.control,gam.fit3,
       gam.fit,gam.fit5.post.proc,
       gamlss.etamu,gamlss.gH,
       gam.outer,gam.reparam, gam.vcomp, gamSim , 
       gaulss,gam.side,get.var,gevlss,
       influence.gam, 
       in.out,inSide,interpret.gam,initial.sp,
       jagam,k.check,ldetS, 
       ldTweedie,
       logLik.gam,ls.size,
       magic, magic.post.proc, model.matrix.gam,mini.roots,
       mono.con, mroot, multinom, mvn, nb, negbin, new.name, 
       notExp,notExp2,notLog,notLog2,pcls,null.space.dimension, 
       ocat,
       pen.edf,pdIdnot,pdTens,
       place.knots, plot.gam, polys.plot,print.anova.gam,
       print.gam,print.summary.gam,predict.gam,predict.bam,
       PredictMat,Predict.matrix,Predict.matrix2,
       Predict.matrix.Bspline.smooth,
       Predict.matrix.cr.smooth,
       Predict.matrix.duchon.spline,
       Predict.matrix.cs.smooth,
       Predict.matrix.cyclic.smooth,
       Predict.matrix.tensor.smooth,
       Predict.matrix.tprs.smooth,
       Predict.matrix.ts.smooth,
       Predict.matrix.sos.smooth,
       Predict.matrix.soap.film,
       Predict.matrix.sf,
       Predict.matrix.sw,
       Predict.matrix.mrf.smooth,
       Predict.matrix.pspline.smooth,
       Predict.matrix.random.effect,
       Predict.matrix.t2.smooth,
       Predict.matrix.gp.smooth,
       qq.gam,
       residuals.gam,rig,rTweedie,rmvn, 
       Rrank,s,scat,sdiag,"sdiag<-",
       sim2jam,Sl.initial.repara,Sl.repara,Sl.setup,
       slanczos,smooth2random,
       smoothCon,smooth.construct,smooth.construct2,
       smooth.construct.bs.smooth.spec,
       smooth.construct.cc.smooth.spec,
       smooth.construct.cp.smooth.spec,
       smooth.construct.cr.smooth.spec,
       smooth.construct.cs.smooth.spec,
       smooth.construct.ds.smooth.spec,
       smooth.construct.tensor.smooth.spec,
       smooth.construct.tp.smooth.spec,
       smooth.construct.ts.smooth.spec,
       smooth.construct.ps.smooth.spec,
       smooth.construct.re.smooth.spec,
       smooth.construct.mrf.smooth.spec,
       smooth.construct.gp.smooth.spec,
       smooth.construct.sos.smooth.spec,
       smooth.construct.so.smooth.spec,
       smooth.construct.sf.smooth.spec,
       smooth.construct.sw.smooth.spec,   
       smooth.construct.ad.smooth.spec,
       smooth.construct.t2.smooth.spec,
       summary.gam,sp.vcov,
       spasm.construct,spasm.sp,spasm.smooth,
       t2,te,ti,tensor.prod.model.matrix,tensor.prod.penalties,
       totalPenaltySpace,trichol,trind.generator,
       Tweedie,tw,uniquecombs, vcov.gam, vis.gam, ziP, ziplss)

importFrom(grDevices,cm.colors,dev.interactive,devAskNewPage,gray,grey,
           heat.colors,terrain.colors,topo.colors,axisTicks)
importFrom(graphics,abline,axis,axTicks,box,contour,hist,image,lines,
           mtext, par, persp,plot,points,
           polygon,rect,strheight,strwidth,text,title)

importFrom(stats,.checkMFClasses,.getXlevels,anova,approx,as.formula,
binomial,coef,contrasts,"contrasts<-",cooks.distance,cor,cov,
delete.response,dbeta,dgamma,dnorm,dpois,fitted,formula,gaussian,glm,
influence,logLik,lm,mad,
make.link,median,model.frame,model.offset,model.matrix,nlm,
na.pass,napredict,na.omit,naresid,optim,pchisq,pnorm,pt,pf,
power,predict,printCoefmat,quantile,
qbeta,qbinom,qcauchy,qchisq,qnbinom,qgamma,qnorm,qpois,qqline,qqnorm,qqplot,
reformulate,residuals,
rbeta,rbinom,rgamma,rnbinom,rnorm,rpois,runif,sd,
termplot,terms.formula,terms,uniroot,var,vcov,weights)

importFrom(utils,object.size)

importFrom(nlme,Dim,corMatrix,logDet,pdConstruct,pdFactor,pdMatrix,getGroupsFormula,lme,varFixed,lmeControl)
importMethodsFrom(Matrix,t,colMeans,colSums,chol,solve,lu,expand)
importFrom(Matrix,Diagonal,sparseMatrix,Matrix)
importFrom(methods,cbind2,as)
importFrom(stats,weighted.mean)
importFrom(stats,optimize)

S3method(anova, gam)
S3method(influence, gam)
S3method(cooks.distance, gam)
S3method(formula, gam)
S3method(logLik, gam)
S3method(model.matrix,gam)
S3method(plot, gam)
S3method(plot, jam)
S3method(predict, gam)
S3method(predict, bam)
S3method(predict, jam)
S3method(print, anova.gam)
S3method(print, gam)
S3method(print, jam)
S3method(print, summary.gam)
S3method(residuals, gam)
S3method(summary, gam)
S3method(vcov,gam)
S3method(vcov,jam)

S3method(coef,pdTens)
S3method(pdConstruct,pdTens)
S3method(pdFactor,pdTens)
S3method(pdMatrix,pdTens)
S3method(summary,pdTens)

S3method(Dim,pdIdnot)
S3method(coef,pdIdnot)
S3method(corMatrix,pdIdnot)
S3method(logDet,pdIdnot)
S3method(pdConstruct,pdIdnot)
S3method(pdFactor,pdIdnot)
S3method(pdMatrix,pdIdnot)
S3method(solve,pdIdnot)
S3method(summary,pdIdnot)

S3method(fix.family.link,family)
S3method(fix.family.link,extended.family)
S3method(fix.family.link,general.family)
S3method(smooth.construct,ad.smooth.spec)
S3method(smooth.construct,bs.smooth.spec)
S3method(smooth.construct, cc.smooth.spec)
S3method(smooth.construct,cp.smooth.spec)
S3method(smooth.construct, cr.smooth.spec)
S3method(smooth.construct, cs.smooth.spec)
S3method(smooth.construct,ds.smooth.spec)
S3method(smooth.construct, fs.smooth.spec)
S3method(smooth.construct, mrf.smooth.spec)
S3method(smooth.construct, gp.smooth.spec)
S3method(smooth.construct,ps.smooth.spec)
S3method(smooth.construct, re.smooth.spec)
S3method(smooth.construct,so.smooth.spec)
S3method(smooth.construct,sw.smooth.spec)
S3method(smooth.construct,sf.smooth.spec)
S3method(smooth.construct,sos.smooth.spec)
S3method(smooth.construct, tp.smooth.spec)
S3method(smooth.construct, tensor.smooth.spec)
S3method(smooth.construct, t2.smooth.spec)
S3method(smooth.construct, ts.smooth.spec)

S3method(Predict.matrix,Bspline.smooth)
S3method(Predict.matrix,cr.smooth)
S3method(Predict.matrix,cs.smooth)
S3method(Predict.matrix,cyclic.smooth)
S3method(Predict.matrix,cpspline.smooth)
S3method(Predict.matrix,duchon.spline)
S3method(Predict.matrix,fs.interaction)
S3method(Predict.matrix,mrf.smooth)
S3method(Predict.matrix,pspline.smooth)
S3method(Predict.matrix,random.effect)
S3method(Predict.matrix,tprs.smooth)
S3method(Predict.matrix,ts.smooth)
S3method(Predict.matrix,tensor.smooth)
S3method(Predict.matrix,t2.smooth)
S3method(Predict.matrix,soap.film)
S3method(Predict.matrix,sf)
S3method(Predict.matrix,sw)
S3method(Predict.matrix,sos.smooth)
S3method(Predict.matrix,gp.smooth)


S3method(spasm.construct,cus)
S3method(spasm.sp,cus)
S3method(spasm.smooth,cus)

S3method(smooth2random,mgcv.smooth)
S3method(smooth2random,fs.interaction)
S3method(smooth2random,tensor.smooth)
S3method(smooth2random,t2.smooth)
