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

// findIdenticalRowsData
SEXP findIdenticalRowsData(SEXP data, SEXP missing, SEXP defvars, SEXP skipMissingness, SEXP skipDefvars);
RcppExport SEXP _rpf_findIdenticalRowsData(SEXP dataSEXP, SEXP missingSEXP, SEXP defvarsSEXP, SEXP skipMissingnessSEXP, SEXP skipDefvarsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type data(dataSEXP);
    Rcpp::traits::input_parameter< SEXP >::type missing(missingSEXP);
    Rcpp::traits::input_parameter< SEXP >::type defvars(defvarsSEXP);
    Rcpp::traits::input_parameter< SEXP >::type skipMissingness(skipMissingnessSEXP);
    Rcpp::traits::input_parameter< SEXP >::type skipDefvars(skipDefvarsSEXP);
    rcpp_result_gen = Rcpp::wrap(findIdenticalRowsData(data, missing, defvars, skipMissingness, skipDefvars));
    return rcpp_result_gen;
END_RCPP
}
// ot2000
SEXP ot2000(SEXP robj, int iPlusOne, bool alter, const LogicalVector& mask, bool twoTier);
RcppExport SEXP _rpf_ot2000(SEXP robjSEXP, SEXP iPlusOneSEXP, SEXP alterSEXP, SEXP maskSEXP, SEXP twoTierSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type robj(robjSEXP);
    Rcpp::traits::input_parameter< int >::type iPlusOne(iPlusOneSEXP);
    Rcpp::traits::input_parameter< bool >::type alter(alterSEXP);
    Rcpp::traits::input_parameter< const LogicalVector& >::type mask(maskSEXP);
    Rcpp::traits::input_parameter< bool >::type twoTier(twoTierSEXP);
    rcpp_result_gen = Rcpp::wrap(ot2000(robj, iPlusOne, alter, mask, twoTier));
    return rcpp_result_gen;
END_RCPP
}
// ssEAP_wrapper
NumericMatrix ssEAP_wrapper(SEXP robj, SEXP Rmask, bool twoTier);
RcppExport SEXP _rpf_ssEAP_wrapper(SEXP robjSEXP, SEXP RmaskSEXP, SEXP twoTierSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type robj(robjSEXP);
    Rcpp::traits::input_parameter< SEXP >::type Rmask(RmaskSEXP);
    Rcpp::traits::input_parameter< bool >::type twoTier(twoTierSEXP);
    rcpp_result_gen = Rcpp::wrap(ssEAP_wrapper(robj, Rmask, twoTier));
    return rcpp_result_gen;
END_RCPP
}
// pairwiseExpected_cpp
NumericMatrix pairwiseExpected_cpp(SEXP robj, IntegerVector items, bool twoTier);
RcppExport SEXP _rpf_pairwiseExpected_cpp(SEXP robjSEXP, SEXP itemsSEXP, SEXP twoTierSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type robj(robjSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type items(itemsSEXP);
    Rcpp::traits::input_parameter< bool >::type twoTier(twoTierSEXP);
    rcpp_result_gen = Rcpp::wrap(pairwiseExpected_cpp(robj, items, twoTier));
    return rcpp_result_gen;
END_RCPP
}
// collapse
List collapse(const NumericMatrix& r_observed_orig, const NumericMatrix& r_expected_orig, const NumericVector& r_min);
RcppExport SEXP _rpf_collapse(SEXP r_observed_origSEXP, SEXP r_expected_origSEXP, SEXP r_minSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericMatrix& >::type r_observed_orig(r_observed_origSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type r_expected_orig(r_expected_origSEXP);
    Rcpp::traits::input_parameter< const NumericVector& >::type r_min(r_minSEXP);
    rcpp_result_gen = Rcpp::wrap(collapse(r_observed_orig, r_expected_orig, r_min));
    return rcpp_result_gen;
END_RCPP
}
// fast_tableWithWeights
NumericMatrix fast_tableWithWeights(IntegerVector Ritem1, IntegerVector Ritem2, RObject Rweight);
RcppExport SEXP _rpf_fast_tableWithWeights(SEXP Ritem1SEXP, SEXP Ritem2SEXP, SEXP RweightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type Ritem1(Ritem1SEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type Ritem2(Ritem2SEXP);
    Rcpp::traits::input_parameter< RObject >::type Rweight(RweightSEXP);
    rcpp_result_gen = Rcpp::wrap(fast_tableWithWeights(Ritem1, Ritem2, Rweight));
    return rcpp_result_gen;
END_RCPP
}
// observedSumScore_cpp
List observedSumScore_cpp(SEXP Rgrp, const LogicalVector& Rmask);
RcppExport SEXP _rpf_observedSumScore_cpp(SEXP RgrpSEXP, SEXP RmaskSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type Rgrp(RgrpSEXP);
    Rcpp::traits::input_parameter< const LogicalVector& >::type Rmask(RmaskSEXP);
    rcpp_result_gen = Rcpp::wrap(observedSumScore_cpp(Rgrp, Rmask));
    return rcpp_result_gen;
END_RCPP
}
// itemOutcomeBySumScore_cpp
List itemOutcomeBySumScore_cpp(SEXP Rgrp, const LogicalVector& Rmask, int interestPlusOne);
RcppExport SEXP _rpf_itemOutcomeBySumScore_cpp(SEXP RgrpSEXP, SEXP RmaskSEXP, SEXP interestPlusOneSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type Rgrp(RgrpSEXP);
    Rcpp::traits::input_parameter< const LogicalVector& >::type Rmask(RmaskSEXP);
    Rcpp::traits::input_parameter< int >::type interestPlusOne(interestPlusOneSEXP);
    rcpp_result_gen = Rcpp::wrap(itemOutcomeBySumScore_cpp(Rgrp, Rmask, interestPlusOne));
    return rcpp_result_gen;
END_RCPP
}
// gamma_cor
double gamma_cor(const NumericMatrix& mat);
RcppExport SEXP _rpf_gamma_cor(SEXP matSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericMatrix& >::type mat(matSEXP);
    rcpp_result_gen = Rcpp::wrap(gamma_cor(mat));
    return rcpp_result_gen;
END_RCPP
}
// crosstabTest_cpp
double crosstabTest_cpp(const NumericMatrix& Robserved, const NumericMatrix& Rexpected, int trials);
RcppExport SEXP _rpf_crosstabTest_cpp(SEXP RobservedSEXP, SEXP RexpectedSEXP, SEXP trialsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericMatrix& >::type Robserved(RobservedSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type Rexpected(RexpectedSEXP);
    Rcpp::traits::input_parameter< int >::type trials(trialsSEXP);
    rcpp_result_gen = Rcpp::wrap(crosstabTest_cpp(Robserved, Rexpected, trials));
    return rcpp_result_gen;
END_RCPP
}
// eap_wrapper
DataFrame eap_wrapper(SEXP Rgrp);
RcppExport SEXP _rpf_eap_wrapper(SEXP RgrpSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type Rgrp(RgrpSEXP);
    rcpp_result_gen = Rcpp::wrap(eap_wrapper(Rgrp));
    return rcpp_result_gen;
END_RCPP
}
// get_model_id
int get_model_id(const StringVector& str);
RcppExport SEXP _rpf_get_model_id(SEXP strSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const StringVector& >::type str(strSEXP);
    rcpp_result_gen = Rcpp::wrap(get_model_id(str));
    return rcpp_result_gen;
END_RCPP
}
// numSpec
int numSpec(const NumericVector& spec);
RcppExport SEXP _rpf_numSpec(SEXP specSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericVector& >::type spec(specSEXP);
    rcpp_result_gen = Rcpp::wrap(numSpec(spec));
    return rcpp_result_gen;
END_RCPP
}
// numParam
int numParam(const NumericVector& spec);
RcppExport SEXP _rpf_numParam(SEXP specSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericVector& >::type spec(specSEXP);
    rcpp_result_gen = Rcpp::wrap(numParam(spec));
    return rcpp_result_gen;
END_RCPP
}
// paramInfo
SEXP paramInfo(const NumericVector& spec, int pnum);
RcppExport SEXP _rpf_paramInfo(SEXP specSEXP, SEXP pnumSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericVector& >::type spec(specSEXP);
    Rcpp::traits::input_parameter< int >::type pnum(pnumSEXP);
    rcpp_result_gen = Rcpp::wrap(paramInfo(spec, pnum));
    return rcpp_result_gen;
END_RCPP
}
// prob
NumericMatrix prob(const NumericVector& spec, SEXP r_param, RObject r_theta);
RcppExport SEXP _rpf_prob(SEXP specSEXP, SEXP r_paramSEXP, SEXP r_thetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericVector& >::type spec(specSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_param(r_paramSEXP);
    Rcpp::traits::input_parameter< RObject >::type r_theta(r_thetaSEXP);
    rcpp_result_gen = Rcpp::wrap(prob(spec, r_param, r_theta));
    return rcpp_result_gen;
END_RCPP
}
// logprob
SEXP logprob(const NumericVector& spec, SEXP r_param, RObject r_theta);
RcppExport SEXP _rpf_logprob(SEXP specSEXP, SEXP r_paramSEXP, SEXP r_thetaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericVector& >::type spec(specSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_param(r_paramSEXP);
    Rcpp::traits::input_parameter< RObject >::type r_theta(r_thetaSEXP);
    rcpp_result_gen = Rcpp::wrap(logprob(spec, r_param, r_theta));
    return rcpp_result_gen;
END_RCPP
}
// dLL
SEXP dLL(const NumericVector& spec, SEXP r_param, SEXP r_where, SEXP r_weight);
RcppExport SEXP _rpf_dLL(SEXP specSEXP, SEXP r_paramSEXP, SEXP r_whereSEXP, SEXP r_weightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericVector& >::type spec(specSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_param(r_paramSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_where(r_whereSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_weight(r_weightSEXP);
    rcpp_result_gen = Rcpp::wrap(dLL(spec, r_param, r_where, r_weight));
    return rcpp_result_gen;
END_RCPP
}
// dTheta
SEXP dTheta(const NumericVector& spec, SEXP r_param, SEXP r_where, SEXP r_dir);
RcppExport SEXP _rpf_dTheta(SEXP specSEXP, SEXP r_paramSEXP, SEXP r_whereSEXP, SEXP r_dirSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericVector& >::type spec(specSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_param(r_paramSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_where(r_whereSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_dir(r_dirSEXP);
    rcpp_result_gen = Rcpp::wrap(dTheta(spec, r_param, r_where, r_dir));
    return rcpp_result_gen;
END_RCPP
}
// rescale
NumericVector rescale(const NumericVector& spec, SEXP r_param, SEXP r_mean, const NumericMatrix& r_cov);
RcppExport SEXP _rpf_rescale(SEXP specSEXP, SEXP r_paramSEXP, SEXP r_meanSEXP, SEXP r_covSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericVector& >::type spec(specSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_param(r_paramSEXP);
    Rcpp::traits::input_parameter< SEXP >::type r_mean(r_meanSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type r_cov(r_covSEXP);
    rcpp_result_gen = Rcpp::wrap(rescale(spec, r_param, r_mean, r_cov));
    return rcpp_result_gen;
END_RCPP
}
// has_openmp
bool has_openmp();
RcppExport SEXP _rpf_has_openmp() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(has_openmp());
    return rcpp_result_gen;
END_RCPP
}
// setNumberOfCores
int setNumberOfCores(int num);
RcppExport SEXP _rpf_setNumberOfCores(SEXP numSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type num(numSEXP);
    rcpp_result_gen = Rcpp::wrap(setNumberOfCores(num));
    return rcpp_result_gen;
END_RCPP
}
// registerCCallable
void registerCCallable();
RcppExport SEXP _rpf_registerCCallable() {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    registerCCallable();
    return R_NilValue;
END_RCPP
}
// CaiHansen2012_cpp
List CaiHansen2012_cpp(SEXP Rgrp, const CharacterVector& Rmethod, bool twotier);
RcppExport SEXP _rpf_CaiHansen2012_cpp(SEXP RgrpSEXP, SEXP RmethodSEXP, SEXP twotierSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type Rgrp(RgrpSEXP);
    Rcpp::traits::input_parameter< const CharacterVector& >::type Rmethod(RmethodSEXP);
    Rcpp::traits::input_parameter< bool >::type twotier(twotierSEXP);
    rcpp_result_gen = Rcpp::wrap(CaiHansen2012_cpp(Rgrp, Rmethod, twotier));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_rpf_findIdenticalRowsData", (DL_FUNC) &_rpf_findIdenticalRowsData, 5},
    {"_rpf_ot2000", (DL_FUNC) &_rpf_ot2000, 5},
    {"_rpf_ssEAP_wrapper", (DL_FUNC) &_rpf_ssEAP_wrapper, 3},
    {"_rpf_pairwiseExpected_cpp", (DL_FUNC) &_rpf_pairwiseExpected_cpp, 3},
    {"_rpf_collapse", (DL_FUNC) &_rpf_collapse, 3},
    {"_rpf_fast_tableWithWeights", (DL_FUNC) &_rpf_fast_tableWithWeights, 3},
    {"_rpf_observedSumScore_cpp", (DL_FUNC) &_rpf_observedSumScore_cpp, 2},
    {"_rpf_itemOutcomeBySumScore_cpp", (DL_FUNC) &_rpf_itemOutcomeBySumScore_cpp, 3},
    {"_rpf_gamma_cor", (DL_FUNC) &_rpf_gamma_cor, 1},
    {"_rpf_crosstabTest_cpp", (DL_FUNC) &_rpf_crosstabTest_cpp, 3},
    {"_rpf_eap_wrapper", (DL_FUNC) &_rpf_eap_wrapper, 1},
    {"_rpf_get_model_id", (DL_FUNC) &_rpf_get_model_id, 1},
    {"_rpf_numSpec", (DL_FUNC) &_rpf_numSpec, 1},
    {"_rpf_numParam", (DL_FUNC) &_rpf_numParam, 1},
    {"_rpf_paramInfo", (DL_FUNC) &_rpf_paramInfo, 2},
    {"_rpf_prob", (DL_FUNC) &_rpf_prob, 3},
    {"_rpf_logprob", (DL_FUNC) &_rpf_logprob, 3},
    {"_rpf_dLL", (DL_FUNC) &_rpf_dLL, 4},
    {"_rpf_dTheta", (DL_FUNC) &_rpf_dTheta, 4},
    {"_rpf_rescale", (DL_FUNC) &_rpf_rescale, 4},
    {"_rpf_has_openmp", (DL_FUNC) &_rpf_has_openmp, 0},
    {"_rpf_setNumberOfCores", (DL_FUNC) &_rpf_setNumberOfCores, 1},
    {"_rpf_registerCCallable", (DL_FUNC) &_rpf_registerCCallable, 0},
    {"_rpf_CaiHansen2012_cpp", (DL_FUNC) &_rpf_CaiHansen2012_cpp, 3},
    {NULL, NULL, 0}
};

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