## NAMESPACE
useDynLib(diversitree)

## 1. make
export(make.bd)
export(make.bd.ode)
export(make.bd.split)
export(make.bd.t)
export(make.bisse)
export(make.bisse.split)
export(make.bisse.t)
export(make.bisse.td)
export(make.bm)
export(make.geosse)
export(make.mk2)
export(make.mkn)
export(make.musse)
export(make.musse.split)
export(make.musse.t)
export(make.musse.td)
export(make.quasse)
export(make.quasse.split)
export(make.yule)

## 2. print:
S3method(print, bd)
S3method(print, bd.split)
S3method(print, bisse)
S3method(print, bisse.split)
S3method(print, bisse.td)
S3method(print, bm)
S3method(print, mkn)
S3method(print, musse)
S3method(print, yule)

S3method(print, constrained)

## 3: argnames / argnames<-
export(argnames)
export("argnames<-")

S3method(argnames, bd)
S3method(argnames, bd.split)
S3method(argnames, bisse)
S3method(argnames, bisse.split)
S3method(argnames, bisse.td)
S3method(argnames, bm)
S3method(argnames, geosse)
S3method(argnames, mk2)
S3method(argnames, mkn)
S3method(argnames, musse)
S3method(argnames, musse.split)
S3method(argnames, musse.td)
S3method(argnames, quasse)
S3method(argnames, quasse.split)
S3method(argnames, yule)

S3method("argnames<-", bd)
S3method("argnames<-", bd.split)
S3method("argnames<-", bd.t)
S3method("argnames<-", bisse)
S3method("argnames<-", bisse.split)
S3method("argnames<-", bisse.t)
S3method("argnames<-", bisse.td)
S3method("argnames<-", bm)
S3method("argnames<-", geosse)
S3method("argnames<-", mkn) # is also the mk2 method
S3method("argnames<-", musse)
S3method("argnames<-", musse.t)
S3method("argnames<-", quasse)
S3method("argnames<-", quasse.split)
S3method("argnames<-", yule)

## Extra:
S3method(argnames, constrained)
S3method("argnames<-", constrained)

## 4: find.mle
export(find.mle)

S3method(find.mle, mixed)

S3method(find.mle, bd)
S3method(find.mle, bisse)
S3method(find.mle, bm)
S3method(find.mle, default)
S3method(find.mle, geosse)
S3method(find.mle, mkn)
S3method(find.mle, musse)
S3method(find.mle, quasse)
S3method(find.mle, yule)

## Other method support:
S3method(anova, fit.mle)
S3method(coef, fit.mle)
S3method(extractAIC, fit.mle)
S3method(logLik, fit.mle)

## 5. MCMC:
export(mcmc)

S3method(mcmc, default)

S3method(mcmc, bd)
S3method(mcmc, bisse)
S3method(mcmc, bm)
S3method(mcmc, mkn)
S3method(mcmc, musse)

export(sampler.slice)
export(sampler.norm)

export(constrain)
S3method(update, constrained)

## Tree evolution code
export(trees)

export(tree.bd)
export(tree.bisse)
export(tree.musse)
export(tree.quasse)
export(tree.yule)

## Utility functions:
export(protect)
export(invert)
export(big.brother)
export(starting.point.bisse)
export(starting.point.bd)
export(starting.point.geosse)
export(starting.point.musse)
export(starting.point.quasse)
export(profiles.plot)
export(make.prior.exponential)
export(prune)

## Support for time-dependent models
export(constant.t)
export(exponential.t)
export(linear.t)
export(sigmoid.t)
export(stepf.t)
export(make.pars.t)

## Support for QuaSSE models.
export(constant.x)
export(make.linear.x)
export(noroptimal.x)
export(sigmoid.x)
export(sigmoid2.x)
export(stepf.x)

export(make.brownian.with.drift)

## Deprecated:
export(bisse.starting.point)
export(starting.point)

## ASR:
export(asr.marginal)
export(asr.joint)
export(asr.stoch)
S3method(asr.marginal, constrained)
S3method(asr.joint, constrained)
S3method(asr.stoch, constrained)

## ASR/Mkn
S3method(asr.marginal, mkn)
S3method(asr.joint, mkn)
S3method(asr.stoch, mkn)

## ASR/BiSSE
S3method(asr.marginal, bisse)

## ASR/MuSSE
S3method(asr.marginal, musse)


## Support for "clade.tree"s
## TODO: polytomies.to.clades -> clades.from.polytomies
export(make.clade.tree)
export(clades.from.polytomies)
export(clades.from.classification)
S3method(plot, clade.tree)

## Deprecated:
export(polytomies.to.clades)

## History objects
S3method(plot, history)
export(history.from.sim.discrete)

## Constants
export(ROOT.FLAT)
export(ROOT.EQUI)
export(ROOT.OBS)
export(ROOT.GIVEN)
export(ROOT.BOTH)
export(ROOT.ALL)

## QuaSSE util: not generally used.
## export(quasse.extent)
## export(expand.pars.quasse)
## export(make.pde.quasse.fftC)
## export(make.pde.quasse.fftR)
## export(make.pde.quasse.mol)
## export(make.branches.quasse.fftC)
## export(make.branches.quasse.fftR)
## export(make.branches.quasse.mol)
## export(make.branches.aux.quasse.fftC)

## These aren't really needed any more.
## export(load.wisdom)
## export(save.wisdom)

