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

#include <RcppEigen.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

// iterativeDeflationHeuristic
List iterativeDeflationHeuristic(Eigen::MatrixXd Sigma, int r, Rcpp::NumericVector ks, int feasibilityConstraintType, bool verbose, int maxIter, double feasibilityTolerance, double stallingTolerance, int timeLimitTPM, int maxRestartTPM, int minRestartTPM);
RcppExport SEXP _msPCA_iterativeDeflationHeuristic(SEXP SigmaSEXP, SEXP rSEXP, SEXP ksSEXP, SEXP feasibilityConstraintTypeSEXP, SEXP verboseSEXP, SEXP maxIterSEXP, SEXP feasibilityToleranceSEXP, SEXP stallingToleranceSEXP, SEXP timeLimitTPMSEXP, SEXP maxRestartTPMSEXP, SEXP minRestartTPMSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Eigen::MatrixXd >::type Sigma(SigmaSEXP);
    Rcpp::traits::input_parameter< int >::type r(rSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type ks(ksSEXP);
    Rcpp::traits::input_parameter< int >::type feasibilityConstraintType(feasibilityConstraintTypeSEXP);
    Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
    Rcpp::traits::input_parameter< int >::type maxIter(maxIterSEXP);
    Rcpp::traits::input_parameter< double >::type feasibilityTolerance(feasibilityToleranceSEXP);
    Rcpp::traits::input_parameter< double >::type stallingTolerance(stallingToleranceSEXP);
    Rcpp::traits::input_parameter< int >::type timeLimitTPM(timeLimitTPMSEXP);
    Rcpp::traits::input_parameter< int >::type maxRestartTPM(maxRestartTPMSEXP);
    Rcpp::traits::input_parameter< int >::type minRestartTPM(minRestartTPMSEXP);
    rcpp_result_gen = Rcpp::wrap(iterativeDeflationHeuristic(Sigma, r, ks, feasibilityConstraintType, verbose, maxIter, feasibilityTolerance, stallingTolerance, timeLimitTPM, maxRestartTPM, minRestartTPM));
    return rcpp_result_gen;
END_RCPP
}
// truncatedPowerMethod
List truncatedPowerMethod(Eigen::MatrixXd Sigma, int k, int maxIter, bool verbose, int timeLimit);
RcppExport SEXP _msPCA_truncatedPowerMethod(SEXP SigmaSEXP, SEXP kSEXP, SEXP maxIterSEXP, SEXP verboseSEXP, SEXP timeLimitSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Eigen::MatrixXd >::type Sigma(SigmaSEXP);
    Rcpp::traits::input_parameter< int >::type k(kSEXP);
    Rcpp::traits::input_parameter< int >::type maxIter(maxIterSEXP);
    Rcpp::traits::input_parameter< bool >::type verbose(verboseSEXP);
    Rcpp::traits::input_parameter< int >::type timeLimit(timeLimitSEXP);
    rcpp_result_gen = Rcpp::wrap(truncatedPowerMethod(Sigma, k, maxIter, verbose, timeLimit));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_msPCA_iterativeDeflationHeuristic", (DL_FUNC) &_msPCA_iterativeDeflationHeuristic, 11},
    {"_msPCA_truncatedPowerMethod", (DL_FUNC) &_msPCA_truncatedPowerMethod, 5},
    {NULL, NULL, 0}
};

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