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

#include "../inst/include/MatchIt.h"
#include <Rcpp.h>
#include <string>
#include <set>

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

// all_equal_to
bool all_equal_to(RObject x, RObject y);
RcppExport SEXP _MatchIt_all_equal_to(SEXP xSEXP, SEXP ySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< RObject >::type x(xSEXP);
    Rcpp::traits::input_parameter< RObject >::type y(ySEXP);
    rcpp_result_gen = Rcpp::wrap(all_equal_to(x, y));
    return rcpp_result_gen;
END_RCPP
}
// eucdistC_N1xN0
NumericVector eucdistC_N1xN0(const NumericMatrix& x, const IntegerVector& t);
RcppExport SEXP _MatchIt_eucdistC_N1xN0(SEXP xSEXP, SEXP tSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type t(tSEXP);
    rcpp_result_gen = Rcpp::wrap(eucdistC_N1xN0(x, t));
    return rcpp_result_gen;
END_RCPP
}
// get_splitsC
NumericVector get_splitsC(const NumericVector& x, const double& caliper);
RcppExport SEXP _MatchIt_get_splitsC(SEXP xSEXP, SEXP caliperSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericVector& >::type x(xSEXP);
    Rcpp::traits::input_parameter< const double& >::type caliper(caliperSEXP);
    rcpp_result_gen = Rcpp::wrap(get_splitsC(x, caliper));
    return rcpp_result_gen;
END_RCPP
}
// has_n_unique
bool has_n_unique(const SEXP& x, const int& n);
RcppExport SEXP _MatchIt_has_n_unique(SEXP xSEXP, SEXP nSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const SEXP& >::type x(xSEXP);
    Rcpp::traits::input_parameter< const int& >::type n(nSEXP);
    rcpp_result_gen = Rcpp::wrap(has_n_unique(x, n));
    return rcpp_result_gen;
END_RCPP
}
// nn_matchC_distmat
IntegerMatrix nn_matchC_distmat(const IntegerVector& treat_, const IntegerVector& ord, const IntegerVector& ratio, const LogicalVector& discarded, const int& reuse_max, const int& focal_, const NumericMatrix& distance_mat, const Nullable<IntegerMatrix>& exact_, const Nullable<double>& caliper_dist_, const Nullable<NumericVector>& caliper_covs_, const Nullable<NumericMatrix>& caliper_covs_mat_, const Nullable<IntegerMatrix>& antiexact_covs_, const Nullable<IntegerVector>& unit_id_, const bool& disl_prog);
RcppExport SEXP _MatchIt_nn_matchC_distmat(SEXP treat_SEXP, SEXP ordSEXP, SEXP ratioSEXP, SEXP discardedSEXP, SEXP reuse_maxSEXP, SEXP focal_SEXP, SEXP distance_matSEXP, SEXP exact_SEXP, SEXP caliper_dist_SEXP, SEXP caliper_covs_SEXP, SEXP caliper_covs_mat_SEXP, SEXP antiexact_covs_SEXP, SEXP unit_id_SEXP, SEXP disl_progSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerVector& >::type treat_(treat_SEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type ord(ordSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type ratio(ratioSEXP);
    Rcpp::traits::input_parameter< const LogicalVector& >::type discarded(discardedSEXP);
    Rcpp::traits::input_parameter< const int& >::type reuse_max(reuse_maxSEXP);
    Rcpp::traits::input_parameter< const int& >::type focal_(focal_SEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type distance_mat(distance_matSEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type exact_(exact_SEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type caliper_dist_(caliper_dist_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type caliper_covs_(caliper_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericMatrix>& >::type caliper_covs_mat_(caliper_covs_mat_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type antiexact_covs_(antiexact_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type unit_id_(unit_id_SEXP);
    Rcpp::traits::input_parameter< const bool& >::type disl_prog(disl_progSEXP);
    rcpp_result_gen = Rcpp::wrap(nn_matchC_distmat(treat_, ord, ratio, discarded, reuse_max, focal_, distance_mat, exact_, caliper_dist_, caliper_covs_, caliper_covs_mat_, antiexact_covs_, unit_id_, disl_prog));
    return rcpp_result_gen;
END_RCPP
}
// nn_matchC_distmat_closest
IntegerMatrix nn_matchC_distmat_closest(const IntegerVector& treat, const IntegerVector& ratio, const LogicalVector& discarded, const int& reuse_max, const NumericMatrix& distance_mat, const Nullable<IntegerMatrix>& exact_, const Nullable<double>& caliper_dist_, const Nullable<NumericVector>& caliper_covs_, const Nullable<NumericMatrix>& caliper_covs_mat_, const Nullable<IntegerMatrix>& antiexact_covs_, const Nullable<IntegerVector>& unit_id_, const bool& close, const bool& disl_prog);
RcppExport SEXP _MatchIt_nn_matchC_distmat_closest(SEXP treatSEXP, SEXP ratioSEXP, SEXP discardedSEXP, SEXP reuse_maxSEXP, SEXP distance_matSEXP, SEXP exact_SEXP, SEXP caliper_dist_SEXP, SEXP caliper_covs_SEXP, SEXP caliper_covs_mat_SEXP, SEXP antiexact_covs_SEXP, SEXP unit_id_SEXP, SEXP closeSEXP, SEXP disl_progSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerVector& >::type treat(treatSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type ratio(ratioSEXP);
    Rcpp::traits::input_parameter< const LogicalVector& >::type discarded(discardedSEXP);
    Rcpp::traits::input_parameter< const int& >::type reuse_max(reuse_maxSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type distance_mat(distance_matSEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type exact_(exact_SEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type caliper_dist_(caliper_dist_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type caliper_covs_(caliper_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericMatrix>& >::type caliper_covs_mat_(caliper_covs_mat_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type antiexact_covs_(antiexact_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type unit_id_(unit_id_SEXP);
    Rcpp::traits::input_parameter< const bool& >::type close(closeSEXP);
    Rcpp::traits::input_parameter< const bool& >::type disl_prog(disl_progSEXP);
    rcpp_result_gen = Rcpp::wrap(nn_matchC_distmat_closest(treat, ratio, discarded, reuse_max, distance_mat, exact_, caliper_dist_, caliper_covs_, caliper_covs_mat_, antiexact_covs_, unit_id_, close, disl_prog));
    return rcpp_result_gen;
END_RCPP
}
// nn_matchC_mahcovs
IntegerMatrix nn_matchC_mahcovs(const IntegerVector& treat_, const IntegerVector& ord, const IntegerVector& ratio, const LogicalVector& discarded, const int& reuse_max, const int& focal_, const NumericMatrix& mah_covs, const Nullable<NumericVector>& distance_, const Nullable<IntegerMatrix>& exact_, const Nullable<double>& caliper_dist_, const Nullable<NumericVector>& caliper_covs_, const Nullable<NumericMatrix>& caliper_covs_mat_, const Nullable<IntegerMatrix>& antiexact_covs_, const Nullable<IntegerVector>& unit_id_, const bool& disl_prog);
RcppExport SEXP _MatchIt_nn_matchC_mahcovs(SEXP treat_SEXP, SEXP ordSEXP, SEXP ratioSEXP, SEXP discardedSEXP, SEXP reuse_maxSEXP, SEXP focal_SEXP, SEXP mah_covsSEXP, SEXP distance_SEXP, SEXP exact_SEXP, SEXP caliper_dist_SEXP, SEXP caliper_covs_SEXP, SEXP caliper_covs_mat_SEXP, SEXP antiexact_covs_SEXP, SEXP unit_id_SEXP, SEXP disl_progSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerVector& >::type treat_(treat_SEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type ord(ordSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type ratio(ratioSEXP);
    Rcpp::traits::input_parameter< const LogicalVector& >::type discarded(discardedSEXP);
    Rcpp::traits::input_parameter< const int& >::type reuse_max(reuse_maxSEXP);
    Rcpp::traits::input_parameter< const int& >::type focal_(focal_SEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type mah_covs(mah_covsSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type distance_(distance_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type exact_(exact_SEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type caliper_dist_(caliper_dist_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type caliper_covs_(caliper_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericMatrix>& >::type caliper_covs_mat_(caliper_covs_mat_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type antiexact_covs_(antiexact_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type unit_id_(unit_id_SEXP);
    Rcpp::traits::input_parameter< const bool& >::type disl_prog(disl_progSEXP);
    rcpp_result_gen = Rcpp::wrap(nn_matchC_mahcovs(treat_, ord, ratio, discarded, reuse_max, focal_, mah_covs, distance_, exact_, caliper_dist_, caliper_covs_, caliper_covs_mat_, antiexact_covs_, unit_id_, disl_prog));
    return rcpp_result_gen;
END_RCPP
}
// nn_matchC_mahcovs_closest
IntegerMatrix nn_matchC_mahcovs_closest(const IntegerVector& treat, const IntegerVector& ratio, const LogicalVector& discarded, const int& reuse_max, const NumericMatrix& mah_covs, const Nullable<NumericVector>& distance_, const Nullable<IntegerMatrix>& exact_, const Nullable<double>& caliper_dist_, const Nullable<NumericVector>& caliper_covs_, const Nullable<NumericMatrix>& caliper_covs_mat_, const Nullable<IntegerMatrix>& antiexact_covs_, const Nullable<IntegerVector>& unit_id_, const bool& close, const bool& disl_prog);
RcppExport SEXP _MatchIt_nn_matchC_mahcovs_closest(SEXP treatSEXP, SEXP ratioSEXP, SEXP discardedSEXP, SEXP reuse_maxSEXP, SEXP mah_covsSEXP, SEXP distance_SEXP, SEXP exact_SEXP, SEXP caliper_dist_SEXP, SEXP caliper_covs_SEXP, SEXP caliper_covs_mat_SEXP, SEXP antiexact_covs_SEXP, SEXP unit_id_SEXP, SEXP closeSEXP, SEXP disl_progSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerVector& >::type treat(treatSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type ratio(ratioSEXP);
    Rcpp::traits::input_parameter< const LogicalVector& >::type discarded(discardedSEXP);
    Rcpp::traits::input_parameter< const int& >::type reuse_max(reuse_maxSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type mah_covs(mah_covsSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type distance_(distance_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type exact_(exact_SEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type caliper_dist_(caliper_dist_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type caliper_covs_(caliper_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericMatrix>& >::type caliper_covs_mat_(caliper_covs_mat_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type antiexact_covs_(antiexact_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type unit_id_(unit_id_SEXP);
    Rcpp::traits::input_parameter< const bool& >::type close(closeSEXP);
    Rcpp::traits::input_parameter< const bool& >::type disl_prog(disl_progSEXP);
    rcpp_result_gen = Rcpp::wrap(nn_matchC_mahcovs_closest(treat, ratio, discarded, reuse_max, mah_covs, distance_, exact_, caliper_dist_, caliper_covs_, caliper_covs_mat_, antiexact_covs_, unit_id_, close, disl_prog));
    return rcpp_result_gen;
END_RCPP
}
// nn_matchC_vec
IntegerMatrix nn_matchC_vec(const IntegerVector& treat_, const IntegerVector& ord, const IntegerVector& ratio, const LogicalVector& discarded, const int& reuse_max, const int& focal_, const NumericVector& distance, const Nullable<IntegerMatrix>& exact_, const Nullable<double>& caliper_dist_, const Nullable<NumericVector>& caliper_covs_, const Nullable<NumericMatrix>& caliper_covs_mat_, const Nullable<IntegerMatrix>& antiexact_covs_, const Nullable<IntegerVector>& unit_id_, const bool& disl_prog);
RcppExport SEXP _MatchIt_nn_matchC_vec(SEXP treat_SEXP, SEXP ordSEXP, SEXP ratioSEXP, SEXP discardedSEXP, SEXP reuse_maxSEXP, SEXP focal_SEXP, SEXP distanceSEXP, SEXP exact_SEXP, SEXP caliper_dist_SEXP, SEXP caliper_covs_SEXP, SEXP caliper_covs_mat_SEXP, SEXP antiexact_covs_SEXP, SEXP unit_id_SEXP, SEXP disl_progSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerVector& >::type treat_(treat_SEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type ord(ordSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type ratio(ratioSEXP);
    Rcpp::traits::input_parameter< const LogicalVector& >::type discarded(discardedSEXP);
    Rcpp::traits::input_parameter< const int& >::type reuse_max(reuse_maxSEXP);
    Rcpp::traits::input_parameter< const int& >::type focal_(focal_SEXP);
    Rcpp::traits::input_parameter< const NumericVector& >::type distance(distanceSEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type exact_(exact_SEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type caliper_dist_(caliper_dist_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type caliper_covs_(caliper_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericMatrix>& >::type caliper_covs_mat_(caliper_covs_mat_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type antiexact_covs_(antiexact_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type unit_id_(unit_id_SEXP);
    Rcpp::traits::input_parameter< const bool& >::type disl_prog(disl_progSEXP);
    rcpp_result_gen = Rcpp::wrap(nn_matchC_vec(treat_, ord, ratio, discarded, reuse_max, focal_, distance, exact_, caliper_dist_, caliper_covs_, caliper_covs_mat_, antiexact_covs_, unit_id_, disl_prog));
    return rcpp_result_gen;
END_RCPP
}
// nn_matchC_vec_closest
IntegerMatrix nn_matchC_vec_closest(const IntegerVector& treat, const IntegerVector& ratio, const LogicalVector& discarded, const int& reuse_max, const NumericVector& distance, const Nullable<IntegerMatrix>& exact_, const Nullable<double>& caliper_dist_, const Nullable<NumericVector>& caliper_covs_, const Nullable<NumericMatrix>& caliper_covs_mat_, const Nullable<IntegerMatrix>& antiexact_covs_, const Nullable<IntegerVector>& unit_id_, const bool& close, const bool& disl_prog);
RcppExport SEXP _MatchIt_nn_matchC_vec_closest(SEXP treatSEXP, SEXP ratioSEXP, SEXP discardedSEXP, SEXP reuse_maxSEXP, SEXP distanceSEXP, SEXP exact_SEXP, SEXP caliper_dist_SEXP, SEXP caliper_covs_SEXP, SEXP caliper_covs_mat_SEXP, SEXP antiexact_covs_SEXP, SEXP unit_id_SEXP, SEXP closeSEXP, SEXP disl_progSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerVector& >::type treat(treatSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type ratio(ratioSEXP);
    Rcpp::traits::input_parameter< const LogicalVector& >::type discarded(discardedSEXP);
    Rcpp::traits::input_parameter< const int& >::type reuse_max(reuse_maxSEXP);
    Rcpp::traits::input_parameter< const NumericVector& >::type distance(distanceSEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type exact_(exact_SEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type caliper_dist_(caliper_dist_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type caliper_covs_(caliper_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericMatrix>& >::type caliper_covs_mat_(caliper_covs_mat_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerMatrix>& >::type antiexact_covs_(antiexact_covs_SEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type unit_id_(unit_id_SEXP);
    Rcpp::traits::input_parameter< const bool& >::type close(closeSEXP);
    Rcpp::traits::input_parameter< const bool& >::type disl_prog(disl_progSEXP);
    rcpp_result_gen = Rcpp::wrap(nn_matchC_vec_closest(treat, ratio, discarded, reuse_max, distance, exact_, caliper_dist_, caliper_covs_, caliper_covs_mat_, antiexact_covs_, unit_id_, close, disl_prog));
    return rcpp_result_gen;
END_RCPP
}
// pairdistsubC
double pairdistsubC(const NumericVector& x, const IntegerVector& t, const IntegerVector& s);
RcppExport SEXP _MatchIt_pairdistsubC(SEXP xSEXP, SEXP tSEXP, SEXP sSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericVector& >::type x(xSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type t(tSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type s(sSEXP);
    rcpp_result_gen = Rcpp::wrap(pairdistsubC(x, t, s));
    return rcpp_result_gen;
END_RCPP
}
// preprocess_matchC
IntegerVector preprocess_matchC(IntegerVector t, NumericVector p);
RcppExport SEXP _MatchIt_preprocess_matchC(SEXP tSEXP, SEXP pSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type t(tSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type p(pSEXP);
    rcpp_result_gen = Rcpp::wrap(preprocess_matchC(t, p));
    return rcpp_result_gen;
END_RCPP
}
// subclass2mmC
IntegerMatrix subclass2mmC(const IntegerVector& subclass_, const IntegerVector& treat, const int& focal);
RcppExport SEXP _MatchIt_subclass2mmC(SEXP subclass_SEXP, SEXP treatSEXP, SEXP focalSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerVector& >::type subclass_(subclass_SEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type treat(treatSEXP);
    Rcpp::traits::input_parameter< const int& >::type focal(focalSEXP);
    rcpp_result_gen = Rcpp::wrap(subclass2mmC(subclass_, treat, focal));
    return rcpp_result_gen;
END_RCPP
}
// mm2subclassC
IntegerVector mm2subclassC(const IntegerMatrix& mm, const IntegerVector& treat, const Nullable<int>& focal);
RcppExport SEXP _MatchIt_mm2subclassC(SEXP mmSEXP, SEXP treatSEXP, SEXP focalSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerMatrix& >::type mm(mmSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type treat(treatSEXP);
    Rcpp::traits::input_parameter< const Nullable<int>& >::type focal(focalSEXP);
    rcpp_result_gen = Rcpp::wrap(mm2subclassC(mm, treat, focal));
    return rcpp_result_gen;
END_RCPP
}
// subclass_scootC
IntegerVector subclass_scootC(const IntegerVector& subclass_, const IntegerVector& treat_, const NumericVector& x_, const int& min_n);
RcppExport SEXP _MatchIt_subclass_scootC(SEXP subclass_SEXP, SEXP treat_SEXP, SEXP x_SEXP, SEXP min_nSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerVector& >::type subclass_(subclass_SEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type treat_(treat_SEXP);
    Rcpp::traits::input_parameter< const NumericVector& >::type x_(x_SEXP);
    Rcpp::traits::input_parameter< const int& >::type min_n(min_nSEXP);
    rcpp_result_gen = Rcpp::wrap(subclass_scootC(subclass_, treat_, x_, min_n));
    return rcpp_result_gen;
END_RCPP
}
// tabulateC
IntegerVector tabulateC(const IntegerVector& bins, const Nullable<int>& nbins);
RcppExport SEXP _MatchIt_tabulateC(SEXP binsSEXP, SEXP nbinsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerVector& >::type bins(binsSEXP);
    Rcpp::traits::input_parameter< const Nullable<int>& >::type nbins(nbinsSEXP);
    rcpp_result_gen = Rcpp::wrap(tabulateC(bins, nbins));
    return rcpp_result_gen;
END_RCPP
}
// weights_matrixC
NumericVector weights_matrixC(const IntegerMatrix& mm, const IntegerVector& treat_, const Nullable<int>& focal);
RcppExport SEXP _MatchIt_weights_matrixC(SEXP mmSEXP, SEXP treat_SEXP, SEXP focalSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerMatrix& >::type mm(mmSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type treat_(treat_SEXP);
    Rcpp::traits::input_parameter< const Nullable<int>& >::type focal(focalSEXP);
    rcpp_result_gen = Rcpp::wrap(weights_matrixC(mm, treat_, focal));
    return rcpp_result_gen;
END_RCPP
}

// validate (ensure exported C++ functions exist before calling them)
static int _MatchIt_RcppExport_validate(const char* sig) { 
    static std::set<std::string> signatures;
    if (signatures.empty()) {
    }
    return signatures.find(sig) != signatures.end();
}

// registerCCallable (register entry points for exported C++ functions)
RcppExport SEXP _MatchIt_RcppExport_registerCCallable() { 
    R_RegisterCCallable("MatchIt", "_MatchIt_RcppExport_validate", (DL_FUNC)_MatchIt_RcppExport_validate);
    return R_NilValue;
}

static const R_CallMethodDef CallEntries[] = {
    {"_MatchIt_all_equal_to", (DL_FUNC) &_MatchIt_all_equal_to, 2},
    {"_MatchIt_eucdistC_N1xN0", (DL_FUNC) &_MatchIt_eucdistC_N1xN0, 2},
    {"_MatchIt_get_splitsC", (DL_FUNC) &_MatchIt_get_splitsC, 2},
    {"_MatchIt_has_n_unique", (DL_FUNC) &_MatchIt_has_n_unique, 2},
    {"_MatchIt_nn_matchC_distmat", (DL_FUNC) &_MatchIt_nn_matchC_distmat, 14},
    {"_MatchIt_nn_matchC_distmat_closest", (DL_FUNC) &_MatchIt_nn_matchC_distmat_closest, 13},
    {"_MatchIt_nn_matchC_mahcovs", (DL_FUNC) &_MatchIt_nn_matchC_mahcovs, 15},
    {"_MatchIt_nn_matchC_mahcovs_closest", (DL_FUNC) &_MatchIt_nn_matchC_mahcovs_closest, 14},
    {"_MatchIt_nn_matchC_vec", (DL_FUNC) &_MatchIt_nn_matchC_vec, 14},
    {"_MatchIt_nn_matchC_vec_closest", (DL_FUNC) &_MatchIt_nn_matchC_vec_closest, 13},
    {"_MatchIt_pairdistsubC", (DL_FUNC) &_MatchIt_pairdistsubC, 3},
    {"_MatchIt_preprocess_matchC", (DL_FUNC) &_MatchIt_preprocess_matchC, 2},
    {"_MatchIt_subclass2mmC", (DL_FUNC) &_MatchIt_subclass2mmC, 3},
    {"_MatchIt_mm2subclassC", (DL_FUNC) &_MatchIt_mm2subclassC, 3},
    {"_MatchIt_subclass_scootC", (DL_FUNC) &_MatchIt_subclass_scootC, 4},
    {"_MatchIt_tabulateC", (DL_FUNC) &_MatchIt_tabulateC, 2},
    {"_MatchIt_weights_matrixC", (DL_FUNC) &_MatchIt_weights_matrixC, 3},
    {"_MatchIt_RcppExport_registerCCallable", (DL_FUNC) &_MatchIt_RcppExport_registerCCallable, 0},
    {NULL, NULL, 0}
};

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