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

# Export all names
export("aug.x")
export("boot.comp")
export("boot.se")
export("compCDF")
export("dexpmixt")
export("ddirichlet")
export("density.npEM")
export("density.spEM")
export("depth")
export("dmvnorm")
export("ellipse")
export("expRMM_EM")
export("flaremix.init")
export("flaremixEM")
export("gammamix.init")
export("gammamixEM")
export("hmeEM")
export("ise.npEM")
export("lambda")
export("lambda.pert")
export("ldmult")
export("logdmvnorm")
export("logisregmix.init")
export("logisregmixEM")
export("makemultdata")
export("matsqrt")
export("mixturegram")
export("multmix.init")
export("multmixEM")
export("multmixmodel.sel")
export("mvnormalmix.init")
export("mvnormalmixEM")
export("mvnpEM")
export("normalmix.init")
export("normalmixEM")
export("normalmixEM2comp")
export("normalmixMMlc")
export("normmix.sim")
export("normmixrm.sim")
export("npEM")
export("npEMindrep")
export("npEMindrepbw")
export("npMSL")
export("parse.constraints")
export("perm")
export("plot.mixEM")
export("plot.mixMCMC")
export("plot.mvnpEM")
export("plot.npEM")
export("plot.spEM")
export("plot.spEMN01")
export("plotexpRMM")
export("plotFDR")
export("plotly_compCDF")
export("plotly_ellipse")
export("plotly_expRMM")
export("plotly_FDR")
export("plotly_ise.npEM")
export("plotly_mixEM")
export("plotly_mixMCMC")
export("plotly_mixturegram")
export("plotly_npEM")
export("plotly_post.beta")
export("plotly_seq.npEM")
export("plotly_spEMN01")
export("plotly_spRMM")
export("plotly_weibullRMM")
export("plotseq.npEM")
export("plotseq")
export("plotspRMM")
export("plotweibullRMM")
export("poisregmix.init")
export("poisregmixEM")
export("post.beta")
export("print.mvnpEM")
export("print.npEM")
export("print.summary.mvnpEM")
export("print.summary.npEM")
export("regcr")
export("regmix.init")
export("regmix.lambda.init")
export("regmix.mixed.init")
export("regmixEM")
export("regmixEM.lambda")
export("regmixEM.loc")
export("regmixEM.mixed")
export("regmixMH")
export("regmixmodel.sel")
export("repnormmix.init")
export("repnormmixEM")
export("repnormmixmodel.sel")
export("rexpmix")
export("rlnormscalemix")
export("rmvnorm")
export("rmvnormmix")
export("rnormmix")
export("rweibullmix")
export("segregmix.init")
export("segregmixEM")
export("spEM")
export("spEMsymloc")
export("spEMsymlocN01")
export("spregmix")
export("spRMM_SEM")
export("summary.mixEM")
export("summary.mvnpEM")
export("summary.npEM")
export("summary.spRMM")
export("tauequivnormalmixEM")
export("test.equality")
export("test.equality.mixed")
export("try.flare")
export("weibullRMM_SEM")
export("wIQR")
export("wkde")
export("wquantile")

# Import all packages listed as Imports or Depends
import(
  plotly,
  segmented,
  survival
)
import(MASS, except=c(select))
import(stats, except=c(filter))

# S3 methods
S3method(density, npEM)
S3method(density, spEM)
S3method(plot, mixEM)
S3method(plot, mixMCMC)
S3method(plot, mvnpEM)
S3method(plot, npEM)
S3method(plot, spEM)
S3method(plot, spEMN01)
S3method(plotseq, npEM)
S3method(print, mvnpEM)
S3method(print, npEM)
S3method(print, summary.mvnpEM)
S3method(print, summary.npEM)
S3method(summary, mixEM)
S3method(summary, mvnpEM)
S3method(summary, npEM)
S3method(summary, spRMM)

# Import from
importFrom("kernlab", "kpca", "pcv", "Q")
importFrom("grDevices", "chull", "adjustcolor", "colors")
importFrom("graphics", "abline", "barplot", "hist", 
  "layout.show", "legend", "lines", "par", "plot", "points",
  "segments", "title", "axis", "polygon", "rect")
importFrom("scales", "hue_pal")
importFrom("utils", "packageDescription", "tail")