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

#ifndef RCPP_rotations_RCPPEXPORTS_H_GEN_
#define RCPP_rotations_RCPPEXPORTS_H_GEN_

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

namespace rotations {

    using namespace Rcpp;

    namespace {
        void validateSignature(const char* sig) {
            Rcpp::Function require = Rcpp::Environment::base_env()["require"];
            require("rotations", Rcpp::Named("quietly") = true);
            typedef int(*Ptr_validate)(const char*);
            static Ptr_validate p_validate = (Ptr_validate)
                R_GetCCallable("rotations", "_rotations_RcppExport_validate");
            if (!p_validate(sig)) {
                throw Rcpp::function_not_exported(
                    "C++ function with signature '" + std::string(sig) + "' not found in rotations");
            }
        }
    }

    inline Rcpp::NumericVector rcayleyCpp(unsigned int n, double kappa) {
        typedef SEXP(*Ptr_rcayleyCpp)(SEXP,SEXP);
        static Ptr_rcayleyCpp p_rcayleyCpp = NULL;
        if (p_rcayleyCpp == NULL) {
            validateSignature("Rcpp::NumericVector(*rcayleyCpp)(unsigned int,double)");
            p_rcayleyCpp = (Ptr_rcayleyCpp)R_GetCCallable("rotations", "_rotations_rcayleyCpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rcayleyCpp(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(kappa)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline Rcpp::NumericVector rmbCpp(unsigned int n, double kappa) {
        typedef SEXP(*Ptr_rmbCpp)(SEXP,SEXP);
        static Ptr_rmbCpp p_rmbCpp = NULL;
        if (p_rmbCpp == NULL) {
            validateSignature("Rcpp::NumericVector(*rmbCpp)(unsigned int,double)");
            p_rmbCpp = (Ptr_rmbCpp)R_GetCCallable("rotations", "_rotations_rmbCpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rmbCpp(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(kappa)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline Rcpp::NumericVector rfisherCpp(unsigned int n, double kappa) {
        typedef SEXP(*Ptr_rfisherCpp)(SEXP,SEXP);
        static Ptr_rfisherCpp p_rfisherCpp = NULL;
        if (p_rfisherCpp == NULL) {
            validateSignature("Rcpp::NumericVector(*rfisherCpp)(unsigned int,double)");
            p_rfisherCpp = (Ptr_rfisherCpp)R_GetCCallable("rotations", "_rotations_rfisherCpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rfisherCpp(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(kappa)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline Rcpp::NumericVector rvmisesCPP(unsigned int n, double kappa) {
        typedef SEXP(*Ptr_rvmisesCPP)(SEXP,SEXP);
        static Ptr_rvmisesCPP p_rvmisesCPP = NULL;
        if (p_rvmisesCPP == NULL) {
            validateSignature("Rcpp::NumericVector(*rvmisesCPP)(unsigned int,double)");
            p_rvmisesCPP = (Ptr_rvmisesCPP)R_GetCCallable("rotations", "_rotations_rvmisesCPP");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rvmisesCPP(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(kappa)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline arma::mat centerCpp(const arma::mat& Rs, const arma::mat& S) {
        typedef SEXP(*Ptr_centerCpp)(SEXP,SEXP);
        static Ptr_centerCpp p_centerCpp = NULL;
        if (p_centerCpp == NULL) {
            validateSignature("arma::mat(*centerCpp)(const arma::mat&,const arma::mat&)");
            p_centerCpp = (Ptr_centerCpp)R_GetCCallable("rotations", "_rotations_centerCpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_centerCpp(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(S)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline double lpvmises(const arma::mat& Rs, const arma::mat& S, double kappa) {
        typedef SEXP(*Ptr_lpvmises)(SEXP,SEXP,SEXP);
        static Ptr_lpvmises p_lpvmises = NULL;
        if (p_lpvmises == NULL) {
            validateSignature("double(*lpvmises)(const arma::mat&,const arma::mat&,double)");
            p_lpvmises = (Ptr_lpvmises)R_GetCCallable("rotations", "_rotations_lpvmises");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_lpvmises(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(S)), Shield<SEXP>(Rcpp::wrap(kappa)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double lpfisher(const arma::mat& Rs, const arma::mat& S, double kappa) {
        typedef SEXP(*Ptr_lpfisher)(SEXP,SEXP,SEXP);
        static Ptr_lpfisher p_lpfisher = NULL;
        if (p_lpfisher == NULL) {
            validateSignature("double(*lpfisher)(const arma::mat&,const arma::mat&,double)");
            p_lpfisher = (Ptr_lpfisher)R_GetCCallable("rotations", "_rotations_lpfisher");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_lpfisher(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(S)), Shield<SEXP>(Rcpp::wrap(kappa)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double lpcayley(const arma::mat& Rs, const arma::mat& S, double kappa) {
        typedef SEXP(*Ptr_lpcayley)(SEXP,SEXP,SEXP);
        static Ptr_lpcayley p_lpcayley = NULL;
        if (p_lpcayley == NULL) {
            validateSignature("double(*lpcayley)(const arma::mat&,const arma::mat&,double)");
            p_lpcayley = (Ptr_lpcayley)R_GetCCallable("rotations", "_rotations_lpcayley");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_lpcayley(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(S)), Shield<SEXP>(Rcpp::wrap(kappa)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline arma::mat S_MCMC_CPP(const arma::mat& Rs, const arma::mat& oldS, double rho, double kappa, int Dist) {
        typedef SEXP(*Ptr_S_MCMC_CPP)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_S_MCMC_CPP p_S_MCMC_CPP = NULL;
        if (p_S_MCMC_CPP == NULL) {
            validateSignature("arma::mat(*S_MCMC_CPP)(const arma::mat&,const arma::mat&,double,double,int)");
            p_S_MCMC_CPP = (Ptr_S_MCMC_CPP)R_GetCCallable("rotations", "_rotations_S_MCMC_CPP");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_S_MCMC_CPP(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(oldS)), Shield<SEXP>(Rcpp::wrap(rho)), Shield<SEXP>(Rcpp::wrap(kappa)), Shield<SEXP>(Rcpp::wrap(Dist)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline double kap_MCMC_CPP(const arma::mat& Rs, double oldKappa, double sigma, const arma::mat& S, int Dist) {
        typedef SEXP(*Ptr_kap_MCMC_CPP)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_kap_MCMC_CPP p_kap_MCMC_CPP = NULL;
        if (p_kap_MCMC_CPP == NULL) {
            validateSignature("double(*kap_MCMC_CPP)(const arma::mat&,double,double,const arma::mat&,int)");
            p_kap_MCMC_CPP = (Ptr_kap_MCMC_CPP)R_GetCCallable("rotations", "_rotations_kap_MCMC_CPP");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_kap_MCMC_CPP(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(oldKappa)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(S)), Shield<SEXP>(Rcpp::wrap(Dist)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline arma::rowvec afun_CPP(const arma::mat& R1, const arma::mat& R2) {
        typedef SEXP(*Ptr_afun_CPP)(SEXP,SEXP);
        static Ptr_afun_CPP p_afun_CPP = NULL;
        if (p_afun_CPP == NULL) {
            validateSignature("arma::rowvec(*afun_CPP)(const arma::mat&,const arma::mat&)");
            p_afun_CPP = (Ptr_afun_CPP)R_GetCCallable("rotations", "_rotations_afun_CPP");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_afun_CPP(Shield<SEXP>(Rcpp::wrap(R1)), Shield<SEXP>(Rcpp::wrap(R2)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::rowvec >(rcpp_result_gen);
    }

    inline Rcpp::List both_MCMC_CPP(const arma::mat& Rs, arma::mat S0, double kappa0, double rho, double sigma, int burnin, int B, int Dist) {
        typedef SEXP(*Ptr_both_MCMC_CPP)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_both_MCMC_CPP p_both_MCMC_CPP = NULL;
        if (p_both_MCMC_CPP == NULL) {
            validateSignature("Rcpp::List(*both_MCMC_CPP)(const arma::mat&,arma::mat,double,double,double,int,int,int)");
            p_both_MCMC_CPP = (Ptr_both_MCMC_CPP)R_GetCCallable("rotations", "_rotations_both_MCMC_CPP");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_both_MCMC_CPP(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(S0)), Shield<SEXP>(Rcpp::wrap(kappa0)), Shield<SEXP>(Rcpp::wrap(rho)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(burnin)), Shield<SEXP>(Rcpp::wrap(B)), Shield<SEXP>(Rcpp::wrap(Dist)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::List >(rcpp_result_gen);
    }

    inline double fisherAxisC(const arma::mat& Qs, const arma::rowvec& Qhat) {
        typedef SEXP(*Ptr_fisherAxisC)(SEXP,SEXP);
        static Ptr_fisherAxisC p_fisherAxisC = NULL;
        if (p_fisherAxisC == NULL) {
            validateSignature("double(*fisherAxisC)(const arma::mat&,const arma::rowvec&)");
            p_fisherAxisC = (Ptr_fisherAxisC)R_GetCCallable("rotations", "_rotations_fisherAxisC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_fisherAxisC(Shield<SEXP>(Rcpp::wrap(Qs)), Shield<SEXP>(Rcpp::wrap(Qhat)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double fisherAxisCSymmetric(const arma::mat& Qs, const arma::rowvec& Qhat) {
        typedef SEXP(*Ptr_fisherAxisCSymmetric)(SEXP,SEXP);
        static Ptr_fisherAxisCSymmetric p_fisherAxisCSymmetric = NULL;
        if (p_fisherAxisCSymmetric == NULL) {
            validateSignature("double(*fisherAxisCSymmetric)(const arma::mat&,const arma::rowvec&)");
            p_fisherAxisCSymmetric = (Ptr_fisherAxisCSymmetric)R_GetCCallable("rotations", "_rotations_fisherAxisCSymmetric");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_fisherAxisCSymmetric(Shield<SEXP>(Rcpp::wrap(Qs)), Shield<SEXP>(Rcpp::wrap(Qhat)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline arma::vec fisherBootC(const arma::mat& Qs, unsigned int m, bool symm) {
        typedef SEXP(*Ptr_fisherBootC)(SEXP,SEXP,SEXP);
        static Ptr_fisherBootC p_fisherBootC = NULL;
        if (p_fisherBootC == NULL) {
            validateSignature("arma::vec(*fisherBootC)(const arma::mat&,unsigned int,bool)");
            p_fisherBootC = (Ptr_fisherBootC)R_GetCCallable("rotations", "_rotations_fisherBootC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_fisherBootC(Shield<SEXP>(Rcpp::wrap(Qs)), Shield<SEXP>(Rcpp::wrap(m)), Shield<SEXP>(Rcpp::wrap(symm)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::vec >(rcpp_result_gen);
    }

    inline Rcpp::NumericVector RdistC(const Rcpp::NumericMatrix& Q1, const Rcpp::NumericVector& Q2) {
        typedef SEXP(*Ptr_RdistC)(SEXP,SEXP);
        static Ptr_RdistC p_RdistC = NULL;
        if (p_RdistC == NULL) {
            validateSignature("Rcpp::NumericVector(*RdistC)(const Rcpp::NumericMatrix&,const Rcpp::NumericVector&)");
            p_RdistC = (Ptr_RdistC)R_GetCCallable("rotations", "_rotations_RdistC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_RdistC(Shield<SEXP>(Rcpp::wrap(Q1)), Shield<SEXP>(Rcpp::wrap(Q2)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline arma::rowvec rdistSO3C(const arma::mat& Rs, const arma::mat& R2) {
        typedef SEXP(*Ptr_rdistSO3C)(SEXP,SEXP);
        static Ptr_rdistSO3C p_rdistSO3C = NULL;
        if (p_rdistSO3C == NULL) {
            validateSignature("arma::rowvec(*rdistSO3C)(const arma::mat&,const arma::mat&)");
            p_rdistSO3C = (Ptr_rdistSO3C)R_GetCCallable("rotations", "_rotations_rdistSO3C");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rdistSO3C(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(R2)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::rowvec >(rcpp_result_gen);
    }

    inline Rcpp::NumericVector EdistC(const Rcpp::NumericMatrix& Q1, const Rcpp::NumericVector& Q2) {
        typedef SEXP(*Ptr_EdistC)(SEXP,SEXP);
        static Ptr_EdistC p_EdistC = NULL;
        if (p_EdistC == NULL) {
            validateSignature("Rcpp::NumericVector(*EdistC)(const Rcpp::NumericMatrix&,const Rcpp::NumericVector&)");
            p_EdistC = (Ptr_EdistC)R_GetCCallable("rotations", "_rotations_EdistC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_EdistC(Shield<SEXP>(Rcpp::wrap(Q1)), Shield<SEXP>(Rcpp::wrap(Q2)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline double oneRdistC(const Rcpp::NumericMatrix& Q1, const Rcpp::NumericVector& Q2) {
        typedef SEXP(*Ptr_oneRdistC)(SEXP,SEXP);
        static Ptr_oneRdistC p_oneRdistC = NULL;
        if (p_oneRdistC == NULL) {
            validateSignature("double(*oneRdistC)(const Rcpp::NumericMatrix&,const Rcpp::NumericVector&)");
            p_oneRdistC = (Ptr_oneRdistC)R_GetCCallable("rotations", "_rotations_oneRdistC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_oneRdistC(Shield<SEXP>(Rcpp::wrap(Q1)), Shield<SEXP>(Rcpp::wrap(Q2)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline Rcpp::NumericVector cdfunsC(const Rcpp::NumericMatrix& Qs, const Rcpp::NumericVector& Qhat) {
        typedef SEXP(*Ptr_cdfunsC)(SEXP,SEXP);
        static Ptr_cdfunsC p_cdfunsC = NULL;
        if (p_cdfunsC == NULL) {
            validateSignature("Rcpp::NumericVector(*cdfunsC)(const Rcpp::NumericMatrix&,const Rcpp::NumericVector&)");
            p_cdfunsC = (Ptr_cdfunsC)R_GetCCallable("rotations", "_rotations_cdfunsC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cdfunsC(Shield<SEXP>(Rcpp::wrap(Qs)), Shield<SEXP>(Rcpp::wrap(Qhat)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline Rcpp::NumericVector cdfunsCMedian(const Rcpp::NumericMatrix& Qs, const Rcpp::NumericVector& Qhat) {
        typedef SEXP(*Ptr_cdfunsCMedian)(SEXP,SEXP);
        static Ptr_cdfunsCMedian p_cdfunsCMedian = NULL;
        if (p_cdfunsCMedian == NULL) {
            validateSignature("Rcpp::NumericVector(*cdfunsCMedian)(const Rcpp::NumericMatrix&,const Rcpp::NumericVector&)");
            p_cdfunsCMedian = (Ptr_cdfunsCMedian)R_GetCCallable("rotations", "_rotations_cdfunsCMedian");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cdfunsCMedian(Shield<SEXP>(Rcpp::wrap(Qs)), Shield<SEXP>(Rcpp::wrap(Qhat)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline Rcpp::NumericVector zhangQ4(const Rcpp::NumericMatrix& Q, unsigned int m) {
        typedef SEXP(*Ptr_zhangQ4)(SEXP,SEXP);
        static Ptr_zhangQ4 p_zhangQ4 = NULL;
        if (p_zhangQ4 == NULL) {
            validateSignature("Rcpp::NumericVector(*zhangQ4)(const Rcpp::NumericMatrix&,unsigned int)");
            p_zhangQ4 = (Ptr_zhangQ4)R_GetCCallable("rotations", "_rotations_zhangQ4");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_zhangQ4(Shield<SEXP>(Rcpp::wrap(Q)), Shield<SEXP>(Rcpp::wrap(m)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline Rcpp::NumericVector cdfunsCSO3(const arma::mat& Rs, const arma::mat& Rhat) {
        typedef SEXP(*Ptr_cdfunsCSO3)(SEXP,SEXP);
        static Ptr_cdfunsCSO3 p_cdfunsCSO3 = NULL;
        if (p_cdfunsCSO3 == NULL) {
            validateSignature("Rcpp::NumericVector(*cdfunsCSO3)(const arma::mat&,const arma::mat&)");
            p_cdfunsCSO3 = (Ptr_cdfunsCSO3)R_GetCCallable("rotations", "_rotations_cdfunsCSO3");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cdfunsCSO3(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(Rhat)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline Rcpp::NumericVector zhangMedianC(const arma::mat& Rs, unsigned int m) {
        typedef SEXP(*Ptr_zhangMedianC)(SEXP,SEXP);
        static Ptr_zhangMedianC p_zhangMedianC = NULL;
        if (p_zhangMedianC == NULL) {
            validateSignature("Rcpp::NumericVector(*zhangMedianC)(const arma::mat&,unsigned int)");
            p_zhangMedianC = (Ptr_zhangMedianC)R_GetCCallable("rotations", "_rotations_zhangMedianC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_zhangMedianC(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(m)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
    }

    inline arma::mat eskewC(const arma::rowvec& U) {
        typedef SEXP(*Ptr_eskewC)(SEXP);
        static Ptr_eskewC p_eskewC = NULL;
        if (p_eskewC == NULL) {
            validateSignature("arma::mat(*eskewC)(const arma::rowvec&)");
            p_eskewC = (Ptr_eskewC)R_GetCCallable("rotations", "_rotations_eskewC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_eskewC(Shield<SEXP>(Rcpp::wrap(U)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat SO3defaultC(const arma::mat& U, const arma::vec& theta) {
        typedef SEXP(*Ptr_SO3defaultC)(SEXP,SEXP);
        static Ptr_SO3defaultC p_SO3defaultC = NULL;
        if (p_SO3defaultC == NULL) {
            validateSignature("arma::mat(*SO3defaultC)(const arma::mat&,const arma::vec&)");
            p_SO3defaultC = (Ptr_SO3defaultC)R_GetCCallable("rotations", "_rotations_SO3defaultC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_SO3defaultC(Shield<SEXP>(Rcpp::wrap(U)), Shield<SEXP>(Rcpp::wrap(theta)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat Q4defaultC(const arma::mat& U, const arma::vec& theta) {
        typedef SEXP(*Ptr_Q4defaultC)(SEXP,SEXP);
        static Ptr_Q4defaultC p_Q4defaultC = NULL;
        if (p_Q4defaultC == NULL) {
            validateSignature("arma::mat(*Q4defaultC)(const arma::mat&,const arma::vec&)");
            p_Q4defaultC = (Ptr_Q4defaultC)R_GetCCallable("rotations", "_rotations_Q4defaultC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_Q4defaultC(Shield<SEXP>(Rcpp::wrap(U)), Shield<SEXP>(Rcpp::wrap(theta)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat pMatC(const arma::mat& p) {
        typedef SEXP(*Ptr_pMatC)(SEXP);
        static Ptr_pMatC p_pMatC = NULL;
        if (p_pMatC == NULL) {
            validateSignature("arma::mat(*pMatC)(const arma::mat&)");
            p_pMatC = (Ptr_pMatC)R_GetCCallable("rotations", "_rotations_pMatC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_pMatC(Shield<SEXP>(Rcpp::wrap(p)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat genrC(const arma::vec& r, const arma::mat& S, int SO3, const arma::mat& u) {
        typedef SEXP(*Ptr_genrC)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_genrC p_genrC = NULL;
        if (p_genrC == NULL) {
            validateSignature("arma::mat(*genrC)(const arma::vec&,const arma::mat&,int,const arma::mat&)");
            p_genrC = (Ptr_genrC)R_GetCCallable("rotations", "_rotations_genrC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_genrC(Shield<SEXP>(Rcpp::wrap(r)), Shield<SEXP>(Rcpp::wrap(S)), Shield<SEXP>(Rcpp::wrap(SO3)), Shield<SEXP>(Rcpp::wrap(u)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline int checkQ4(const Rcpp::NumericMatrix& Q) {
        typedef SEXP(*Ptr_checkQ4)(SEXP);
        static Ptr_checkQ4 p_checkQ4 = NULL;
        if (p_checkQ4 == NULL) {
            validateSignature("int(*checkQ4)(const Rcpp::NumericMatrix&)");
            p_checkQ4 = (Ptr_checkQ4)R_GetCCallable("rotations", "_rotations_checkQ4");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_checkQ4(Shield<SEXP>(Rcpp::wrap(Q)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline int checkSO3(const arma::mat& Rs) {
        typedef SEXP(*Ptr_checkSO3)(SEXP);
        static Ptr_checkSO3 p_checkSO3 = NULL;
        if (p_checkSO3 == NULL) {
            validateSignature("int(*checkSO3)(const arma::mat&)");
            p_checkSO3 = (Ptr_checkSO3)R_GetCCallable("rotations", "_rotations_checkSO3");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_checkSO3(Shield<SEXP>(Rcpp::wrap(Rs)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline arma::mat expskewC(const arma::mat& M) {
        typedef SEXP(*Ptr_expskewC)(SEXP);
        static Ptr_expskewC p_expskewC = NULL;
        if (p_expskewC == NULL) {
            validateSignature("arma::mat(*expskewC)(const arma::mat&)");
            p_expskewC = (Ptr_expskewC)R_GetCCallable("rotations", "_rotations_expskewC");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_expskewC(Shield<SEXP>(Rcpp::wrap(M)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat expskewCMulti(const arma::mat& M) {
        typedef SEXP(*Ptr_expskewCMulti)(SEXP);
        static Ptr_expskewCMulti p_expskewCMulti = NULL;
        if (p_expskewCMulti == NULL) {
            validateSignature("arma::mat(*expskewCMulti)(const arma::mat&)");
            p_expskewCMulti = (Ptr_expskewCMulti)R_GetCCallable("rotations", "_rotations_expskewCMulti");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_expskewCMulti(Shield<SEXP>(Rcpp::wrap(M)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat logSO3C(const arma::mat& R) {
        typedef SEXP(*Ptr_logSO3C)(SEXP);
        static Ptr_logSO3C p_logSO3C = NULL;
        if (p_logSO3C == NULL) {
            validateSignature("arma::mat(*logSO3C)(const arma::mat&)");
            p_logSO3C = (Ptr_logSO3C)R_GetCCallable("rotations", "_rotations_logSO3C");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_logSO3C(Shield<SEXP>(Rcpp::wrap(R)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat logSO3CMulti(const arma::mat& R) {
        typedef SEXP(*Ptr_logSO3CMulti)(SEXP);
        static Ptr_logSO3CMulti p_logSO3CMulti = NULL;
        if (p_logSO3CMulti == NULL) {
            validateSignature("arma::mat(*logSO3CMulti)(const arma::mat&)");
            p_logSO3CMulti = (Ptr_logSO3CMulti)R_GetCCallable("rotations", "_rotations_logSO3CMulti");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_logSO3CMulti(Shield<SEXP>(Rcpp::wrap(R)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat projectSO3C(const arma::mat& M) {
        typedef SEXP(*Ptr_projectSO3C)(SEXP);
        static Ptr_projectSO3C p_projectSO3C = NULL;
        if (p_projectSO3C == NULL) {
            validateSignature("arma::mat(*projectSO3C)(const arma::mat&)");
            p_projectSO3C = (Ptr_projectSO3C)R_GetCCallable("rotations", "_rotations_projectSO3C");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_projectSO3C(Shield<SEXP>(Rcpp::wrap(M)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat meanSO3C(const arma::mat& Rs) {
        typedef SEXP(*Ptr_meanSO3C)(SEXP);
        static Ptr_meanSO3C p_meanSO3C = NULL;
        if (p_meanSO3C == NULL) {
            validateSignature("arma::mat(*meanSO3C)(const arma::mat&)");
            p_meanSO3C = (Ptr_meanSO3C)R_GetCCallable("rotations", "_rotations_meanSO3C");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_meanSO3C(Shield<SEXP>(Rcpp::wrap(Rs)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::rowvec meanQ4C(const arma::mat& Q) {
        typedef SEXP(*Ptr_meanQ4C)(SEXP);
        static Ptr_meanQ4C p_meanQ4C = NULL;
        if (p_meanQ4C == NULL) {
            validateSignature("arma::rowvec(*meanQ4C)(const arma::mat&)");
            p_meanQ4C = (Ptr_meanQ4C)R_GetCCallable("rotations", "_rotations_meanQ4C");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_meanQ4C(Shield<SEXP>(Rcpp::wrap(Q)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::rowvec >(rcpp_result_gen);
    }

    inline arma::mat medianSO3C(const arma::mat& Rs, unsigned int maxIterations, double maxEps) {
        typedef SEXP(*Ptr_medianSO3C)(SEXP,SEXP,SEXP);
        static Ptr_medianSO3C p_medianSO3C = NULL;
        if (p_medianSO3C == NULL) {
            validateSignature("arma::mat(*medianSO3C)(const arma::mat&,unsigned int,double)");
            p_medianSO3C = (Ptr_medianSO3C)R_GetCCallable("rotations", "_rotations_medianSO3C");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_medianSO3C(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(maxIterations)), Shield<SEXP>(Rcpp::wrap(maxEps)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat HartmedianSO3C(const arma::mat& Rs, unsigned int maxIterations, double maxEps) {
        typedef SEXP(*Ptr_HartmedianSO3C)(SEXP,SEXP,SEXP);
        static Ptr_HartmedianSO3C p_HartmedianSO3C = NULL;
        if (p_HartmedianSO3C == NULL) {
            validateSignature("arma::mat(*HartmedianSO3C)(const arma::mat&,unsigned int,double)");
            p_HartmedianSO3C = (Ptr_HartmedianSO3C)R_GetCCallable("rotations", "_rotations_HartmedianSO3C");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_HartmedianSO3C(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(maxIterations)), Shield<SEXP>(Rcpp::wrap(maxEps)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::mat gmeanSO3C(const arma::mat& Rs, unsigned int maxIterations, double maxEps) {
        typedef SEXP(*Ptr_gmeanSO3C)(SEXP,SEXP,SEXP);
        static Ptr_gmeanSO3C p_gmeanSO3C = NULL;
        if (p_gmeanSO3C == NULL) {
            validateSignature("arma::mat(*gmeanSO3C)(const arma::mat&,unsigned int,double)");
            p_gmeanSO3C = (Ptr_gmeanSO3C)R_GetCCallable("rotations", "_rotations_gmeanSO3C");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_gmeanSO3C(Shield<SEXP>(Rcpp::wrap(Rs)), Shield<SEXP>(Rcpp::wrap(maxIterations)), Shield<SEXP>(Rcpp::wrap(maxEps)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::mat >(rcpp_result_gen);
    }

    inline arma::rowvec HnCpp(const arma::mat& Qs) {
        typedef SEXP(*Ptr_HnCpp)(SEXP);
        static Ptr_HnCpp p_HnCpp = NULL;
        if (p_HnCpp == NULL) {
            validateSignature("arma::rowvec(*HnCpp)(const arma::mat&)");
            p_HnCpp = (Ptr_HnCpp)R_GetCCallable("rotations", "_rotations_HnCpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_HnCpp(Shield<SEXP>(Rcpp::wrap(Qs)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::rowvec >(rcpp_result_gen);
    }

    inline arma::rowvec HnCppIntrinsic(const arma::mat& Qs) {
        typedef SEXP(*Ptr_HnCppIntrinsic)(SEXP);
        static Ptr_HnCppIntrinsic p_HnCppIntrinsic = NULL;
        if (p_HnCppIntrinsic == NULL) {
            validateSignature("arma::rowvec(*HnCppIntrinsic)(const arma::mat&)");
            p_HnCppIntrinsic = (Ptr_HnCppIntrinsic)R_GetCCallable("rotations", "_rotations_HnCppIntrinsic");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_HnCppIntrinsic(Shield<SEXP>(Rcpp::wrap(Qs)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::rowvec >(rcpp_result_gen);
    }

    inline arma::rowvec HnCppBloc(const arma::mat& Qs, const arma::mat& Cs) {
        typedef SEXP(*Ptr_HnCppBloc)(SEXP,SEXP);
        static Ptr_HnCppBloc p_HnCppBloc = NULL;
        if (p_HnCppBloc == NULL) {
            validateSignature("arma::rowvec(*HnCppBloc)(const arma::mat&,const arma::mat&)");
            p_HnCppBloc = (Ptr_HnCppBloc)R_GetCCallable("rotations", "_rotations_HnCppBloc");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_HnCppBloc(Shield<SEXP>(Rcpp::wrap(Qs)), Shield<SEXP>(Rcpp::wrap(Cs)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::rowvec >(rcpp_result_gen);
    }

}

#endif // RCPP_rotations_RCPPEXPORTS_H_GEN_
