#IMPORTED GENERIC FUNCTIONS TO OVERLOAD
importFrom("graphics",plot)
importFrom("methods",new)
importFrom("raster",extent,projection,"projection<-",raster,writeRaster,zoom)
importFrom("stats",median,predict,simulate)
importFrom("terra",writeVector)
importFrom("utils",head,tail)

#importClassesFrom("Matrix",dpoMatrix)

# non-base generics to export
export(plot)
export(head,tail)
export(extent,projection,"projection<-",raster,writeRaster,zoom)
export(simulate,predict,median)
export(writeVector)

export(as.sf,cluster,compass,emulate,funnel,meta,speed,speeds,video)

export(Log,Exp) # base R methods are not made to be generic
#S3method(log,list) # this stuff doesn't work, but CRAN requires it?
#S3method(log,area)
#S3method(log,ctmm)
#S3method(log,speed)
#S3method(log,UD)

#export(modes,ridges)
#export(SpatialPoints,SpatialPolygonsDataFrame)
#S3method(SpatialPoints,matrix)
#S3method(SpatialPoints,data.frame)
#S3method(SpatialPolygonsDataFrame,SpatialPolygons)

#GENERAL FUNCTIONS
#S3method(det,numeric)
#S3method(determinant,numeric) # can't get these to work???
S3method(mean,list)
S3method(median,list)
S3method(plot,list)
S3method(summary,list)
export("%#%",mag,optimizer)

# modes and ridges
#S3method(modes,numeric)
#S3method(modes,ctmm)
#S3method(modes,UD)
#S3method(ridges,UD)

#S3method(extent,list)
#S3method(extent,telemetry)
#S3method(extent,ctmm)
#S3method(extent,UD)

#PROJECTION METHODS
#S3method(projection,NULL)
#S3method(projection,list)
#S3method(projection,telemetry)
#S3method(projection,ctmm)
#S3method(projection,UD)
#S3method(`projection<-`,list)
#S3method(`projection<-`,telemetry)

#TELEMETRY FUNCTIONS
export(as.telemetry,SpatialPoints.telemetry,SpatialPointsDataFrame.telemetry,SpatialPolygonsDataFrame.telemetry,tbind)
S3method(as.telemetry,character)
S3method(as.telemetry,data.frame)
S3method(as.telemetry,Move)
S3method(as.telemetry,MoveStack)
S3method(mag,telemetry)
S3method(median,telemetry)
S3method(plot,telemetry)
S3method(subset,telemetry)
S3method(summary,telemetry)
S3method(`[`,telemetry)
S3method(head,telemetry)
S3method(tail,telemetry)
#S3method(rbind,telemetry)
#S3method(sample,telemetry)
export(dt.plot)

#VARIOGRAM FUNCTIONS
export(variogram,variogram.fit)
S3method(mean,variogram)
S3method(plot,variogram)
S3method(subset,variogram)
S3method(`[`,variogram)

#PERIODOGRAM FUNCTIONS
export(periodogram)
S3method(plot,periodogram)
S3method(subset,periodogram)
S3method(`[`,periodogram)

#LIKELIHOOD/MODEL FUNCTIONS
export(correlogram,ctmm,ctmm.guess,ctmm.fit,ctmm.loglike,ctmm.select,ctmm.boot)
S3method(plot,ctmm)
S3method(mean,ctmm)
S3method(residuals,telemetry)
S3method(residuals,ctmm)
S3method(summary,ctmm)
S3method(str,ctmm)

#MEAN FUNCTIONS

#AKDE FUNCTIONS
export(agde,akde,bandwidth,homerange,pkde,SpatialPolygonsDataFrame.UD,suitability)
#S3method(akde,list)
#S3method(akde,telemetry)
S3method(mean,UD)
S3method(plot,UD)
S3method(summary,UD)
#S3method(log,area)

#S3method(plot,RS)

#KRIGE FUNCTIONS
export(occurrence)
S3method(predict,ctmm)
S3method(predict,telemetry)
S3method(simulate,ctmm)
S3method(simulate,telemetry)
S3method(speed,ctmm)
S3method(speed,telemetry)
S3method(speeds,ctmm)
S3method(speeds,telemetry)

#UERE FUNCTIONS
export(uere,"uere<-",uere.fit,outlie)
S3method(str,UERE)
S3method(summary,UERE)
S3method(plot,outlie)

#OVERLAP FUNCTIONS
export(overlap,distance)
#S3method(overlap,list)
#S3method(overlap,ctmm)
#S3method(overlap,telemetry)
#S3method(overlap,UD)

S3method(emulate,ctmm)
S3method(emulate,telemetry)
#S3method(AICc,ctmm)
#S3method(AICc,list)

# time and time-visualization methods
export(annotate,color)

# GUI selection methods
export(lasso,marquee,cleave)

# ENCOUNTER FUNCTIONS
export(encounter,cde)

# RSF functions
export(rsf.fit,rsf.select,sdm.fit,sdm.select,sdm.integrate,intensity)

# revisitation
export(revisitation)
export(npr)

# difference vector
export(difference,midpoint,proximity,distances)

# pretty units and significant figures
export(sigfig,dimfig)

export(transition)

export(pd.solve,pd.logdet,pd.sqrtm)
