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

#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

// hilbert_curve_3d_cpp
List hilbert_curve_3d_cpp(int level);
RcppExport SEXP _sfcurve_hilbert_curve_3d_cpp(SEXP levelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type level(levelSEXP);
    rcpp_result_gen = Rcpp::wrap(hilbert_curve_3d_cpp(level));
    return rcpp_result_gen;
END_RCPP
}
// expand_by_rules_cpp
List expand_by_rules_cpp(List rules, IntegerVector letters, IntegerVector code);
RcppExport SEXP _sfcurve_expand_by_rules_cpp(SEXP rulesSEXP, SEXP lettersSEXP, SEXP codeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type rules(rulesSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type letters(lettersSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type code(codeSEXP);
    rcpp_result_gen = Rcpp::wrap(expand_by_rules_cpp(rules, letters, code));
    return rcpp_result_gen;
END_RCPP
}
// expand_by_rules_2_cpp
List expand_by_rules_2_cpp(List rules, List flip, IntegerVector letters, IntegerVector code, LogicalVector l_flip);
RcppExport SEXP _sfcurve_expand_by_rules_2_cpp(SEXP rulesSEXP, SEXP flipSEXP, SEXP lettersSEXP, SEXP codeSEXP, SEXP l_flipSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type rules(rulesSEXP);
    Rcpp::traits::input_parameter< List >::type flip(flipSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type letters(lettersSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type code(codeSEXP);
    Rcpp::traits::input_parameter< LogicalVector >::type l_flip(l_flipSEXP);
    rcpp_result_gen = Rcpp::wrap(expand_by_rules_2_cpp(rules, flip, letters, code, l_flip));
    return rcpp_result_gen;
END_RCPP
}
// sfc_segments_cpp
NumericMatrix sfc_segments_cpp(IntegerVector seq, NumericVector rot, List bases, NumericVector start);
RcppExport SEXP _sfcurve_sfc_segments_cpp(SEXP seqSEXP, SEXP rotSEXP, SEXP basesSEXP, SEXP startSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type seq(seqSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type rot(rotSEXP);
    Rcpp::traits::input_parameter< List >::type bases(basesSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type start(startSEXP);
    rcpp_result_gen = Rcpp::wrap(sfc_segments_cpp(seq, rot, bases, start));
    return rcpp_result_gen;
END_RCPP
}
// hilbert_curve_cpp
List hilbert_curve_cpp(int level, int type);
RcppExport SEXP _sfcurve_hilbert_curve_cpp(SEXP levelSEXP, SEXP typeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type level(levelSEXP);
    Rcpp::traits::input_parameter< int >::type type(typeSEXP);
    rcpp_result_gen = Rcpp::wrap(hilbert_curve_cpp(level, type));
    return rcpp_result_gen;
END_RCPP
}
// peano_curve_cpp
List peano_curve_cpp(int level, int type);
RcppExport SEXP _sfcurve_peano_curve_cpp(SEXP levelSEXP, SEXP typeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type level(levelSEXP);
    Rcpp::traits::input_parameter< int >::type type(typeSEXP);
    rcpp_result_gen = Rcpp::wrap(peano_curve_cpp(level, type));
    return rcpp_result_gen;
END_RCPP
}
// int_to_binary
IntegerVector int_to_binary(int x, int len);
RcppExport SEXP _sfcurve_int_to_binary(SEXP xSEXP, SEXP lenSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type x(xSEXP);
    Rcpp::traits::input_parameter< int >::type len(lenSEXP);
    rcpp_result_gen = Rcpp::wrap(int_to_binary(x, len));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_sfcurve_hilbert_curve_3d_cpp", (DL_FUNC) &_sfcurve_hilbert_curve_3d_cpp, 1},
    {"_sfcurve_expand_by_rules_cpp", (DL_FUNC) &_sfcurve_expand_by_rules_cpp, 3},
    {"_sfcurve_expand_by_rules_2_cpp", (DL_FUNC) &_sfcurve_expand_by_rules_2_cpp, 5},
    {"_sfcurve_sfc_segments_cpp", (DL_FUNC) &_sfcurve_sfc_segments_cpp, 4},
    {"_sfcurve_hilbert_curve_cpp", (DL_FUNC) &_sfcurve_hilbert_curve_cpp, 2},
    {"_sfcurve_peano_curve_cpp", (DL_FUNC) &_sfcurve_peano_curve_cpp, 2},
    {"_sfcurve_int_to_binary", (DL_FUNC) &_sfcurve_int_to_binary, 2},
    {NULL, NULL, 0}
};

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