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

#ifndef RCPP_ragt2ridges_RCPPEXPORTS_H_GEN_
#define RCPP_ragt2ridges_RCPPEXPORTS_H_GEN_

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

namespace ragt2ridges {

    using namespace Rcpp;

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

    inline Rcpp::List _armaVAR1_ridgeML(Rcpp::NumericVector& Yraw, const double lambdaA, const double lambdaP, arma::mat& targetA, arma::mat& targetP, std::string targetPtype, std::string fitA, arma::mat& unbalanced, bool diagP, bool efficient, const int nInit, const double minSuccDiff) {
        typedef SEXP(*Ptr__armaVAR1_ridgeML)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr__armaVAR1_ridgeML p__armaVAR1_ridgeML = NULL;
        if (p__armaVAR1_ridgeML == NULL) {
            validateSignature("Rcpp::List(*_armaVAR1_ridgeML)(Rcpp::NumericVector&,const double,const double,arma::mat&,arma::mat&,std::string,std::string,arma::mat&,bool,bool,const int,const double)");
            p__armaVAR1_ridgeML = (Ptr__armaVAR1_ridgeML)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_ridgeML");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_ridgeML(Shield<SEXP>(Rcpp::wrap(Yraw)), Shield<SEXP>(Rcpp::wrap(lambdaA)), Shield<SEXP>(Rcpp::wrap(lambdaP)), Shield<SEXP>(Rcpp::wrap(targetA)), Shield<SEXP>(Rcpp::wrap(targetP)), Shield<SEXP>(Rcpp::wrap(targetPtype)), Shield<SEXP>(Rcpp::wrap(fitA)), Shield<SEXP>(Rcpp::wrap(unbalanced)), Shield<SEXP>(Rcpp::wrap(diagP)), Shield<SEXP>(Rcpp::wrap(efficient)), Shield<SEXP>(Rcpp::wrap(nInit)), Shield<SEXP>(Rcpp::wrap(minSuccDiff)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaVAR1_ridgeML_zerosA(Rcpp::NumericVector& Yraw, const double lambdaA, const double lambdaP, arma::mat& targetA, arma::mat& targetP, std::string targetPtype, std::string fitA, arma::mat unbalanced, bool diagP, bool efficient, const int nInit, const double minSuccDiff, const arma::uvec& zerosR, const arma::uvec& zerosC, std::string zerosAfit) {
        typedef SEXP(*Ptr__armaVAR1_ridgeML_zerosA)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr__armaVAR1_ridgeML_zerosA p__armaVAR1_ridgeML_zerosA = NULL;
        if (p__armaVAR1_ridgeML_zerosA == NULL) {
            validateSignature("Rcpp::List(*_armaVAR1_ridgeML_zerosA)(Rcpp::NumericVector&,const double,const double,arma::mat&,arma::mat&,std::string,std::string,arma::mat,bool,bool,const int,const double,const arma::uvec&,const arma::uvec&,std::string)");
            p__armaVAR1_ridgeML_zerosA = (Ptr__armaVAR1_ridgeML_zerosA)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_ridgeML_zerosA");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_ridgeML_zerosA(Shield<SEXP>(Rcpp::wrap(Yraw)), Shield<SEXP>(Rcpp::wrap(lambdaA)), Shield<SEXP>(Rcpp::wrap(lambdaP)), Shield<SEXP>(Rcpp::wrap(targetA)), Shield<SEXP>(Rcpp::wrap(targetP)), Shield<SEXP>(Rcpp::wrap(targetPtype)), Shield<SEXP>(Rcpp::wrap(fitA)), Shield<SEXP>(Rcpp::wrap(unbalanced)), Shield<SEXP>(Rcpp::wrap(diagP)), Shield<SEXP>(Rcpp::wrap(efficient)), Shield<SEXP>(Rcpp::wrap(nInit)), Shield<SEXP>(Rcpp::wrap(minSuccDiff)), Shield<SEXP>(Rcpp::wrap(zerosR)), Shield<SEXP>(Rcpp::wrap(zerosC)), Shield<SEXP>(Rcpp::wrap(zerosAfit)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaEigenDecomp_blockDiagOnly(const arma::mat symMat, const arma::ivec blockDims) {
        typedef SEXP(*Ptr__armaEigenDecomp_blockDiagOnly)(SEXP,SEXP);
        static Ptr__armaEigenDecomp_blockDiagOnly p__armaEigenDecomp_blockDiagOnly = NULL;
        if (p__armaEigenDecomp_blockDiagOnly == NULL) {
            validateSignature("Rcpp::List(*_armaEigenDecomp_blockDiagOnly)(const arma::mat,const arma::ivec)");
            p__armaEigenDecomp_blockDiagOnly = (Ptr__armaEigenDecomp_blockDiagOnly)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaEigenDecomp_blockDiagOnly");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaEigenDecomp_blockDiagOnly(Shield<SEXP>(Rcpp::wrap(symMat)), Shield<SEXP>(Rcpp::wrap(blockDims)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 arma::mat _armaVAR1_Shat_ML(Rcpp::NumericVector& Yraw, const arma::mat& A) {
        typedef SEXP(*Ptr__armaVAR1_Shat_ML)(SEXP,SEXP);
        static Ptr__armaVAR1_Shat_ML p__armaVAR1_Shat_ML = NULL;
        if (p__armaVAR1_Shat_ML == NULL) {
            validateSignature("arma::mat(*_armaVAR1_Shat_ML)(Rcpp::NumericVector&,const arma::mat&)");
            p__armaVAR1_Shat_ML = (Ptr__armaVAR1_Shat_ML)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_Shat_ML");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_Shat_ML(Shield<SEXP>(Rcpp::wrap(Yraw)), Shield<SEXP>(Rcpp::wrap(A)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaVAR1_COVYhat(Rcpp::NumericVector& Yraw) {
        typedef SEXP(*Ptr__armaVAR1_COVYhat)(SEXP);
        static Ptr__armaVAR1_COVYhat p__armaVAR1_COVYhat = NULL;
        if (p__armaVAR1_COVYhat == NULL) {
            validateSignature("arma::mat(*_armaVAR1_COVYhat)(Rcpp::NumericVector&)");
            p__armaVAR1_COVYhat = (Ptr__armaVAR1_COVYhat)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_COVYhat");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_COVYhat(Shield<SEXP>(Rcpp::wrap(Yraw)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaVAR1_VARYhat(Rcpp::NumericVector& Yraw, bool efficient, arma::mat unbalanced) {
        typedef SEXP(*Ptr__armaVAR1_VARYhat)(SEXP,SEXP,SEXP);
        static Ptr__armaVAR1_VARYhat p__armaVAR1_VARYhat = NULL;
        if (p__armaVAR1_VARYhat == NULL) {
            validateSignature("arma::mat(*_armaVAR1_VARYhat)(Rcpp::NumericVector&,bool,arma::mat)");
            p__armaVAR1_VARYhat = (Ptr__armaVAR1_VARYhat)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_VARYhat");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_VARYhat(Shield<SEXP>(Rcpp::wrap(Yraw)), Shield<SEXP>(Rcpp::wrap(efficient)), Shield<SEXP>(Rcpp::wrap(unbalanced)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaVAR1_Ahat_zeros(const arma::mat& P, arma::mat& COVY, const arma::mat& eigvecVARY, const arma::vec eigvalVARY, const double lambdaA, const arma::mat& targetA, std::string fitA, const arma::uvec& zerosR, const arma::uvec& zerosC, std::string zerosAfit) {
        typedef SEXP(*Ptr__armaVAR1_Ahat_zeros)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr__armaVAR1_Ahat_zeros p__armaVAR1_Ahat_zeros = NULL;
        if (p__armaVAR1_Ahat_zeros == NULL) {
            validateSignature("arma::mat(*_armaVAR1_Ahat_zeros)(const arma::mat&,arma::mat&,const arma::mat&,const arma::vec,const double,const arma::mat&,std::string,const arma::uvec&,const arma::uvec&,std::string)");
            p__armaVAR1_Ahat_zeros = (Ptr__armaVAR1_Ahat_zeros)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_Ahat_zeros");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_Ahat_zeros(Shield<SEXP>(Rcpp::wrap(P)), Shield<SEXP>(Rcpp::wrap(COVY)), Shield<SEXP>(Rcpp::wrap(eigvecVARY)), Shield<SEXP>(Rcpp::wrap(eigvalVARY)), Shield<SEXP>(Rcpp::wrap(lambdaA)), Shield<SEXP>(Rcpp::wrap(targetA)), Shield<SEXP>(Rcpp::wrap(fitA)), Shield<SEXP>(Rcpp::wrap(zerosR)), Shield<SEXP>(Rcpp::wrap(zerosC)), Shield<SEXP>(Rcpp::wrap(zerosAfit)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaP_defaultTarget(arma::mat S, std::string targetType, const double fraction, double const multiplier) {
        typedef SEXP(*Ptr__armaP_defaultTarget)(SEXP,SEXP,SEXP,SEXP);
        static Ptr__armaP_defaultTarget p__armaP_defaultTarget = NULL;
        if (p__armaP_defaultTarget == NULL) {
            validateSignature("arma::mat(*_armaP_defaultTarget)(arma::mat,std::string,const double,double const)");
            p__armaP_defaultTarget = (Ptr__armaP_defaultTarget)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaP_defaultTarget");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaP_defaultTarget(Shield<SEXP>(Rcpp::wrap(S)), Shield<SEXP>(Rcpp::wrap(targetType)), Shield<SEXP>(Rcpp::wrap(fraction)), Shield<SEXP>(Rcpp::wrap(multiplier)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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::cube _armaVAR_array2cube_withMissing(Rcpp::NumericVector& Yraw, const arma::uvec unbalancedR, const arma::uvec unbalancedC) {
        typedef SEXP(*Ptr__armaVAR_array2cube_withMissing)(SEXP,SEXP,SEXP);
        static Ptr__armaVAR_array2cube_withMissing p__armaVAR_array2cube_withMissing = NULL;
        if (p__armaVAR_array2cube_withMissing == NULL) {
            validateSignature("arma::cube(*_armaVAR_array2cube_withMissing)(Rcpp::NumericVector&,const arma::uvec,const arma::uvec)");
            p__armaVAR_array2cube_withMissing = (Ptr__armaVAR_array2cube_withMissing)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR_array2cube_withMissing");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR_array2cube_withMissing(Shield<SEXP>(Rcpp::wrap(Yraw)), Shield<SEXP>(Rcpp::wrap(unbalancedR)), Shield<SEXP>(Rcpp::wrap(unbalancedC)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::cube >(rcpp_result_gen);
    }

    inline arma::cube _armaVAR_array2cube_withoutMissing(Rcpp::NumericVector& Yraw) {
        typedef SEXP(*Ptr__armaVAR_array2cube_withoutMissing)(SEXP);
        static Ptr__armaVAR_array2cube_withoutMissing p__armaVAR_array2cube_withoutMissing = NULL;
        if (p__armaVAR_array2cube_withoutMissing == NULL) {
            validateSignature("arma::cube(*_armaVAR_array2cube_withoutMissing)(Rcpp::NumericVector&)");
            p__armaVAR_array2cube_withoutMissing = (Ptr__armaVAR_array2cube_withoutMissing)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR_array2cube_withoutMissing");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR_array2cube_withoutMissing(Shield<SEXP>(Rcpp::wrap(Yraw)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<arma::cube >(rcpp_result_gen);
    }

    inline Rcpp::List _armaEigenDecomp(const arma::mat symMat) {
        typedef SEXP(*Ptr__armaEigenDecomp)(SEXP);
        static Ptr__armaEigenDecomp p__armaEigenDecomp = NULL;
        if (p__armaEigenDecomp == NULL) {
            validateSignature("Rcpp::List(*_armaEigenDecomp)(const arma::mat)");
            p__armaEigenDecomp = (Ptr__armaEigenDecomp)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaEigenDecomp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaEigenDecomp(Shield<SEXP>(Rcpp::wrap(symMat)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaVAR1_convergenceEvaluation(arma::mat& Ahat, arma::mat& Aprev, arma::mat& Phat, arma::mat& Pprev) {
        typedef SEXP(*Ptr__armaVAR1_convergenceEvaluation)(SEXP,SEXP,SEXP,SEXP);
        static Ptr__armaVAR1_convergenceEvaluation p__armaVAR1_convergenceEvaluation = NULL;
        if (p__armaVAR1_convergenceEvaluation == NULL) {
            validateSignature("double(*_armaVAR1_convergenceEvaluation)(arma::mat&,arma::mat&,arma::mat&,arma::mat&)");
            p__armaVAR1_convergenceEvaluation = (Ptr__armaVAR1_convergenceEvaluation)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_convergenceEvaluation");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_convergenceEvaluation(Shield<SEXP>(Rcpp::wrap(Ahat)), Shield<SEXP>(Rcpp::wrap(Aprev)), Shield<SEXP>(Rcpp::wrap(Phat)), Shield<SEXP>(Rcpp::wrap(Pprev)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaVAR1_Ahat_ridgeML(arma::mat& P, arma::mat& COVY, const arma::mat& eigvecVARY, const arma::colvec eigvalVARY, const double lambdaA, arma::mat& targetA) {
        typedef SEXP(*Ptr__armaVAR1_Ahat_ridgeML)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr__armaVAR1_Ahat_ridgeML p__armaVAR1_Ahat_ridgeML = NULL;
        if (p__armaVAR1_Ahat_ridgeML == NULL) {
            validateSignature("arma::mat(*_armaVAR1_Ahat_ridgeML)(arma::mat&,arma::mat&,const arma::mat&,const arma::colvec,const double,arma::mat&)");
            p__armaVAR1_Ahat_ridgeML = (Ptr__armaVAR1_Ahat_ridgeML)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_Ahat_ridgeML");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_Ahat_ridgeML(Shield<SEXP>(Rcpp::wrap(P)), Shield<SEXP>(Rcpp::wrap(COVY)), Shield<SEXP>(Rcpp::wrap(eigvecVARY)), Shield<SEXP>(Rcpp::wrap(eigvalVARY)), Shield<SEXP>(Rcpp::wrap(lambdaA)), Shield<SEXP>(Rcpp::wrap(targetA)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaVAR1_Ahat_ridgeSS(arma::mat& VARY, arma::mat& COVY, const double& lambdaA, arma::mat& targetA) {
        typedef SEXP(*Ptr__armaVAR1_Ahat_ridgeSS)(SEXP,SEXP,SEXP,SEXP);
        static Ptr__armaVAR1_Ahat_ridgeSS p__armaVAR1_Ahat_ridgeSS = NULL;
        if (p__armaVAR1_Ahat_ridgeSS == NULL) {
            validateSignature("arma::mat(*_armaVAR1_Ahat_ridgeSS)(arma::mat&,arma::mat&,const double&,arma::mat&)");
            p__armaVAR1_Ahat_ridgeSS = (Ptr__armaVAR1_Ahat_ridgeSS)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_Ahat_ridgeSS");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_Ahat_ridgeSS(Shield<SEXP>(Rcpp::wrap(VARY)), Shield<SEXP>(Rcpp::wrap(COVY)), Shield<SEXP>(Rcpp::wrap(lambdaA)), Shield<SEXP>(Rcpp::wrap(targetA)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaVAR1_loglik_LOOCVinternal(arma::vec Yt1, arma::vec Yt0, arma::mat& A, arma::mat& P) {
        typedef SEXP(*Ptr__armaVAR1_loglik_LOOCVinternal)(SEXP,SEXP,SEXP,SEXP);
        static Ptr__armaVAR1_loglik_LOOCVinternal p__armaVAR1_loglik_LOOCVinternal = NULL;
        if (p__armaVAR1_loglik_LOOCVinternal == NULL) {
            validateSignature("double(*_armaVAR1_loglik_LOOCVinternal)(arma::vec,arma::vec,arma::mat&,arma::mat&)");
            p__armaVAR1_loglik_LOOCVinternal = (Ptr__armaVAR1_loglik_LOOCVinternal)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_loglik_LOOCVinternal");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_loglik_LOOCVinternal(Shield<SEXP>(Rcpp::wrap(Yt1)), Shield<SEXP>(Rcpp::wrap(Yt0)), Shield<SEXP>(Rcpp::wrap(A)), Shield<SEXP>(Rcpp::wrap(P)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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 _armaVAR1_loglik(Rcpp::NumericVector& Yraw, arma::mat& A, arma::mat& P) {
        typedef SEXP(*Ptr__armaVAR1_loglik)(SEXP,SEXP,SEXP);
        static Ptr__armaVAR1_loglik p__armaVAR1_loglik = NULL;
        if (p__armaVAR1_loglik == NULL) {
            validateSignature("double(*_armaVAR1_loglik)(Rcpp::NumericVector&,arma::mat&,arma::mat&)");
            p__armaVAR1_loglik = (Ptr__armaVAR1_loglik)R_GetCCallable("ragt2ridges", "_ragt2ridges__armaVAR1_loglik");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p__armaVAR1_loglik(Shield<SEXP>(Rcpp::wrap(Yraw)), Shield<SEXP>(Rcpp::wrap(A)), Shield<SEXP>(Rcpp::wrap(P)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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);
    }

}

#endif // RCPP_ragt2ridges_RCPPEXPORTS_H_GEN_
