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

#ifndef RCPP_bigReg_RCPPEXPORTS_H_GEN_
#define RCPP_bigReg_RCPPEXPORTS_H_GEN_

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

namespace bigReg {

    using namespace Rcpp;

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

    inline Rcpp::List XWXMatrixW(arma::mat X, arma::mat y, arma::vec W) {
        typedef SEXP(*Ptr_XWXMatrixW)(SEXP,SEXP,SEXP);
        static Ptr_XWXMatrixW p_XWXMatrixW = NULL;
        if (p_XWXMatrixW == NULL) {
            validateSignature("Rcpp::List(*XWXMatrixW)(arma::mat,arma::mat,arma::vec)");
            p_XWXMatrixW = (Ptr_XWXMatrixW)R_GetCCallable("bigReg", "_bigReg_XWXMatrixW");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_XWXMatrixW(Shield<SEXP>(Rcpp::wrap(X)), Shield<SEXP>(Rcpp::wrap(y)), Shield<SEXP>(Rcpp::wrap(W)));
        }
        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 Rcpp::List SVD(Rcpp::List out, double epsilon) {
        typedef SEXP(*Ptr_SVD)(SEXP,SEXP);
        static Ptr_SVD p_SVD = NULL;
        if (p_SVD == NULL) {
            validateSignature("Rcpp::List(*SVD)(Rcpp::List,double)");
            p_SVD = (Ptr_SVD)R_GetCCallable("bigReg", "_bigReg_SVD");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_SVD(Shield<SEXP>(Rcpp::wrap(out)), Shield<SEXP>(Rcpp::wrap(epsilon)));
        }
        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 Rcpp::List XWXMatrix(arma::mat X, arma::mat y) {
        typedef SEXP(*Ptr_XWXMatrix)(SEXP,SEXP);
        static Ptr_XWXMatrix p_XWXMatrix = NULL;
        if (p_XWXMatrix == NULL) {
            validateSignature("Rcpp::List(*XWXMatrix)(arma::mat,arma::mat)");
            p_XWXMatrix = (Ptr_XWXMatrix)R_GetCCallable("bigReg", "_bigReg_XWXMatrix");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_XWXMatrix(Shield<SEXP>(Rcpp::wrap(X)), Shield<SEXP>(Rcpp::wrap(y)));
        }
        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);
    }

}

#endif // RCPP_bigReg_RCPPEXPORTS_H_GEN_
