import(ape, deSolve, GenSA, subplex, nloptr)

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

export(hisse, hisse.null4, MarginRecon, SupportRegion, TransMatMaker, ParDrop, ParEqual, BisseToHisse, plot.hisse.states, SimulateHisse, SimToPhylo, GetModelAveTipRates, GetModelAveNodeRates)
exportClasses('hisse.fit', 'hisse.null4.fit', 'higeosse.fit', 'hisse.states', 'hisse.support')

export(hisse, hisse.null4, MarginRecon, MarginReconGeoSSE, SupportRegion, TransMatMaker, ParDrop, ParEqual, BisseToHisse, plot.hisse.states, SimulateHisse, SimToPhylo, GetModelAveRates, GetModelAveEqFreqs, GeoHiSSE, TransMatMakerGeoHiSSE, SimulateGeoHiSSE, TranslateParsMakerGeoHiSSE, plot.geohisse.states, SupportRegionGeoSSE, GetModelWeight)
importFrom("stats", "dbeta", "density", "quantile", "reorder", "rexp", "runif", "weighted.mean", "rbinom")
exportClasses('hisse.fit', 'hisse.null4.fit', 'geohisse.fit', 'hisse.states', 'hisse.support', 'geohisse.support', 'hisse.geosse.states')

export(hisse, hisse.null4, MarginRecon, MarginReconGeoSSE, SupportRegion, TransMatMaker, ParDrop, ParEqual, BisseToHisse, plot.hisse.states, SimulateHisse, SimToPhylo, GetModelAveRates, GetModelAveEqFreqs, GeoHiSSE, TransMatMakerGeoHiSSE, SimulateGeoHiSSE, TranslateParsMakerGeoHiSSE, plot.geohisse.states, SupportRegionGeoSSE, GetModelWeight, MuHiSSE, TransMatMakerMuHiSSE, MarginReconMuHiSSE, SupportRegionMuHiSSE, fGeoHiSSE, TransMatMakerfGeoHiSSE, MarginReconfGeoSSE, makeHiSSELikelihood, plot.muhisse.states)
import(ape, data.table, deSolve, GenSA, subplex, nloptr)
importFrom("phytools", "nodeHeights", "fastAnc", "anc.ML", "getDescendants")
importFrom("grDevices", "colorRampPalette", "nclass.Sturges", "rainbow", "dev.flush", "dev.hold")
importFrom("graphics", "hist", "par", "plot", "rect", "segments", "text", "lines", "plot.new", "plot.window", "points", "strwidth")
importFrom("stats", "dbeta", "density", "quantile", "reorder", "rexp", "runif", "weighted.mean", "rbinom", "median", "optimize", "setNames")
exportClasses('hisse.fit', 'hisse.null4.fit', 'geohisse.fit', 'hisse.states', 'hisse.support', 'geohisse.support', 'hisse.geosse.states', 'muhisse.fit', 'muhisse.states')