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

#include <RcppArmadillo.h>
#include <Rcpp.h>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// A_theta_x
arma::mat A_theta_x(arma::vec theta, arma::vec x, arma::uword p, arma::uword N, bool as_matrix);
RcppExport SEXP _sphunif_A_theta_x(SEXP thetaSEXP, SEXP xSEXP, SEXP pSEXP, SEXP NSEXP, SEXP as_matrixSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type N(NSEXP);
    Rcpp::traits::input_parameter< bool >::type as_matrix(as_matrixSEXP);
    rcpp_result_gen = Rcpp::wrap(A_theta_x(theta, x, p, N, as_matrix));
    return rcpp_result_gen;
END_RCPP
}
// Psi_mat
arma::mat Psi_mat(arma::cube data, arma::uvec ind_tri, bool use_ind_tri, bool scalar_prod, bool angles_diff);
RcppExport SEXP _sphunif_Psi_mat(SEXP dataSEXP, SEXP ind_triSEXP, SEXP use_ind_triSEXP, SEXP scalar_prodSEXP, SEXP angles_diffSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::uvec >::type ind_tri(ind_triSEXP);
    Rcpp::traits::input_parameter< bool >::type use_ind_tri(use_ind_triSEXP);
    Rcpp::traits::input_parameter< bool >::type scalar_prod(scalar_prodSEXP);
    Rcpp::traits::input_parameter< bool >::type angles_diff(angles_diffSEXP);
    rcpp_result_gen = Rcpp::wrap(Psi_mat(data, ind_tri, use_ind_tri, scalar_prod, angles_diff));
    return rcpp_result_gen;
END_RCPP
}
// upper_tri_ind
arma::uvec upper_tri_ind(arma::uword n);
RcppExport SEXP _sphunif_upper_tri_ind(SEXP nSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    rcpp_result_gen = Rcpp::wrap(upper_tri_ind(n));
    return rcpp_result_gen;
END_RCPP
}
// sort_each_col
arma::mat sort_each_col(arma::mat A);
RcppExport SEXP _sphunif_sort_each_col(SEXP ASEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type A(ASEXP);
    rcpp_result_gen = Rcpp::wrap(sort_each_col(A));
    return rcpp_result_gen;
END_RCPP
}
// sort_index_each_col
arma::umat sort_index_each_col(arma::mat A);
RcppExport SEXP _sphunif_sort_index_each_col(SEXP ASEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type A(ASEXP);
    rcpp_result_gen = Rcpp::wrap(sort_index_each_col(A));
    return rcpp_result_gen;
END_RCPP
}
// Theta_to_X
arma::cube Theta_to_X(arma::mat Theta);
RcppExport SEXP _sphunif_Theta_to_X(SEXP ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(Theta_to_X(Theta));
    return rcpp_result_gen;
END_RCPP
}
// X_to_Theta
arma::mat X_to_Theta(arma::cube X);
RcppExport SEXP _sphunif_X_to_Theta(SEXP XSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    rcpp_result_gen = Rcpp::wrap(X_to_Theta(X));
    return rcpp_result_gen;
END_RCPP
}
// cir_gaps
arma::mat cir_gaps(arma::mat Theta, bool sorted);
RcppExport SEXP _sphunif_cir_gaps(SEXP ThetaSEXP, SEXP sortedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_gaps(Theta, sorted));
    return rcpp_result_gen;
