#=========================================================================
# Global functions or variables
#=========================================================================
importFrom("grDevices", "dev.off", "png")
importFrom("graphics", "hist", "lines", "plot", "rug")
importFrom("sn", "dsn")
importFrom("stats", "coef", "dcauchy", "dnorm", "dt", "dunif",
           "kmeans", "median", "nls", "optim", "pnorm", "rcauchy",
           "resid", "rnorm", "runif", "var", "vcov")
importFrom("utils", "head")

#=========================================================================
# MixtureFitting
#=========================================================================

useDynLib(MixtureFitting)

export(dgmm)
export(dvmm)
export(dcmm)
export(llgmm)
export(llvmm)
export(llcmm)
export(gmm_fit_em)
export(vmm_fit_em)
export(vmm_fit_em_by_diff)
export(vmm_fit_em_by_ll)
export(cmm_fit_em)
export(gmm_init_vector)
export(gmm_init_vector_quantile)
export(vmm_init_vector)
export(cmm_init_vector)
export(polyroot_NR)

#=========================================================================
# Functions in R only
#=========================================================================

export(ds)
export(dsmm)
export(dsnmm)
export(rgmm)
export(rvmm)
export(rcmm)
export(llgmm_conservative)
export(llsmm)
export(llgmm_opposite)
export(llvmm_opposite)
export(llsnmm)
export(aic)
export(bic)
export(gmm_size_probability)
export(gmm_size_probability_nls)
export(gmm_fit_kmeans)
export(gmm_intersections)
export(cmm_intersections)
export(ssd_gradient)
export(pssd_gradient)
export(gradient_descent)
export(ssd)
export(pssd)
export(simplex)
export(rsimplex_start)
export(gmm_fit_hwhm)
export(gmm_fit_hwhm_spline_deriv)
export(cmm_fit_hwhm_spline_deriv)
export(smm_fit_em)
export(smm_fit_em_APK10)
export(smm_fit_em_GNL08)
export(smm_fit_em_CWL04)
export(s_fit_primitive)
export(snmm_fit_em)
export(mk_fit_images)
export(gmm_init_vector_kmeans)
export(gmm_init_vector_quantile)
export(cmm_init_vector_kmeans)
export(smm_init_vector)
export(smm_init_vector_kmeans)
export(snmm_init_vector)
export(gmm_merge_components)
export(smm_split_component)
export(plot_circular_hist)
export(kmeans_circular)
export(wmedian)
export(digamma_approx)
export(kldiv)
export(bhattacharyya_dist)
export(abs_convergence)
export(ratio_convergence)
export(plot_density)
