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

export(anova.gam, bam, bam.update, concurvity, cSplineDes,
       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.outer,gam.vcomp, gamSim , influence.gam, 
       in.out,inSide,interpret.gam, 
       gam.side,
       get.var,ldTweedie,
       initial.sp,logLik.gam,ls.size,
       magic, magic.post.proc, model.matrix.gam, 
        mono.con, mroot, negbin, new.name, 
       notExp,notExp2,notLog,notLog2,pcls,null.space.dimension, 
       pen.edf,pdIdnot,pdTens,
       place.knots, plot.gam, polys.plot,print.anova.gam,
       print.gam,print.summary.gam,predict.gam,
       PredictMat,Predict.matrix,Predict.matrix2,
       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,
       qq.gam,
       residuals.gam,rig,rTweedie, s,
       slanczos,
       smoothCon,smooth.construct,smooth.construct2,
       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.sos.smooth.spec,
       smooth.construct.so.smooth.spec,
       smooth.construct.sf.smooth.spec,
       smooth.construct.sw.smooth.spec,   
       smooth.construct.ad.smooth.spec,
       summary.gam,sp.vcov,
       spasm.construct,spasm.sp,spasm.smooth,
       t2,te,ti,tensor.prod.model.matrix,tensor.prod.penalties,
       Tweedie,uniquecombs, vcov.gam, vis.gam)

importFrom(grDevices,cm.colors,gray,heat.colors,terrain.colors,topo.colors)
importFrom(graphics,axis,box,contour,hist,lines,mtext, par, persp,plot,points,
           polygon,strheight,strwidth,text)
#importFrom(stats,.checkMFClasses,.getXlevels, as.formula, anova,anova.glmlist,
#           coef,cooks.distance,cor,delete.response,family,fitted,formula,
#           gaussian,glm,influence,lm,logLik,median,model.frame,model.matrix,
#           model.offset,na.pass,napredict,naresid,nlm,optim,pchisq,pf,pnorm,pt,
#           predict,printCoefmat ,quantile,qqnorm, reformulate,residuals,rnorm,
#           runif,termplot,terms,terms.formula, uniroot, 
#           var,vcov)

importFrom(stats,anova,influence,cooks.distance,logLik,vcov,residuals,predict,model.matrix)
#importFrom(nlme,Dim,corMatrix,logDet,pdConstruct,pdFactor,pdMatrix,getGroupsFormula,lme,varFixed,lmeControl)
import(nlme)
importMethodsFrom(Matrix,t,colMeans,colSums,chol,solve,lu,expand)
importFrom(Matrix,Diagonal,sparseMatrix,Matrix)
#import(Matrix)
importFrom(methods,cbind2)

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

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(smooth.construct,ad.smooth.spec)
S3method(smooth.construct,ps.smooth.spec)
S3method(smooth.construct,cp.smooth.spec)
S3method(smooth.construct, cc.smooth.spec)
S3method(smooth.construct, cr.smooth.spec)
S3method(smooth.construct, tp.smooth.spec)
S3method(smooth.construct, tensor.smooth.spec)
S3method(smooth.construct, cs.smooth.spec)
S3method(smooth.construct, ts.smooth.spec)


S3method(Predict.matrix,cs.smooth)
S3method(Predict.matrix,ts.smooth)
S3method(Predict.matrix,pspline.smooth)
S3method(Predict.matrix,cr.smooth)
S3method(Predict.matrix,cyclic.smooth)
S3method(Predict.matrix,tensor.smooth)
S3method(Predict.matrix,tprs.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)
