# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

bwp_project_gaussians_rcpp <- function(M, Sigma, d, max_iter = 200L, step_init = 1.0, tol_grad = 1e-6, tol_obj = 1e-10, eps = 1e-12, verbose = FALSE, armijo_c = 1e-4, armijo_beta = 0.5, ls_max = 25L, ls_min_step = 1e-12) {
    .Call('_maotai_bwp_project_gaussians_rcpp', PACKAGE = 'maotai', M, Sigma, d, max_iter, step_init, tol_grad, tol_obj, eps, verbose, armijo_c, armijo_beta, ls_max, ls_min_step)
}

sphere_dist <- function(vecx, vecy) {
    .Call('_maotai_sphere_dist', PACKAGE = 'maotai', vecx, vecy)
}

cpp_WL_normalise <- function(X) {
    .Call('_maotai_cpp_WL_normalise', PACKAGE = 'maotai', X)
}

cpp_WL_weighted_mean <- function(X, weights) {
    .Call('_maotai_cpp_WL_weighted_mean', PACKAGE = 'maotai', X, weights)
}

compute_SSR <- function(D, Delta) {
    .Call('_maotai_compute_SSR', PACKAGE = 'maotai', D, Delta)
}

compute_stress <- function(D, Dhat) {
    .Call('_maotai_compute_stress', PACKAGE = 'maotai', D, Dhat)
}

main_bmds <- function(D, X0, sigg0, a, alpha, maxiter, constant, verbose, betas) {
    .Call('_maotai_main_bmds', PACKAGE = 'maotai', D, X0, sigg0, a, alpha, maxiter, constant, verbose, betas)
}

caml_frechet_mean <- function(Y_list_R, w, maxit = 200L, tol = 1e-8, step0 = 1.0, c1 = 1e-4, beta = 0.5, verbose = FALSE) {
    .Call('_maotai_caml_frechet_mean', PACKAGE = 'maotai', Y_list_R, w, maxit, tol, step0, c1, beta, verbose)
}

aux_shortestpath <- function(wmat) {
    .Call('_maotai_aux_shortestpath', PACKAGE = 'maotai', wmat)
}

cppsub_2007Wang <- function(V0, mm, d, Spu, Stu, maxiter, eps) {
    .Call('_maotai_cppsub_2007Wang', PACKAGE = 'maotai', V0, mm, d, Spu, Stu, maxiter, eps)
}

gradF <- function(func, xnow, h) {
    .Call('_maotai_gradF', PACKAGE = 'maotai', func, xnow, h)
}

dat2centers <- function(data, centers) {
    .Call('_maotai_dat2centers', PACKAGE = 'maotai', data, centers)
}

cpp_sylvester <- function(A, B, C) {
    .Call('_maotai_cpp_sylvester', PACKAGE = 'maotai', A, B, C)
}

solve_lyapunov <- function(A, B, C) {
    .Call('_maotai_solve_lyapunov', PACKAGE = 'maotai', A, B, C)
}

cpp_weiszfeld <- function(X, abstol, maxiter, xinit, weights, epsnum) {
    .Call('_maotai_cpp_weiszfeld', PACKAGE = 'maotai', X, abstol, maxiter, xinit, weights, epsnum)
}

cpp_kmeans <- function(data, k) {
    .Call('_maotai_cpp_kmeans', PACKAGE = 'maotai', data, k)
}

emds_gamma0 <- function(dmat) {
    .Call('_maotai_emds_gamma0', PACKAGE = 'maotai', dmat)
}

cpp_pairwise_L2 <- function(muA, muB, covA, covB) {
    .Call('_maotai_cpp_pairwise_L2', PACKAGE = 'maotai', muA, muB, covA, covB)
}

integrate_1d <- function(tseq, fval) {
    .Call('_maotai_integrate_1d', PACKAGE = 'maotai', tseq, fval)
}

cpp_pdist <- function(X) {
    .Call('_maotai_cpp_pdist', PACKAGE = 'maotai', X)
}

cpp_geigen <- function(A, B) {
    .Call('_maotai_cpp_geigen', PACKAGE = 'maotai', A, B)
}

