// 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

// robust_mean_cpp
arma::rowvec robust_mean_cpp(arma::mat X, double threshold);
RcppExport SEXP _RobustLPA_robust_mean_cpp(SEXP XSEXP, SEXP thresholdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type X(XSEXP);
    Rcpp::traits::input_parameter< double >::type threshold(thresholdSEXP);
    rcpp_result_gen = Rcpp::wrap(robust_mean_cpp(X, threshold));
    return rcpp_result_gen;
END_RCPP
}
// mahalanobis_cpp
arma::vec mahalanobis_cpp(arma::mat X, arma::rowvec mu, arma::mat Sigma);
RcppExport SEXP _RobustLPA_mahalanobis_cpp(SEXP XSEXP, SEXP muSEXP, SEXP SigmaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::rowvec >::type mu(muSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type Sigma(SigmaSEXP);
    rcpp_result_gen = Rcpp::wrap(mahalanobis_cpp(X, mu, Sigma));
    return rcpp_result_gen;
END_RCPP
}
// huber_weights_cpp
arma::vec huber_weights_cpp(arma::vec squared_dists, double chi_sq_cutoff);
RcppExport SEXP _RobustLPA_huber_weights_cpp(SEXP squared_distsSEXP, SEXP chi_sq_cutoffSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type squared_dists(squared_distsSEXP);
    Rcpp::traits::input_parameter< double >::type chi_sq_cutoff(chi_sq_cutoffSEXP);
    rcpp_result_gen = Rcpp::wrap(huber_weights_cpp(squared_dists, chi_sq_cutoff));
    return rcpp_result_gen;
END_RCPP
}
// robust_update_cpp
Rcpp::List robust_update_cpp(arma::mat X, arma::vec z, arma::vec w);
RcppExport SEXP _RobustLPA_robust_update_cpp(SEXP XSEXP, SEXP zSEXP, SEXP wSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type z(zSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type w(wSEXP);
    rcpp_result_gen = Rcpp::wrap(robust_update_cpp(X, z, w));
    return rcpp_result_gen;
END_RCPP
}
// dmvnorm_cpp
arma::vec dmvnorm_cpp(arma::mat X, arma::rowvec mu, arma::mat Sigma);
RcppExport SEXP _RobustLPA_dmvnorm_cpp(SEXP XSEXP, SEXP muSEXP, SEXP SigmaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::rowvec >::type mu(muSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type Sigma(SigmaSEXP);
    rcpp_result_gen = Rcpp::wrap(dmvnorm_cpp(X, mu, Sigma));
    return rcpp_result_gen;
END_RCPP
}
// dmvnorm_fiml_cpp
arma::vec dmvnorm_fiml_cpp(arma::mat X, arma::rowvec mu, arma::mat Sigma);
RcppExport SEXP _RobustLPA_dmvnorm_fiml_cpp(SEXP XSEXP, SEXP muSEXP, SEXP SigmaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::rowvec >::type mu(muSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type Sigma(SigmaSEXP);
    rcpp_result_gen = Rcpp::wrap(dmvnorm_fiml_cpp(X, mu, Sigma));
    return rcpp_result_gen;
END_RCPP
}
// mahalanobis_fiml_cpp
arma::vec mahalanobis_fiml_cpp(arma::mat X, arma::rowvec mu, arma::mat Sigma);
RcppExport SEXP _RobustLPA_mahalanobis_fiml_cpp(SEXP XSEXP, SEXP muSEXP, SEXP SigmaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::rowvec >::type mu(muSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type Sigma(SigmaSEXP);
    rcpp_result_gen = Rcpp::wrap(mahalanobis_fiml_cpp(X, mu, Sigma));
    return rcpp_result_gen;
END_RCPP
}
// huber_weights_fiml_cpp
arma::vec huber_weights_fiml_cpp(arma::mat X, arma::vec squared_dists, double alpha);
RcppExport SEXP _RobustLPA_huber_weights_fiml_cpp(SEXP XSEXP, SEXP squared_distsSEXP, SEXP alphaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type squared_dists(squared_distsSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    rcpp_result_gen = Rcpp::wrap(huber_weights_fiml_cpp(X, squared_dists, alpha));
    return rcpp_result_gen;
END_RCPP
}
// robust_update_fiml_cpp
Rcpp::List robust_update_fiml_cpp(arma::mat X, arma::vec z, arma::vec w);
RcppExport SEXP _RobustLPA_robust_update_fiml_cpp(SEXP XSEXP, SEXP zSEXP, SEXP wSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type z(zSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type w(wSEXP);
    rcpp_result_gen = Rcpp::wrap(robust_update_fiml_cpp(X, z, w));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_RobustLPA_robust_mean_cpp", (DL_FUNC) &_RobustLPA_robust_mean_cpp, 2},
    {"_RobustLPA_mahalanobis_cpp", (DL_FUNC) &_RobustLPA_mahalanobis_cpp, 3},
    {"_RobustLPA_huber_weights_cpp", (DL_FUNC) &_RobustLPA_huber_weights_cpp, 2},
    {"_RobustLPA_robust_update_cpp", (DL_FUNC) &_RobustLPA_robust_update_cpp, 3},
    {"_RobustLPA_dmvnorm_cpp", (DL_FUNC) &_RobustLPA_dmvnorm_cpp, 3},
    {"_RobustLPA_dmvnorm_fiml_cpp", (DL_FUNC) &_RobustLPA_dmvnorm_fiml_cpp, 3},
    {"_RobustLPA_mahalanobis_fiml_cpp", (DL_FUNC) &_RobustLPA_mahalanobis_fiml_cpp, 3},
    {"_RobustLPA_huber_weights_fiml_cpp", (DL_FUNC) &_RobustLPA_huber_weights_fiml_cpp, 3},
    {"_RobustLPA_robust_update_fiml_cpp", (DL_FUNC) &_RobustLPA_robust_update_fiml_cpp, 3},
    {NULL, NULL, 0}
};

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