END_RCPP
}
// ecdf_bin
arma::vec ecdf_bin(arma::vec data, arma::vec sorted_x, bool data_sorted, bool efic, bool divide_n);
RcppExport SEXP _sphunif_ecdf_bin(SEXP dataSEXP, SEXP sorted_xSEXP, SEXP data_sortedSEXP, SEXP eficSEXP, SEXP divide_nSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type sorted_x(sorted_xSEXP);
    Rcpp::traits::input_parameter< bool >::type data_sorted(data_sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type efic(eficSEXP);
    Rcpp::traits::input_parameter< bool >::type divide_n(divide_nSEXP);
    rcpp_result_gen = Rcpp::wrap(ecdf_bin(data, sorted_x, data_sorted, efic, divide_n));
    return rcpp_result_gen;
END_RCPP
}
// beta_inc
arma::vec beta_inc(arma::vec x, double a, double b, bool lower_tail, bool log);
RcppExport SEXP _sphunif_beta_inc(SEXP xSEXP, SEXP aSEXP, SEXP bSEXP, SEXP lower_tailSEXP, SEXP logSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< double >::type b(bSEXP);
    Rcpp::traits::input_parameter< bool >::type lower_tail(lower_tailSEXP);
    Rcpp::traits::input_parameter< bool >::type log(logSEXP);
    rcpp_result_gen = Rcpp::wrap(beta_inc(x, a, b, lower_tail, log));
    return rcpp_result_gen;
END_RCPP
}
// beta_inc_inv
arma::vec beta_inc_inv(arma::vec u, double a, double b, bool lower_tail, bool log);
RcppExport SEXP _sphunif_beta_inc_inv(SEXP uSEXP, SEXP aSEXP, SEXP bSEXP, SEXP lower_tailSEXP, SEXP logSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type u(uSEXP);
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< double >::type b(bSEXP);
    Rcpp::traits::input_parameter< bool >::type lower_tail(lower_tailSEXP);
    Rcpp::traits::input_parameter< bool >::type log(logSEXP);
    rcpp_result_gen = Rcpp::wrap(beta_inc_inv(u, a, b, lower_tail, log));
    return rcpp_result_gen;
END_RCPP
}
// n_from_dist_vector
arma::uword n_from_dist_vector(arma::uword n_dist);
RcppExport SEXP _sphunif_n_from_dist_vector(SEXP n_distSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::uword >::type n_dist(n_distSEXP);
    rcpp_result_gen = Rcpp::wrap(n_from_dist_vector(n_dist));
    return rcpp_result_gen;
END_RCPP
}
// t_inv_sqrt_one
arma::vec t_inv_sqrt_one(arma::vec t);
RcppExport SEXP _sphunif_t_inv_sqrt_one(SEXP tSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type t(tSEXP);
    rcpp_result_gen = Rcpp::wrap(t_inv_sqrt_one(t));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Kuiper
arma::vec cir_stat_Kuiper(arma::mat Theta, bool sorted, bool KS, bool Stephens);
RcppExport SEXP _sphunif_cir_stat_Kuiper(SEXP ThetaSEXP, SEXP sortedSEXP, SEXP KSSEXP, SEXP StephensSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type KS(KSSEXP);
    Rcpp::traits::input_parameter< bool >::type Stephens(StephensSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Kuiper(Theta, sorted, KS, Stephens));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Watson
arma::vec cir_stat_Watson(arma::mat Theta, bool sorted, bool CvM, bool Stephens);
RcppExport SEXP _sphunif_cir_stat_Watson(SEXP ThetaSEXP, SEXP sortedSEXP, SEXP CvMSEXP, SEXP StephensSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type CvM(CvMSEXP);
    Rcpp::traits::input_parameter< bool >::type Stephens(StephensSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Watson(Theta, sorted, CvM, Stephens));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Watson_1976
arma::vec cir_stat_Watson_1976(arma::mat Theta, bool sorted, bool minus);
RcppExport SEXP _sphunif_cir_stat_Watson_1976(SEXP ThetaSEXP, SEXP sortedSEXP, SEXP minusSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type minus(minusSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Watson_1976(Theta, sorted, minus));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Range
arma::vec cir_stat_Range(arma::mat Theta, bool sorted, bool gaps_in_Theta, bool max_gap);
RcppExport SEXP _sphunif_cir_stat_Range(SEXP ThetaSEXP, SEXP sortedSEXP, SEXP gaps_in_ThetaSEXP, SEXP max_gapSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type gaps_in_Theta(gaps_in_ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type max_gap(max_gapSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Range(Theta, sorted, gaps_in_Theta, max_gap));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Rao
arma::vec cir_stat_Rao(arma::mat Theta, bool sorted, bool gaps_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Rao(SEXP ThetaSEXP, SEXP sortedSEXP, SEXP gaps_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type gaps_in_Theta(gaps_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Rao(Theta, sorted, gaps_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Greenwood
arma::vec cir_stat_Greenwood(arma::mat Theta, bool sorted, bool gaps_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Greenwood(SEXP ThetaSEXP, SEXP sortedSEXP, SEXP gaps_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type gaps_in_Theta(gaps_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Greenwood(Theta, sorted, gaps_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Log_gaps
arma::vec cir_stat_Log_gaps(arma::mat Theta, bool sorted, bool gaps_in_Theta, bool abs_val);
RcppExport SEXP _sphunif_cir_stat_Log_gaps(SEXP ThetaSEXP, SEXP sortedSEXP, SEXP gaps_in_ThetaSEXP, SEXP abs_valSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type gaps_in_Theta(gaps_in_ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type abs_val(abs_valSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Log_gaps(Theta, sorted, gaps_in_Theta, abs_val));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Vacancy
arma::vec cir_stat_Vacancy(arma::mat Theta, double a, bool sorted, bool gaps_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Vacancy(SEXP ThetaSEXP, SEXP aSEXP, SEXP sortedSEXP, SEXP gaps_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type gaps_in_Theta(gaps_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Vacancy(Theta, a, sorted, gaps_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Max_uncover
arma::vec cir_stat_Max_uncover(arma::mat Theta, double a, bool sorted, bool gaps_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Max_uncover(SEXP ThetaSEXP, SEXP aSEXP, SEXP sortedSEXP, SEXP gaps_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type gaps_in_Theta(gaps_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Max_uncover(Theta, a, sorted, gaps_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Num_uncover
arma::vec cir_stat_Num_uncover(arma::mat Theta, double a, bool sorted, bool gaps_in_Theta, bool minus_val);
RcppExport SEXP _sphunif_cir_stat_Num_uncover(SEXP ThetaSEXP, SEXP aSEXP, SEXP sortedSEXP, SEXP gaps_in_ThetaSEXP, SEXP minus_valSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type gaps_in_Theta(gaps_in_ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type minus_val(minus_valSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Num_uncover(Theta, a, sorted, gaps_in_Theta, minus_val));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Gini
arma::vec cir_stat_Gini(arma::mat Theta, bool sorted, bool gaps_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Gini(SEXP ThetaSEXP, SEXP sortedSEXP, SEXP gaps_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type gaps_in_Theta(gaps_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Gini(Theta, sorted, gaps_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Gini_squared
arma::vec cir_stat_Gini_squared(arma::mat Theta, bool sorted, bool gaps_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Gini_squared(SEXP ThetaSEXP, SEXP sortedSEXP, SEXP gaps_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type gaps_in_Theta(gaps_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Gini_squared(Theta, sorted, gaps_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Ajne
arma::vec cir_stat_Ajne(arma::mat Theta, bool Psi_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Ajne(SEXP ThetaSEXP, SEXP Psi_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Ajne(Theta, Psi_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_An_Psi
arma::vec cir_stat_An_Psi(arma::mat Psi, arma::uword n);
RcppExport SEXP _sphunif_cir_stat_An_Psi(SEXP PsiSEXP, SEXP nSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_An_Psi(Psi, n));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Rothman
arma::vec cir_stat_Rothman(arma::mat Theta, double t, bool Psi_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Rothman(SEXP ThetaSEXP, SEXP tSEXP, SEXP Psi_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< double >::type t(tSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Rothman(Theta, t, Psi_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Rothman_Psi
arma::vec cir_stat_Rothman_Psi(arma::mat Psi, double t_m2, double t_min2, arma::uword n);
RcppExport SEXP _sphunif_cir_stat_Rothman_Psi(SEXP PsiSEXP, SEXP t_m2SEXP, SEXP t_min2SEXP, SEXP nSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< double >::type t_m2(t_m2SEXP);
    Rcpp::traits::input_parameter< double >::type t_min2(t_min2SEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Rothman_Psi(Psi, t_m2, t_min2, n));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Hodges_Ajne
arma::vec cir_stat_Hodges_Ajne(arma::mat Theta, bool asymp_std, bool sorted, bool use_Cressie);
RcppExport SEXP _sphunif_cir_stat_Hodges_Ajne(SEXP ThetaSEXP, SEXP asymp_stdSEXP, SEXP sortedSEXP, SEXP use_CressieSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type asymp_std(asymp_stdSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    Rcpp::traits::input_parameter< bool >::type use_Cressie(use_CressieSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Hodges_Ajne(Theta, asymp_std, sorted, use_Cressie));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Cressie
arma::vec cir_stat_Cressie(arma::mat Theta, double t, bool sorted);
RcppExport SEXP _sphunif_cir_stat_Cressie(SEXP ThetaSEXP, SEXP tSEXP, SEXP sortedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< double >::type t(tSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Cressie(Theta, t, sorted));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_FG01
arma::vec cir_stat_FG01(arma::mat Theta, bool sorted);
RcppExport SEXP _sphunif_cir_stat_FG01(SEXP ThetaSEXP, SEXP sortedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_FG01(Theta, sorted));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Rayleigh
arma::vec cir_stat_Rayleigh(arma::mat Theta, arma::uword m);
RcppExport SEXP _sphunif_cir_stat_Rayleigh(SEXP ThetaSEXP, SEXP mSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type m(mSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Rayleigh(Theta, m));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Bingham
arma::vec cir_stat_Bingham(arma::mat Theta);
RcppExport SEXP _sphunif_cir_stat_Bingham(SEXP ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Bingham(Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Hermans_Rasson
arma::vec cir_stat_Hermans_Rasson(arma::mat Theta, bool Psi_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Hermans_Rasson(SEXP ThetaSEXP, SEXP Psi_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Hermans_Rasson(Theta, Psi_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Hermans_Rasson_Psi
arma::vec cir_stat_Hermans_Rasson_Psi(arma::mat Psi, arma::uword n);
RcppExport SEXP _sphunif_cir_stat_Hermans_Rasson_Psi(SEXP PsiSEXP, SEXP nSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Hermans_Rasson_Psi(Psi, n));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Gine_Gn
arma::vec cir_stat_Gine_Gn(arma::mat Theta, bool Psi_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Gine_Gn(SEXP ThetaSEXP, SEXP Psi_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Gine_Gn(Theta, Psi_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Gine_Fn
arma::vec cir_stat_Gine_Fn(arma::mat Theta, bool Psi_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Gine_Fn(SEXP ThetaSEXP, SEXP Psi_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Gine_Fn(Theta, Psi_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Pycke
arma::vec cir_stat_Pycke(arma::mat Theta, bool Psi_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Pycke(SEXP ThetaSEXP, SEXP Psi_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Pycke(Theta, Psi_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Pycke_Psi
arma::vec cir_stat_Pycke_Psi(arma::mat Psi, arma::uword n);
RcppExport SEXP _sphunif_cir_stat_Pycke_Psi(SEXP PsiSEXP, SEXP nSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Pycke_Psi(Psi, n));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Pycke_q
arma::vec cir_stat_Pycke_q(arma::mat Theta, bool Psi_in_Theta, double q);
RcppExport SEXP _sphunif_cir_stat_Pycke_q(SEXP ThetaSEXP, SEXP Psi_in_ThetaSEXP, SEXP qSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    Rcpp::traits::input_parameter< double >::type q(qSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Pycke_q(Theta, Psi_in_Theta, q));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Pycke_q_Psi
arma::vec cir_stat_Pycke_q_Psi(arma::mat Psi, arma::uword n, double q);
RcppExport SEXP _sphunif_cir_stat_Pycke_q_Psi(SEXP PsiSEXP, SEXP nSEXP, SEXP qSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type q(qSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Pycke_q_Psi(Psi, n, q));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Bakshaev
arma::vec cir_stat_Bakshaev(arma::mat Theta, bool Psi_in_Theta);
RcppExport SEXP _sphunif_cir_stat_Bakshaev(SEXP ThetaSEXP, SEXP Psi_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Bakshaev(Theta, Psi_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_Riesz
arma::vec cir_stat_Riesz(arma::mat Theta, bool Psi_in_Theta, double s);
RcppExport SEXP _sphunif_cir_stat_Riesz(SEXP ThetaSEXP, SEXP Psi_in_ThetaSEXP, SEXP sSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    Rcpp::traits::input_parameter< double >::type s(sSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_Riesz(Theta, Psi_in_Theta, s));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_PCvM
arma::vec cir_stat_PCvM(arma::mat Theta, bool Psi_in_Theta);
RcppExport SEXP _sphunif_cir_stat_PCvM(SEXP ThetaSEXP, SEXP Psi_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_PCvM(Theta, Psi_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_PRt
arma::vec cir_stat_PRt(arma::mat Theta, double t, bool Psi_in_Theta);
RcppExport SEXP _sphunif_cir_stat_PRt(SEXP ThetaSEXP, SEXP tSEXP, SEXP Psi_in_ThetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< double >::type t(tSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_PRt(Theta, t, Psi_in_Theta));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_PAD
arma::vec cir_stat_PAD(arma::mat Theta, bool Psi_in_Theta, bool AD, bool sorted);
RcppExport SEXP _sphunif_cir_stat_PAD(SEXP ThetaSEXP, SEXP Psi_in_ThetaSEXP, SEXP ADSEXP, SEXP sortedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_Theta(Psi_in_ThetaSEXP);
    Rcpp::traits::input_parameter< bool >::type AD(ADSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_PAD(Theta, Psi_in_Theta, AD, sorted));
    return rcpp_result_gen;
END_RCPP
}
// cir_stat_CCF09
arma::vec cir_stat_CCF09(arma::mat Theta, arma::mat dirs, arma::uword K_CCF09, bool original);
RcppExport SEXP _sphunif_cir_stat_CCF09(SEXP ThetaSEXP, SEXP dirsSEXP, SEXP K_CCF09SEXP, SEXP originalSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Theta(ThetaSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type dirs(dirsSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_CCF09(K_CCF09SEXP);
    Rcpp::traits::input_parameter< bool >::type original(originalSEXP);
    rcpp_result_gen = Rcpp::wrap(cir_stat_CCF09(Theta, dirs, K_CCF09, original));
    return rcpp_result_gen;
END_RCPP
}
// p_Kolmogorov
arma::vec p_Kolmogorov(arma::vec x, arma::uword K_Kolmogorov, bool alternating);
RcppExport SEXP _sphunif_p_Kolmogorov(SEXP xSEXP, SEXP K_KolmogorovSEXP, SEXP alternatingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_Kolmogorov(K_KolmogorovSEXP);
    Rcpp::traits::input_parameter< bool >::type alternating(alternatingSEXP);
    rcpp_result_gen = Rcpp::wrap(p_Kolmogorov(x, K_Kolmogorov, alternating));
    return rcpp_result_gen;
END_RCPP
}
// d_Kolmogorov
arma::vec d_Kolmogorov(arma::vec x, arma::uword K_Kolmogorov, bool alternating);
RcppExport SEXP _sphunif_d_Kolmogorov(SEXP xSEXP, SEXP K_KolmogorovSEXP, SEXP alternatingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_Kolmogorov(K_KolmogorovSEXP);
    Rcpp::traits::input_parameter< bool >::type alternating(alternatingSEXP);
    rcpp_result_gen = Rcpp::wrap(d_Kolmogorov(x, K_Kolmogorov, alternating));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Ajne
arma::vec p_cir_stat_Ajne(arma::vec x, arma::uword K_Ajne);
RcppExport SEXP _sphunif_p_cir_stat_Ajne(SEXP xSEXP, SEXP K_AjneSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_Ajne(K_AjneSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Ajne(x, K_Ajne));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Ajne
arma::vec d_cir_stat_Ajne(arma::vec x, arma::uword K_Ajne);
RcppExport SEXP _sphunif_d_cir_stat_Ajne(SEXP xSEXP, SEXP K_AjneSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_Ajne(K_AjneSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Ajne(x, K_Ajne));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Bingham
arma::vec p_cir_stat_Bingham(arma::vec x);
RcppExport SEXP _sphunif_p_cir_stat_Bingham(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Bingham(x));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Bingham
arma::vec d_cir_stat_Bingham(arma::vec x);
RcppExport SEXP _sphunif_d_cir_stat_Bingham(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Bingham(x));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Greenwood
arma::vec p_cir_stat_Greenwood(arma::vec x);
RcppExport SEXP _sphunif_p_cir_stat_Greenwood(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Greenwood(x));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Greenwood
arma::vec d_cir_stat_Greenwood(arma::vec x);
RcppExport SEXP _sphunif_d_cir_stat_Greenwood(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Greenwood(x));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Gini
arma::vec p_cir_stat_Gini(arma::vec x);
RcppExport SEXP _sphunif_p_cir_stat_Gini(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Gini(x));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Gini
arma::vec d_cir_stat_Gini(arma::vec x);
RcppExport SEXP _sphunif_d_cir_stat_Gini(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Gini(x));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Gini_squared
arma::vec p_cir_stat_Gini_squared(arma::vec x);
RcppExport SEXP _sphunif_p_cir_stat_Gini_squared(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Gini_squared(x));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Gini_squared
arma::vec d_cir_stat_Gini_squared(arma::vec x);
RcppExport SEXP _sphunif_d_cir_stat_Gini_squared(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Gini_squared(x));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Hodges_Ajne2
arma::vec p_cir_stat_Hodges_Ajne2(arma::vec x, arma::uword n, bool asymp_std);
RcppExport SEXP _sphunif_p_cir_stat_Hodges_Ajne2(SEXP xSEXP, SEXP nSEXP, SEXP asymp_stdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< bool >::type asymp_std(asymp_stdSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Hodges_Ajne2(x, n, asymp_std));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Hodges_Ajne
arma::vec p_cir_stat_Hodges_Ajne(arma::vec x, arma::uword n, bool exact, bool asymp_std);
RcppExport SEXP _sphunif_p_cir_stat_Hodges_Ajne(SEXP xSEXP, SEXP nSEXP, SEXP exactSEXP, SEXP asymp_stdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< bool >::type exact(exactSEXP);
    Rcpp::traits::input_parameter< bool >::type asymp_std(asymp_stdSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Hodges_Ajne(x, n, exact, asymp_std));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Hodges_Ajne
arma::vec d_cir_stat_Hodges_Ajne(arma::vec x, arma::uword n, bool exact, bool asymp_std);
RcppExport SEXP _sphunif_d_cir_stat_Hodges_Ajne(SEXP xSEXP, SEXP nSEXP, SEXP exactSEXP, SEXP asymp_stdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< bool >::type exact(exactSEXP);
    Rcpp::traits::input_parameter< bool >::type asymp_std(asymp_stdSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Hodges_Ajne(x, n, exact, asymp_std));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Kuiper
arma::vec p_cir_stat_Kuiper(arma::vec x, arma::uword n, arma::uword K_Kuiper, bool second_term, bool Stephens);
RcppExport SEXP _sphunif_p_cir_stat_Kuiper(SEXP xSEXP, SEXP nSEXP, SEXP K_KuiperSEXP, SEXP second_termSEXP, SEXP StephensSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_Kuiper(K_KuiperSEXP);
    Rcpp::traits::input_parameter< bool >::type second_term(second_termSEXP);
    Rcpp::traits::input_parameter< bool >::type Stephens(StephensSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Kuiper(x, n, K_Kuiper, second_term, Stephens));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Kuiper
arma::vec d_cir_stat_Kuiper(arma::vec x, arma::uword n, arma::uword K_Kuiper, bool second_term, bool Stephens);
RcppExport SEXP _sphunif_d_cir_stat_Kuiper(SEXP xSEXP, SEXP nSEXP, SEXP K_KuiperSEXP, SEXP second_termSEXP, SEXP StephensSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_Kuiper(K_KuiperSEXP);
    Rcpp::traits::input_parameter< bool >::type second_term(second_termSEXP);
    Rcpp::traits::input_parameter< bool >::type Stephens(StephensSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Kuiper(x, n, K_Kuiper, second_term, Stephens));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Log_gaps
arma::vec p_cir_stat_Log_gaps(arma::vec x, bool abs_val);
RcppExport SEXP _sphunif_p_cir_stat_Log_gaps(SEXP xSEXP, SEXP abs_valSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< bool >::type abs_val(abs_valSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Log_gaps(x, abs_val));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Log_gaps
arma::vec d_cir_stat_Log_gaps(arma::vec x, bool abs_val);
RcppExport SEXP _sphunif_d_cir_stat_Log_gaps(SEXP xSEXP, SEXP abs_valSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< bool >::type abs_val(abs_valSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Log_gaps(x, abs_val));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Max_uncover
arma::vec p_cir_stat_Max_uncover(arma::vec x);
RcppExport SEXP _sphunif_p_cir_stat_Max_uncover(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Max_uncover(x));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Max_uncover
arma::vec d_cir_stat_Max_uncover(arma::vec x);
RcppExport SEXP _sphunif_d_cir_stat_Max_uncover(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Max_uncover(x));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Num_uncover
arma::vec p_cir_stat_Num_uncover(arma::vec x);
RcppExport SEXP _sphunif_p_cir_stat_Num_uncover(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Num_uncover(x));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Num_uncover
arma::vec d_cir_stat_Num_uncover(arma::vec x);
RcppExport SEXP _sphunif_d_cir_stat_Num_uncover(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Num_uncover(x));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Pycke
arma::vec p_cir_stat_Pycke(arma::vec x);
RcppExport SEXP _sphunif_p_cir_stat_Pycke(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Pycke(x));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Pycke
arma::vec d_cir_stat_Pycke(arma::vec x);
RcppExport SEXP _sphunif_d_cir_stat_Pycke(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Pycke(x));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Vacancy
arma::vec p_cir_stat_Vacancy(arma::vec x);
RcppExport SEXP _sphunif_p_cir_stat_Vacancy(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Vacancy(x));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Vacancy
arma::vec d_cir_stat_Vacancy(arma::vec x);
RcppExport SEXP _sphunif_d_cir_stat_Vacancy(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Vacancy(x));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Watson
arma::vec p_cir_stat_Watson(arma::vec x, arma::uword n, arma::uword K_Watson, bool Stephens);
RcppExport SEXP _sphunif_p_cir_stat_Watson(SEXP xSEXP, SEXP nSEXP, SEXP K_WatsonSEXP, SEXP StephensSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_Watson(K_WatsonSEXP);
    Rcpp::traits::input_parameter< bool >::type Stephens(StephensSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Watson(x, n, K_Watson, Stephens));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Watson
arma::vec d_cir_stat_Watson(arma::vec x, arma::uword n, arma::uword K_Watson, bool Stephens);
RcppExport SEXP _sphunif_d_cir_stat_Watson(SEXP xSEXP, SEXP nSEXP, SEXP K_WatsonSEXP, SEXP StephensSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_Watson(K_WatsonSEXP);
    Rcpp::traits::input_parameter< bool >::type Stephens(StephensSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Watson(x, n, K_Watson, Stephens));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Watson_1976
arma::vec p_cir_stat_Watson_1976(arma::vec x, arma::uword K_Watson_1976, arma::uword N);
RcppExport SEXP _sphunif_p_cir_stat_Watson_1976(SEXP xSEXP, SEXP K_Watson_1976SEXP, SEXP NSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_Watson_1976(K_Watson_1976SEXP);
    Rcpp::traits::input_parameter< arma::uword >::type N(NSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Watson_1976(x, K_Watson_1976, N));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Watson_1976
arma::vec d_cir_stat_Watson_1976(arma::vec x, arma::uword K_Watson_1976);
RcppExport SEXP _sphunif_d_cir_stat_Watson_1976(SEXP xSEXP, SEXP K_Watson_1976SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_Watson_1976(K_Watson_1976SEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Watson_1976(x, K_Watson_1976));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Range
arma::vec p_cir_stat_Range(arma::vec x, arma::uword n, bool max_gap);
RcppExport SEXP _sphunif_p_cir_stat_Range(SEXP xSEXP, SEXP nSEXP, SEXP max_gapSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< bool >::type max_gap(max_gapSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Range(x, n, max_gap));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Range
arma::vec d_cir_stat_Range(arma::vec x, arma::uword n, bool max_gap);
RcppExport SEXP _sphunif_d_cir_stat_Range(SEXP xSEXP, SEXP nSEXP, SEXP max_gapSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< bool >::type max_gap(max_gapSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Range(x, n, max_gap));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Rao
arma::vec p_cir_stat_Rao(arma::vec x);
RcppExport SEXP _sphunif_p_cir_stat_Rao(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Rao(x));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Rao
arma::vec d_cir_stat_Rao(arma::vec x);
RcppExport SEXP _sphunif_d_cir_stat_Rao(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Rao(x));
    return rcpp_result_gen;
END_RCPP
}
// p_cir_stat_Rayleigh
arma::vec p_cir_stat_Rayleigh(arma::vec x);
RcppExport SEXP _sphunif_p_cir_stat_Rayleigh(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(p_cir_stat_Rayleigh(x));
    return rcpp_result_gen;
END_RCPP
}
// d_cir_stat_Rayleigh
arma::vec d_cir_stat_Rayleigh(arma::vec x);
RcppExport SEXP _sphunif_d_cir_stat_Rayleigh(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(d_cir_stat_Rayleigh(x));
    return rcpp_result_gen;
END_RCPP
}
// d_proj_unif
arma::vec d_proj_unif(arma::vec x, arma::uword p, bool log);
RcppExport SEXP _sphunif_d_proj_unif(SEXP xSEXP, SEXP pSEXP, SEXP logSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< bool >::type log(logSEXP);
    rcpp_result_gen = Rcpp::wrap(d_proj_unif(x, p, log));
    return rcpp_result_gen;
END_RCPP
}
// p_proj_unif
arma::vec p_proj_unif(arma::vec x, arma::uword p, bool log);
RcppExport SEXP _sphunif_p_proj_unif(SEXP xSEXP, SEXP pSEXP, SEXP logSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< bool >::type log(logSEXP);
    rcpp_result_gen = Rcpp::wrap(p_proj_unif(x, p, log));
    return rcpp_result_gen;
END_RCPP
}
// q_proj_unif
arma::vec q_proj_unif(arma::vec u, arma::uword p);
RcppExport SEXP _sphunif_q_proj_unif(SEXP uSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type u(uSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(q_proj_unif(u, p));
    return rcpp_result_gen;
END_RCPP
}
// r_unif_cir
arma::mat r_unif_cir(arma::uword n, arma::uword M, bool sorted);
RcppExport SEXP _sphunif_r_unif_cir(SEXP nSEXP, SEXP MSEXP, SEXP sortedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type M(MSEXP);
    Rcpp::traits::input_parameter< bool >::type sorted(sortedSEXP);
    rcpp_result_gen = Rcpp::wrap(r_unif_cir(n, M, sorted));
    return rcpp_result_gen;
END_RCPP
}
// r_unif_sph
arma::cube r_unif_sph(arma::uword n, arma::uword p, arma::uword M);
RcppExport SEXP _sphunif_r_unif_sph(SEXP nSEXP, SEXP pSEXP, SEXP MSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type M(MSEXP);
    rcpp_result_gen = Rcpp::wrap(r_unif_sph(n, p, M));
    return rcpp_result_gen;
END_RCPP
}
// r_wschisq_Cpp
arma::vec r_wschisq_Cpp(arma::uword n, arma::vec weights, arma::vec dfs, arma::vec ncps);
RcppExport SEXP _sphunif_r_wschisq_Cpp(SEXP nSEXP, SEXP weightsSEXP, SEXP dfsSEXP, SEXP ncpsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type weights(weightsSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type dfs(dfsSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type ncps(ncpsSEXP);
    rcpp_result_gen = Rcpp::wrap(r_wschisq_Cpp(n, weights, dfs, ncps));
    return rcpp_result_gen;
END_RCPP
}
// p_wschisq_MC
arma::vec p_wschisq_MC(arma::vec x, arma::vec weights, arma::vec dfs, arma::vec ncps, arma::uword M, arma::vec sample, bool use_sample, bool x_sorted);
RcppExport SEXP _sphunif_p_wschisq_MC(SEXP xSEXP, SEXP weightsSEXP, SEXP dfsSEXP, SEXP ncpsSEXP, SEXP MSEXP, SEXP sampleSEXP, SEXP use_sampleSEXP, SEXP x_sortedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type weights(weightsSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type dfs(dfsSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type ncps(ncpsSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type M(MSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type sample(sampleSEXP);
    Rcpp::traits::input_parameter< bool >::type use_sample(use_sampleSEXP);
    Rcpp::traits::input_parameter< bool >::type x_sorted(x_sortedSEXP);
    rcpp_result_gen = Rcpp::wrap(p_wschisq_MC(x, weights, dfs, ncps, M, sample, use_sample, x_sorted));
    return rcpp_result_gen;
END_RCPP
}
// d_chisq
arma::vec d_chisq(arma::vec x, arma::uword df, arma::uword ncp);
RcppExport SEXP _sphunif_d_chisq(SEXP xSEXP, SEXP dfSEXP, SEXP ncpSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type df(dfSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type ncp(ncpSEXP);
    rcpp_result_gen = Rcpp::wrap(d_chisq(x, df, ncp));
    return rcpp_result_gen;
END_RCPP
}
// p_chisq
arma::vec p_chisq(arma::vec x, arma::uword df, arma::uword ncp);
RcppExport SEXP _sphunif_p_chisq(SEXP xSEXP, SEXP dfSEXP, SEXP ncpSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type df(dfSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type ncp(ncpSEXP);
    rcpp_result_gen = Rcpp::wrap(p_chisq(x, df, ncp));
    return rcpp_result_gen;
END_RCPP
}
// Gauss_Legen_nodes
arma::vec Gauss_Legen_nodes(double a, double b, arma::uword N);
RcppExport SEXP _sphunif_Gauss_Legen_nodes(SEXP aSEXP, SEXP bSEXP, SEXP NSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< double >::type b(bSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type N(NSEXP);
    rcpp_result_gen = Rcpp::wrap(Gauss_Legen_nodes(a, b, N));
    return rcpp_result_gen;
END_RCPP
}
// Gauss_Legen_weights
arma::vec Gauss_Legen_weights(double a, double b, arma::uword N);
RcppExport SEXP _sphunif_Gauss_Legen_weights(SEXP aSEXP, SEXP bSEXP, SEXP NSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type a(aSEXP);
    Rcpp::traits::input_parameter< double >::type b(bSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type N(NSEXP);
    rcpp_result_gen = Rcpp::wrap(Gauss_Legen_weights(a, b, N));
    return rcpp_result_gen;
END_RCPP
}
// p_sph_stat_Bingham
arma::vec p_sph_stat_Bingham(arma::vec x, arma::uword p);
RcppExport SEXP _sphunif_p_sph_stat_Bingham(SEXP xSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(p_sph_stat_Bingham(x, p));
    return rcpp_result_gen;
END_RCPP
}
// d_sph_stat_Bingham
arma::vec d_sph_stat_Bingham(arma::vec x, arma::uword p);
RcppExport SEXP _sphunif_d_sph_stat_Bingham(SEXP xSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(d_sph_stat_Bingham(x, p));
    return rcpp_result_gen;
END_RCPP
}
// p_sph_stat_CJ12
arma::vec p_sph_stat_CJ12(arma::vec x, arma::uword regime, double beta);
RcppExport SEXP _sphunif_p_sph_stat_CJ12(SEXP xSEXP, SEXP regimeSEXP, SEXP betaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type regime(regimeSEXP);
    Rcpp::traits::input_parameter< double >::type beta(betaSEXP);
    rcpp_result_gen = Rcpp::wrap(p_sph_stat_CJ12(x, regime, beta));
    return rcpp_result_gen;
END_RCPP
}
// d_sph_stat_CJ12
arma::vec d_sph_stat_CJ12(arma::vec x, arma::uword regime, double beta);
RcppExport SEXP _sphunif_d_sph_stat_CJ12(SEXP xSEXP, SEXP regimeSEXP, SEXP betaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type regime(regimeSEXP);
    Rcpp::traits::input_parameter< double >::type beta(betaSEXP);
    rcpp_result_gen = Rcpp::wrap(d_sph_stat_CJ12(x, regime, beta));
    return rcpp_result_gen;
END_RCPP
}
// p_sph_stat_Rayleigh
arma::vec p_sph_stat_Rayleigh(arma::vec x, arma::uword p);
RcppExport SEXP _sphunif_p_sph_stat_Rayleigh(SEXP xSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(p_sph_stat_Rayleigh(x, p));
    return rcpp_result_gen;
END_RCPP
}
// d_sph_stat_Rayleigh
arma::vec d_sph_stat_Rayleigh(arma::vec x, arma::uword p);
RcppExport SEXP _sphunif_d_sph_stat_Rayleigh(SEXP xSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(d_sph_stat_Rayleigh(x, p));
    return rcpp_result_gen;
END_RCPP
}
// p_sph_stat_Rayleigh_HD
arma::vec p_sph_stat_Rayleigh_HD(arma::vec x, arma::uword p);
RcppExport SEXP _sphunif_p_sph_stat_Rayleigh_HD(SEXP xSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(p_sph_stat_Rayleigh_HD(x, p));
    return rcpp_result_gen;
END_RCPP
}
// d_sph_stat_Rayleigh_HD
arma::vec d_sph_stat_Rayleigh_HD(arma::vec x, arma::uword p);
RcppExport SEXP _sphunif_d_sph_stat_Rayleigh_HD(SEXP xSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(d_sph_stat_Rayleigh_HD(x, p));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Rayleigh
arma::vec sph_stat_Rayleigh(arma::cube X);
RcppExport SEXP _sphunif_sph_stat_Rayleigh(SEXP XSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Rayleigh(X));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Bingham
arma::vec sph_stat_Bingham(arma::cube X);
RcppExport SEXP _sphunif_sph_stat_Bingham(SEXP XSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Bingham(X));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Ajne
arma::vec sph_stat_Ajne(arma::cube X, bool Psi_in_X);
RcppExport SEXP _sphunif_sph_stat_Ajne(SEXP XSEXP, SEXP Psi_in_XSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_X(Psi_in_XSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Ajne(X, Psi_in_X));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Gine_Gn
arma::vec sph_stat_Gine_Gn(arma::cube X, bool Psi_in_X, arma::uword p);
RcppExport SEXP _sphunif_sph_stat_Gine_Gn(SEXP XSEXP, SEXP Psi_in_XSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_X(Psi_in_XSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Gine_Gn(X, Psi_in_X, p));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Gine_Gn_Psi
arma::vec sph_stat_Gine_Gn_Psi(arma::mat Psi, arma::uword n, arma::uword p);
RcppExport SEXP _sphunif_sph_stat_Gine_Gn_Psi(SEXP PsiSEXP, SEXP nSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Gine_Gn_Psi(Psi, n, p));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Gine_Fn
arma::vec sph_stat_Gine_Fn(arma::cube X, bool Psi_in_X, arma::uword p);
RcppExport SEXP _sphunif_sph_stat_Gine_Fn(SEXP XSEXP, SEXP Psi_in_XSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_X(Psi_in_XSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Gine_Fn(X, Psi_in_X, p));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Gine_Fn_Psi
arma::vec sph_stat_Gine_Fn_Psi(arma::mat Psi, arma::uword n, arma::uword p);
RcppExport SEXP _sphunif_sph_stat_Gine_Fn_Psi(SEXP PsiSEXP, SEXP nSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Gine_Fn_Psi(Psi, n, p));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Pycke
arma::vec sph_stat_Pycke(arma::cube X, bool Psi_in_X, arma::uword p);
RcppExport SEXP _sphunif_sph_stat_Pycke(SEXP XSEXP, SEXP Psi_in_XSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_X(Psi_in_XSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Pycke(X, Psi_in_X, p));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Pycke_Psi
arma::vec sph_stat_Pycke_Psi(arma::mat Psi, arma::uword n, arma::uword p);
RcppExport SEXP _sphunif_sph_stat_Pycke_Psi(SEXP PsiSEXP, SEXP nSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Pycke_Psi(Psi, n, p));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Bakshaev
arma::vec sph_stat_Bakshaev(arma::cube X, bool Psi_in_X, arma::uword p);
RcppExport SEXP _sphunif_sph_stat_Bakshaev(SEXP XSEXP, SEXP Psi_in_XSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_X(Psi_in_XSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Bakshaev(X, Psi_in_X, p));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Riesz
arma::vec sph_stat_Riesz(arma::cube X, bool Psi_in_X, arma::uword p, double s);
RcppExport SEXP _sphunif_sph_stat_Riesz(SEXP XSEXP, SEXP Psi_in_XSEXP, SEXP pSEXP, SEXP sSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_X(Psi_in_XSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< double >::type s(sSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Riesz(X, Psi_in_X, p, s));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Riesz_Psi
arma::vec sph_stat_Riesz_Psi(arma::mat Psi, arma::uword n, double s);
RcppExport SEXP _sphunif_sph_stat_Riesz_Psi(SEXP PsiSEXP, SEXP nSEXP, SEXP sSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type s(sSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Riesz_Psi(Psi, n, s));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_PCvM
arma::vec sph_stat_PCvM(arma::cube X, bool Psi_in_X, arma::uword p, arma::uword N, arma::uword L);
RcppExport SEXP _sphunif_sph_stat_PCvM(SEXP XSEXP, SEXP Psi_in_XSEXP, SEXP pSEXP, SEXP NSEXP, SEXP LSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_X(Psi_in_XSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type N(NSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type L(LSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_PCvM(X, Psi_in_X, p, N, L));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_PCvM_Psi
arma::vec sph_stat_PCvM_Psi(arma::mat Psi, arma::uword n, arma::uword p, arma::vec th_grid, arma::vec int_grid);
RcppExport SEXP _sphunif_sph_stat_PCvM_Psi(SEXP PsiSEXP, SEXP nSEXP, SEXP pSEXP, SEXP th_gridSEXP, SEXP int_gridSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type th_grid(th_gridSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type int_grid(int_gridSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_PCvM_Psi(Psi, n, p, th_grid, int_grid));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_PRt
arma::vec sph_stat_PRt(arma::cube X, double t, bool Psi_in_X, arma::uword p, arma::uword N, arma::uword L);
RcppExport SEXP _sphunif_sph_stat_PRt(SEXP XSEXP, SEXP tSEXP, SEXP Psi_in_XSEXP, SEXP pSEXP, SEXP NSEXP, SEXP LSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< double >::type t(tSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_X(Psi_in_XSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type N(NSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type L(LSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_PRt(X, t, Psi_in_X, p, N, L));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_PRt_Psi
arma::vec sph_stat_PRt_Psi(arma::mat Psi, double t_m, double theta_t_m, arma::uword n, arma::uword p, arma::vec th_grid, arma::vec int_grid);
RcppExport SEXP _sphunif_sph_stat_PRt_Psi(SEXP PsiSEXP, SEXP t_mSEXP, SEXP theta_t_mSEXP, SEXP nSEXP, SEXP pSEXP, SEXP th_gridSEXP, SEXP int_gridSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< double >::type t_m(t_mSEXP);
    Rcpp::traits::input_parameter< double >::type theta_t_m(theta_t_mSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type th_grid(th_gridSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type int_grid(int_gridSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_PRt_Psi(Psi, t_m, theta_t_m, n, p, th_grid, int_grid));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_PAD
arma::vec sph_stat_PAD(arma::cube X, bool Psi_in_X, arma::uword p, arma::uword N, arma::uword L);
RcppExport SEXP _sphunif_sph_stat_PAD(SEXP XSEXP, SEXP Psi_in_XSEXP, SEXP pSEXP, SEXP NSEXP, SEXP LSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_X(Psi_in_XSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type N(NSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type L(LSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_PAD(X, Psi_in_X, p, N, L));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_PAD_Psi
arma::vec sph_stat_PAD_Psi(arma::mat Psi, arma::uword n, arma::uword p, arma::vec th_grid, arma::vec int_grid);
RcppExport SEXP _sphunif_sph_stat_PAD_Psi(SEXP PsiSEXP, SEXP nSEXP, SEXP pSEXP, SEXP th_gridSEXP, SEXP int_gridSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type th_grid(th_gridSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type int_grid(int_gridSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_PAD_Psi(Psi, n, p, th_grid, int_grid));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_CCF09
arma::vec sph_stat_CCF09(arma::cube X, arma::mat dirs, arma::uword K_CCF09, bool original);
RcppExport SEXP _sphunif_sph_stat_CCF09(SEXP XSEXP, SEXP dirsSEXP, SEXP K_CCF09SEXP, SEXP originalSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type dirs(dirsSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type K_CCF09(K_CCF09SEXP);
    Rcpp::traits::input_parameter< bool >::type original(originalSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_CCF09(X, dirs, K_CCF09, original));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_Rayleigh_HD
arma::vec sph_stat_Rayleigh_HD(arma::cube X);
RcppExport SEXP _sphunif_sph_stat_Rayleigh_HD(SEXP XSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_Rayleigh_HD(X));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_CJ12
arma::vec sph_stat_CJ12(arma::cube X, arma::uword regime, bool Psi_in_X, arma::uword p);
RcppExport SEXP _sphunif_sph_stat_CJ12(SEXP XSEXP, SEXP regimeSEXP, SEXP Psi_in_XSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type regime(regimeSEXP);
    Rcpp::traits::input_parameter< bool >::type Psi_in_X(Psi_in_XSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_CJ12(X, regime, Psi_in_X, p));
    return rcpp_result_gen;
END_RCPP
}
// sph_stat_CJ12_Psi
arma::vec sph_stat_CJ12_Psi(arma::mat Psi, arma::uword n, arma::uword p);
RcppExport SEXP _sphunif_sph_stat_CJ12_Psi(SEXP PsiSEXP, SEXP nSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type Psi(PsiSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(sph_stat_CJ12_Psi(Psi, n, p));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_sphunif_A_theta_x", (DL_FUNC) &_sphunif_A_theta_x, 5},
    {"_sphunif_Psi_mat", (DL_FUNC) &_sphunif_Psi_mat, 5},
    {"_sphunif_upper_tri_ind", (DL_FUNC) &_sphunif_upper_tri_ind, 1},
    {"_sphunif_sort_each_col", (DL_FUNC) &_sphunif_sort_each_col, 1},
    {"_sphunif_sort_index_each_col", (DL_FUNC) &_sphunif_sort_index_each_col, 1},
    {"_sphunif_Theta_to_X", (DL_FUNC) &_sphunif_Theta_to_X, 1},
    {"_sphunif_X_to_Theta", (DL_FUNC) &_sphunif_X_to_Theta, 1},
    {"_sphunif_cir_gaps", (DL_FUNC) &_sphunif_cir_gaps, 2},
    {"_sphunif_ecdf_bin", (DL_FUNC) &_sphunif_ecdf_bin, 5},
    {"_sphunif_beta_inc", (DL_FUNC) &_sphunif_beta_inc, 5},
    {"_sphunif_beta_inc_inv", (DL_FUNC) &_sphunif_beta_inc_inv, 5},
    {"_sphunif_n_from_dist_vector", (DL_FUNC) &_sphunif_n_from_dist_vector, 1},
    {"_sphunif_t_inv_sqrt_one", (DL_FUNC) &_sphunif_t_inv_sqrt_one, 1},
    {"_sphunif_cir_stat_Kuiper", (DL_FUNC) &_sphunif_cir_stat_Kuiper, 4},
    {"_sphunif_cir_stat_Watson", (DL_FUNC) &_sphunif_cir_stat_Watson, 4},
    {"_sphunif_cir_stat_Watson_1976", (DL_FUNC) &_sphunif_cir_stat_Watson_1976, 3},
    {"_sphunif_cir_stat_Range", (DL_FUNC) &_sphunif_cir_stat_Range, 4},
    {"_sphunif_cir_stat_Rao", (DL_FUNC) &_sphunif_cir_stat_Rao, 3},
    {"_sphunif_cir_stat_Greenwood", (DL_FUNC) &_sphunif_cir_stat_Greenwood, 3},
    {"_sphunif_cir_stat_Log_gaps", (DL_FUNC) &_sphunif_cir_stat_Log_gaps, 4},
    {"_sphunif_cir_stat_Vacancy", (DL_FUNC) &_sphunif_cir_stat_Vacancy, 4},
    {"_sphunif_cir_stat_Max_uncover", (DL_FUNC) &_sphunif_cir_stat_Max_uncover, 4},
    {"_sphunif_cir_stat_Num_uncover", (DL_FUNC) &_sphunif_cir_stat_Num_uncover, 5},
    {"_sphunif_cir_stat_Gini", (DL_FUNC) &_sphunif_cir_stat_Gini, 3},
    {"_sphunif_cir_stat_Gini_squared", (DL_FUNC) &_sphunif_cir_stat_Gini_squared, 3},
    {"_sphunif_cir_stat_Ajne", (DL_FUNC) &_sphunif_cir_stat_Ajne, 2},
    {"_sphunif_cir_stat_An_Psi", (DL_FUNC) &_sphunif_cir_stat_An_Psi, 2},
    {"_sphunif_cir_stat_Rothman", (DL_FUNC) &_sphunif_cir_stat_Rothman, 3},
    {"_sphunif_cir_stat_Rothman_Psi", (DL_FUNC) &_sphunif_cir_stat_Rothman_Psi, 4},
    {"_sphunif_cir_stat_Hodges_Ajne", (DL_FUNC) &_sphunif_cir_stat_Hodges_Ajne, 4},
    {"_sphunif_cir_stat_Cressie", (DL_FUNC) &_sphunif_cir_stat_Cressie, 3},
    {"_sphunif_cir_stat_FG01", (DL_FUNC) &_sphunif_cir_stat_FG01, 2},
    {"_sphunif_cir_stat_Rayleigh", (DL_FUNC) &_sphunif_cir_stat_Rayleigh, 2},
    {"_sphunif_cir_stat_Bingham", (DL_FUNC) &_sphunif_cir_stat_Bingham, 1},
    {"_sphunif_cir_stat_Hermans_Rasson", (DL_FUNC) &_sphunif_cir_stat_Hermans_Rasson, 2},
    {"_sphunif_cir_stat_Hermans_Rasson_Psi", (DL_FUNC) &_sphunif_cir_stat_Hermans_Rasson_Psi, 2},
    {"_sphunif_cir_stat_Gine_Gn", (DL_FUNC) &_sphunif_cir_stat_Gine_Gn, 2},
    {"_sphunif_cir_stat_Gine_Fn", (DL_FUNC) &_sphunif_cir_stat_Gine_Fn, 2},
    {"_sphunif_cir_stat_Pycke", (DL_FUNC) &_sphunif_cir_stat_Pycke, 2},
    {"_sphunif_cir_stat_Pycke_Psi", (DL_FUNC) &_sphunif_cir_stat_Pycke_Psi, 2},
    {"_sphunif_cir_stat_Pycke_q", (DL_FUNC) &_sphunif_cir_stat_Pycke_q, 3},
    {"_sphunif_cir_stat_Pycke_q_Psi", (DL_FUNC) &_sphunif_cir_stat_Pycke_q_Psi, 3},
    {"_sphunif_cir_stat_Bakshaev", (DL_FUNC) &_sphunif_cir_stat_Bakshaev, 2},
    {"_sphunif_cir_stat_Riesz", (DL_FUNC) &_sphunif_cir_stat_Riesz, 3},
    {"_sphunif_cir_stat_PCvM", (DL_FUNC) &_sphunif_cir_stat_PCvM, 2},
    {"_sphunif_cir_stat_PRt", (DL_FUNC) &_sphunif_cir_stat_PRt, 3},
    {"_sphunif_cir_stat_PAD", (DL_FUNC) &_sphunif_cir_stat_PAD, 4},
    {"_sphunif_cir_stat_CCF09", (DL_FUNC) &_sphunif_cir_stat_CCF09, 4},
    {"_sphunif_p_Kolmogorov", (DL_FUNC) &_sphunif_p_Kolmogorov, 3},
    {"_sphunif_d_Kolmogorov", (DL_FUNC) &_sphunif_d_Kolmogorov, 3},
    {"_sphunif_p_cir_stat_Ajne", (DL_FUNC) &_sphunif_p_cir_stat_Ajne, 2},
    {"_sphunif_d_cir_stat_Ajne", (DL_FUNC) &_sphunif_d_cir_stat_Ajne, 2},
    {"_sphunif_p_cir_stat_Bingham", (DL_FUNC) &_sphunif_p_cir_stat_Bingham, 1},
    {"_sphunif_d_cir_stat_Bingham", (DL_FUNC) &_sphunif_d_cir_stat_Bingham, 1},
    {"_sphunif_p_cir_stat_Greenwood", (DL_FUNC) &_sphunif_p_cir_stat_Greenwood, 1},
    {"_sphunif_d_cir_stat_Greenwood", (DL_FUNC) &_sphunif_d_cir_stat_Greenwood, 1},
    {"_sphunif_p_cir_stat_Gini", (DL_FUNC) &_sphunif_p_cir_stat_Gini, 1},
    {"_sphunif_d_cir_stat_Gini", (DL_FUNC) &_sphunif_d_cir_stat_Gini, 1},
    {"_sphunif_p_cir_stat_Gini_squared", (DL_FUNC) &_sphunif_p_cir_stat_Gini_squared, 1},
    {"_sphunif_d_cir_stat_Gini_squared", (DL_FUNC) &_sphunif_d_cir_stat_Gini_squared, 1},
    {"_sphunif_p_cir_stat_Hodges_Ajne2", (DL_FUNC) &_sphunif_p_cir_stat_Hodges_Ajne2, 3},
    {"_sphunif_p_cir_stat_Hodges_Ajne", (DL_FUNC) &_sphunif_p_cir_stat_Hodges_Ajne, 4},
    {"_sphunif_d_cir_stat_Hodges_Ajne", (DL_FUNC) &_sphunif_d_cir_stat_Hodges_Ajne, 4},
    {"_sphunif_p_cir_stat_Kuiper", (DL_FUNC) &_sphunif_p_cir_stat_Kuiper, 5},
    {"_sphunif_d_cir_stat_Kuiper", (DL_FUNC) &_sphunif_d_cir_stat_Kuiper, 5},
    {"_sphunif_p_cir_stat_Log_gaps", (DL_FUNC) &_sphunif_p_cir_stat_Log_gaps, 2},
    {"_sphunif_d_cir_stat_Log_gaps", (DL_FUNC) &_sphunif_d_cir_stat_Log_gaps, 2},
    {"_sphunif_p_cir_stat_Max_uncover", (DL_FUNC) &_sphunif_p_cir_stat_Max_uncover, 1},
    {"_sphunif_d_cir_stat_Max_uncover", (DL_FUNC) &_sphunif_d_cir_stat_Max_uncover, 1},
    {"_sphunif_p_cir_stat_Num_uncover", (DL_FUNC) &_sphunif_p_cir_stat_Num_uncover, 1},
    {"_sphunif_d_cir_stat_Num_uncover", (DL_FUNC) &_sphunif_d_cir_stat_Num_uncover, 1},
    {"_sphunif_p_cir_stat_Pycke", (DL_FUNC) &_sphunif_p_cir_stat_Pycke, 1},
    {"_sphunif_d_cir_stat_Pycke", (DL_FUNC) &_sphunif_d_cir_stat_Pycke, 1},
    {"_sphunif_p_cir_stat_Vacancy", (DL_FUNC) &_sphunif_p_cir_stat_Vacancy, 1},
    {"_sphunif_d_cir_stat_Vacancy", (DL_FUNC) &_sphunif_d_cir_stat_Vacancy, 1},
    {"_sphunif_p_cir_stat_Watson", (DL_FUNC) &_sphunif_p_cir_stat_Watson, 4},
    {"_sphunif_d_cir_stat_Watson", (DL_FUNC) &_sphunif_d_cir_stat_Watson, 4},
    {"_sphunif_p_cir_stat_Watson_1976", (DL_FUNC) &_sphunif_p_cir_stat_Watson_1976, 3},
    {"_sphunif_d_cir_stat_Watson_1976", (DL_FUNC) &_sphunif_d_cir_stat_Watson_1976, 2},
    {"_sphunif_p_cir_stat_Range", (DL_FUNC) &_sphunif_p_cir_stat_Range, 3},
    {"_sphunif_d_cir_stat_Range", (DL_FUNC) &_sphunif_d_cir_stat_Range, 3},
    {"_sphunif_p_cir_stat_Rao", (DL_FUNC) &_sphunif_p_cir_stat_Rao, 1},
    {"_sphunif_d_cir_stat_Rao", (DL_FUNC) &_sphunif_d_cir_stat_Rao, 1},
    {"_sphunif_p_cir_stat_Rayleigh", (DL_FUNC) &_sphunif_p_cir_stat_Rayleigh, 1},
    {"_sphunif_d_cir_stat_Rayleigh", (DL_FUNC) &_sphunif_d_cir_stat_Rayleigh, 1},
    {"_sphunif_d_proj_unif", (DL_FUNC) &_sphunif_d_proj_unif, 3},
    {"_sphunif_p_proj_unif", (DL_FUNC) &_sphunif_p_proj_unif, 3},
    {"_sphunif_q_proj_unif", (DL_FUNC) &_sphunif_q_proj_unif, 2},
    {"_sphunif_r_unif_cir", (DL_FUNC) &_sphunif_r_unif_cir, 3},
    {"_sphunif_r_unif_sph", (DL_FUNC) &_sphunif_r_unif_sph, 3},
    {"_sphunif_r_wschisq_Cpp", (DL_FUNC) &_sphunif_r_wschisq_Cpp, 4},
    {"_sphunif_p_wschisq_MC", (DL_FUNC) &_sphunif_p_wschisq_MC, 8},
    {"_sphunif_d_chisq", (DL_FUNC) &_sphunif_d_chisq, 3},
    {"_sphunif_p_chisq", (DL_FUNC) &_sphunif_p_chisq, 3},
    {"_sphunif_Gauss_Legen_nodes", (DL_FUNC) &_sphunif_Gauss_Legen_nodes, 3},
    {"_sphunif_Gauss_Legen_weights", (DL_FUNC) &_sphunif_Gauss_Legen_weights, 3},
    {"_sphunif_p_sph_stat_Bingham", (DL_FUNC) &_sphunif_p_sph_stat_Bingham, 2},
    {"_sphunif_d_sph_stat_Bingham", (DL_FUNC) &_sphunif_d_sph_stat_Bingham, 2},
    {"_sphunif_p_sph_stat_CJ12", (DL_FUNC) &_sphunif_p_sph_stat_CJ12, 3},
    {"_sphunif_d_sph_stat_CJ12", (DL_FUNC) &_sphunif_d_sph_stat_CJ12, 3},
    {"_sphunif_p_sph_stat_Rayleigh", (DL_FUNC) &_sphunif_p_sph_stat_Rayleigh, 2},
    {"_sphunif_d_sph_stat_Rayleigh", (DL_FUNC) &_sphunif_d_sph_stat_Rayleigh, 2},
    {"_sphunif_p_sph_stat_Rayleigh_HD", (DL_FUNC) &_sphunif_p_sph_stat_Rayleigh_HD, 2},
    {"_sphunif_d_sph_stat_Rayleigh_HD", (DL_FUNC) &_sphunif_d_sph_stat_Rayleigh_HD, 2},
    {"_sphunif_sph_stat_Rayleigh", (DL_FUNC) &_sphunif_sph_stat_Rayleigh, 1},
    {"_sphunif_sph_stat_Bingham", (DL_FUNC) &_sphunif_sph_stat_Bingham, 1},
    {"_sphunif_sph_stat_Ajne", (DL_FUNC) &_sphunif_sph_stat_Ajne, 2},
    {"_sphunif_sph_stat_Gine_Gn", (DL_FUNC) &_sphunif_sph_stat_Gine_Gn, 3},
    {"_sphunif_sph_stat_Gine_Gn_Psi", (DL_FUNC) &_sphunif_sph_stat_Gine_Gn_Psi, 3},
    {"_sphunif_sph_stat_Gine_Fn", (DL_FUNC) &_sphunif_sph_stat_Gine_Fn, 3},
    {"_sphunif_sph_stat_Gine_Fn_Psi", (DL_FUNC) &_sphunif_sph_stat_Gine_Fn_Psi, 3},
    {"_sphunif_sph_stat_Pycke", (DL_FUNC) &_sphunif_sph_stat_Pycke, 3},
    {"_sphunif_sph_stat_Pycke_Psi", (DL_FUNC) &_sphunif_sph_stat_Pycke_Psi, 3},
    {"_sphunif_sph_stat_Bakshaev", (DL_FUNC) &_sphunif_sph_stat_Bakshaev, 3},
    {"_sphunif_sph_stat_Riesz", (DL_FUNC) &_sphunif_sph_stat_Riesz, 4},
    {"_sphunif_sph_stat_Riesz_Psi", (DL_FUNC) &_sphunif_sph_stat_Riesz_Psi, 3},
    {"_sphunif_sph_stat_PCvM", (DL_FUNC) &_sphunif_sph_stat_PCvM, 5},
    {"_sphunif_sph_stat_PCvM_Psi", (DL_FUNC) &_sphunif_sph_stat_PCvM_Psi, 5},
    {"_sphunif_sph_stat_PRt", (DL_FUNC) &_sphunif_sph_stat_PRt, 6},
    {"_sphunif_sph_stat_PRt_Psi", (DL_FUNC) &_sphunif_sph_stat_PRt_Psi, 7},
    {"_sphunif_sph_stat_PAD", (DL_FUNC) &_sphunif_sph_stat_PAD, 5},
    {"_sphunif_sph_stat_PAD_Psi", (DL_FUNC) &_sphunif_sph_stat_PAD_Psi, 5},
    {"_sphunif_sph_stat_CCF09", (DL_FUNC) &_sphunif_sph_stat_CCF09, 4},
    {"_sphunif_sph_stat_Rayleigh_HD", (DL_FUNC) &_sphunif_sph_stat_Rayleigh_HD, 1},
    {"_sphunif_sph_stat_CJ12", (DL_FUNC) &_sphunif_sph_stat_CJ12, 4},
    {"_sphunif_sph_stat_CJ12_Psi", (DL_FUNC) &_sphunif_sph_stat_CJ12_Psi, 3},
    {NULL, NULL, 0}
};

RcppExport void R_init_sphunif(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