cpp_triangle <- function(D) {
    .Call('_maotai_cpp_triangle', PACKAGE = 'maotai', D)
}

cpp_metricdepth <- function(D) {
    .Call('_maotai_cpp_metricdepth', PACKAGE = 'maotai', D)
}

cpp_dist_ks <- function(F) {
    .Call('_maotai_cpp_dist_ks', PACKAGE = 'maotai', F)
}

cpp_dist_lp <- function(t, F, p) {
    .Call('_maotai_cpp_dist_lp', PACKAGE = 'maotai', t, F, p)
}

cpp_dist_wasserstein <- function(q, Q, p) {
    .Call('_maotai_cpp_dist_wasserstein', PACKAGE = 'maotai', q, Q, p)
}

lp_ecdf_distance <- function(x, y, p = 2.0) {
    .Call('_maotai_lp_ecdf_distance', PACKAGE = 'maotai', x, y, p)
}

ks_ecdf_distance <- function(x, y) {
    .Call('_maotai_ks_ecdf_distance', PACKAGE = 'maotai', x, y)
}

lp_ecdf_distance_matrix <- function(samples, p = 2.0) {
    .Call('_maotai_lp_ecdf_distance_matrix', PACKAGE = 'maotai', samples, p)
}

lp_ecdf_distance_to_reference <- function(samples, reference, p = 2.0) {
    .Call('_maotai_lp_ecdf_distance_to_reference', PACKAGE = 'maotai', samples, reference, p)
}

wasserstein_p_unweighted <- function(x, y, p = 2.0) {
    .Call('_maotai_wasserstein_p_unweighted', PACKAGE = 'maotai', x, y, p)
}

wasserstein_p_weighted <- function(x, wx, y, wy, p = 2.0) {
    .Call('_maotai_wasserstein_p_weighted', PACKAGE = 'maotai', x, wx, y, wy, p)
}

wasserstein_p_distance_matrix <- function(samples, p = 2.0) {
    .Call('_maotai_wasserstein_p_distance_matrix', PACKAGE = 'maotai', samples, p)
}

cpp_mmds <- function(D, ndim, maxiter, abstol) {
    .Call('_maotai_cpp_mmds', PACKAGE = 'maotai', D, ndim, maxiter, abstol)
}

src_smacof <- function(D, W, ndim, maxiter, abstol, use_gutman) {
    .Call('_maotai_src_smacof', PACKAGE = 'maotai', D, W, ndim, maxiter, abstol, use_gutman)
}

eval_gaussian <- function(x, mu, cov) {
    .Call('_maotai_eval_gaussian', PACKAGE = 'maotai', x, mu, cov)
}

eval_gaussian_data <- function(X, mu, cov) {
    .Call('_maotai_eval_gaussian_data', PACKAGE = 'maotai', X, mu, cov)
}

eval_gmm_data <- function(X, mus, covs, weight) {
    .Call('_maotai_eval_gmm_data', PACKAGE = 'maotai', X, mus, covs, weight)
}

eval_gmm <- function(x, mus, covs, weight) {
    .Call('_maotai_eval_gmm', PACKAGE = 'maotai', x, mus, covs, weight)
}

src_construct_by_knn <- function(nn_idx, intersection) {
    .Call('_maotai_src_construct_by_knn', PACKAGE = 'maotai', nn_idx, intersection)
}

src_gaussbary_2002R <- function(array3d, weight, maxiter, abstol) {
    .Call('_maotai_src_gaussbary_2002R', PACKAGE = 'maotai', array3d, weight, maxiter, abstol)
}

src_gaussbary_2016A <- function(array3d, weight, maxiter, abstol) {
    .Call('_maotai_src_gaussbary_2016A', PACKAGE = 'maotai', array3d, weight, maxiter, abstol)
}

src_cov2corr <- function(covmat) {
    .Call('_maotai_src_cov2corr', PACKAGE = 'maotai', covmat)
}

src_leida <- function(phase) {
    .Call('_maotai_src_leida', PACKAGE = 'maotai', phase)
}

