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

// find_lower_bound_index
int find_lower_bound_index(const Rcpp::NumericVector& L, const int start, const double tau);
RcppExport SEXP _nhppp_find_lower_bound_index(SEXP LSEXP, SEXP startSEXP, SEXP tauSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type L(LSEXP);
    Rcpp::traits::input_parameter< const int >::type start(startSEXP);
    Rcpp::traits::input_parameter< const double >::type tau(tauSEXP);
    rcpp_result_gen = Rcpp::wrap(find_lower_bound_index(L, start, tau));
    return rcpp_result_gen;
END_RCPP
}
// find_upper_bound_index
int find_upper_bound_index(const Rcpp::NumericVector& L, const int start, const double tau);
RcppExport SEXP _nhppp_find_upper_bound_index(SEXP LSEXP, SEXP startSEXP, SEXP tauSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type L(LSEXP);
    Rcpp::traits::input_parameter< const int >::type start(startSEXP);
    Rcpp::traits::input_parameter< const double >::type tau(tauSEXP);
    rcpp_result_gen = Rcpp::wrap(find_upper_bound_index(L, start, tau));
    return rcpp_result_gen;
END_RCPP
}
// matrix_cumsum_columns
Rcpp::NumericMatrix matrix_cumsum_columns(const Rcpp::NumericMatrix& X);
RcppExport SEXP _nhppp_matrix_cumsum_columns(SEXP XSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type X(XSEXP);
    rcpp_result_gen = Rcpp::wrap(matrix_cumsum_columns(X));
    return rcpp_result_gen;
END_RCPP
}
// matrix_cumsum_columns_inplace
void matrix_cumsum_columns_inplace(Rcpp::NumericMatrix& X);
RcppExport SEXP _nhppp_matrix_cumsum_columns_inplace(SEXP XSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix& >::type X(XSEXP);
    matrix_cumsum_columns_inplace(X);
    return R_NilValue;
END_RCPP
}
// matrix_diff_columns
Rcpp::NumericMatrix matrix_diff_columns(const Rcpp::NumericMatrix& X);
RcppExport SEXP _nhppp_matrix_diff_columns(SEXP XSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type X(XSEXP);
    rcpp_result_gen = Rcpp::wrap(matrix_diff_columns(X));
    return rcpp_result_gen;
END_RCPP
}
// matrix_diff_columns_inplace
void matrix_diff_columns_inplace(Rcpp::NumericMatrix& X);
RcppExport SEXP _nhppp_matrix_diff_columns_inplace(SEXP XSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix& >::type X(XSEXP);
    matrix_diff_columns_inplace(X);
    return R_NilValue;
END_RCPP
}
// rztpois
int rztpois(const double lambda);
RcppExport SEXP _nhppp_rztpois(SEXP lambdaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const double >::type lambda(lambdaSEXP);
    rcpp_result_gen = Rcpp::wrap(rztpois(lambda));
    return rcpp_result_gen;
END_RCPP
}
// rztpois_vec
Rcpp::IntegerVector rztpois_vec(const Rcpp::NumericVector& lambda);
RcppExport SEXP _nhppp_rztpois_vec(SEXP lambdaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type lambda(lambdaSEXP);
    rcpp_result_gen = Rcpp::wrap(rztpois_vec(lambda));
    return rcpp_result_gen;
END_RCPP
}
// step_regular_inverse
Rcpp::NumericMatrix step_regular_inverse(const int max_events, const Rcpp::NumericMatrix& Lambda, const Rcpp::NumericMatrix& Tau, const Rcpp::NumericMatrix& range_t, const bool atmost1);
RcppExport SEXP _nhppp_step_regular_inverse(SEXP max_eventsSEXP, SEXP LambdaSEXP, SEXP TauSEXP, SEXP range_tSEXP, SEXP atmost1SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type max_events(max_eventsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type Lambda(LambdaSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type Tau(TauSEXP);
    Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type range_t(range_tSEXP);
    Rcpp::traits::input_parameter< const bool >::type atmost1(atmost1SEXP);
    rcpp_result_gen = Rcpp::wrap(step_regular_inverse(max_events, Lambda, Tau, range_t, atmost1));
    return rcpp_result_gen;
END_RCPP
}
// vdraw_intensity_step_regular
NumericMatrix vdraw_intensity_step_regular(const Function& lambda, const NumericMatrix& rate_maj, const bool is_cumulative, const NumericMatrix& range_t, const NumericMatrix& subinterval, const bool use_subinteval, const double tol, const bool atmost1, const int atmostB);
RcppExport SEXP _nhppp_vdraw_intensity_step_regular(SEXP lambdaSEXP, SEXP rate_majSEXP, SEXP is_cumulativeSEXP, SEXP range_tSEXP, SEXP subintervalSEXP, SEXP use_subintevalSEXP, SEXP tolSEXP, SEXP atmost1SEXP, SEXP atmostBSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Function& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type rate_maj(rate_majSEXP);
    Rcpp::traits::input_parameter< const bool >::type is_cumulative(is_cumulativeSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type range_t(range_tSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type subinterval(subintervalSEXP);
    Rcpp::traits::input_parameter< const bool >::type use_subinteval(use_subintevalSEXP);
    Rcpp::traits::input_parameter< const double >::type tol(tolSEXP);
    Rcpp::traits::input_parameter< const bool >::type atmost1(atmost1SEXP);
    Rcpp::traits::input_parameter< const int >::type atmostB(atmostBSEXP);
    rcpp_result_gen = Rcpp::wrap(vdraw_intensity_step_regular(lambda, rate_maj, is_cumulative, range_t, subinterval, use_subinteval, tol, atmost1, atmostB));
    return rcpp_result_gen;
END_RCPP
}
// vdraw_sc_step_regular
NumericMatrix vdraw_sc_step_regular(const NumericMatrix& rate, const bool is_cumulative, const NumericMatrix& range_t, const double tol, const bool atmost1);
RcppExport SEXP _nhppp_vdraw_sc_step_regular(SEXP rateSEXP, SEXP is_cumulativeSEXP, SEXP range_tSEXP, SEXP tolSEXP, SEXP atmost1SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericMatrix& >::type rate(rateSEXP);
    Rcpp::traits::input_parameter< const bool >::type is_cumulative(is_cumulativeSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type range_t(range_tSEXP);
    Rcpp::traits::input_parameter< const double >::type tol(tolSEXP);
    Rcpp::traits::input_parameter< const bool >::type atmost1(atmost1SEXP);
    rcpp_result_gen = Rcpp::wrap(vdraw_sc_step_regular(rate, is_cumulative, range_t, tol, atmost1));
    return rcpp_result_gen;
END_RCPP
}
// vdraw_sc_step_regular2
NumericMatrix vdraw_sc_step_regular2(const NumericMatrix& rate, const bool is_cumulative, const NumericMatrix& range_t, const NumericMatrix& subinterval, const double tol, const bool atmost1, const int atmostB);
RcppExport SEXP _nhppp_vdraw_sc_step_regular2(SEXP rateSEXP, SEXP is_cumulativeSEXP, SEXP range_tSEXP, SEXP subintervalSEXP, SEXP tolSEXP, SEXP atmost1SEXP, SEXP atmostBSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericMatrix& >::type rate(rateSEXP);
    Rcpp::traits::input_parameter< const bool >::type is_cumulative(is_cumulativeSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type range_t(range_tSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type subinterval(subintervalSEXP);
    Rcpp::traits::input_parameter< const double >::type tol(tolSEXP);
    Rcpp::traits::input_parameter< const bool >::type atmost1(atmost1SEXP);
    Rcpp::traits::input_parameter< const int >::type atmostB(atmostBSEXP);
    rcpp_result_gen = Rcpp::wrap(vdraw_sc_step_regular2(rate, is_cumulative, range_t, subinterval, tol, atmost1, atmostB));
    return rcpp_result_gen;
END_RCPP
}
// vztdraw_sc_step_regular
NumericMatrix vztdraw_sc_step_regular(const NumericMatrix& rate, const bool is_cumulative, const NumericMatrix& range_t, const bool atmost1);
RcppExport SEXP _nhppp_vztdraw_sc_step_regular(SEXP rateSEXP, SEXP is_cumulativeSEXP, SEXP range_tSEXP, SEXP atmost1SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericMatrix& >::type rate(rateSEXP);
    Rcpp::traits::input_parameter< const bool >::type is_cumulative(is_cumulativeSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type range_t(range_tSEXP);
    Rcpp::traits::input_parameter< const bool >::type atmost1(atmost1SEXP);
    rcpp_result_gen = Rcpp::wrap(vztdraw_sc_step_regular(rate, is_cumulative, range_t, atmost1));
    return rcpp_result_gen;
END_RCPP
}
// vztdraw_sc_step_regular2
NumericMatrix vztdraw_sc_step_regular2(const NumericMatrix& rate, const bool is_cumulative, const NumericMatrix& range_t, const NumericMatrix& subinterval, const bool atmost1);
RcppExport SEXP _nhppp_vztdraw_sc_step_regular2(SEXP rateSEXP, SEXP is_cumulativeSEXP, SEXP range_tSEXP, SEXP subintervalSEXP, SEXP atmost1SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const NumericMatrix& >::type rate(rateSEXP);
    Rcpp::traits::input_parameter< const bool >::type is_cumulative(is_cumulativeSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type range_t(range_tSEXP);
    Rcpp::traits::input_parameter< const NumericMatrix& >::type subinterval(subintervalSEXP);
    Rcpp::traits::input_parameter< const bool >::type atmost1(atmost1SEXP);
    rcpp_result_gen = Rcpp::wrap(vztdraw_sc_step_regular2(rate, is_cumulative, range_t, subinterval, atmost1));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_nhppp_find_lower_bound_index", (DL_FUNC) &_nhppp_find_lower_bound_index, 3},
    {"_nhppp_find_upper_bound_index", (DL_FUNC) &_nhppp_find_upper_bound_index, 3},
    {"_nhppp_matrix_cumsum_columns", (DL_FUNC) &_nhppp_matrix_cumsum_columns, 1},
    {"_nhppp_matrix_cumsum_columns_inplace", (DL_FUNC) &_nhppp_matrix_cumsum_columns_inplace, 1},
    {"_nhppp_matrix_diff_columns", (DL_FUNC) &_nhppp_matrix_diff_columns, 1},
    {"_nhppp_matrix_diff_columns_inplace", (DL_FUNC) &_nhppp_matrix_diff_columns_inplace, 1},
    {"_nhppp_rztpois", (DL_FUNC) &_nhppp_rztpois, 1},
    {"_nhppp_rztpois_vec", (DL_FUNC) &_nhppp_rztpois_vec, 1},
    {"_nhppp_step_regular_inverse", (DL_FUNC) &_nhppp_step_regular_inverse, 5},
    {"_nhppp_vdraw_intensity_step_regular", (DL_FUNC) &_nhppp_vdraw_intensity_step_regular, 9},
    {"_nhppp_vdraw_sc_step_regular", (DL_FUNC) &_nhppp_vdraw_sc_step_regular, 5},
    {"_nhppp_vdraw_sc_step_regular2", (DL_FUNC) &_nhppp_vdraw_sc_step_regular2, 7},
    {"_nhppp_vztdraw_sc_step_regular", (DL_FUNC) &_nhppp_vztdraw_sc_step_regular, 4},
    {"_nhppp_vztdraw_sc_step_regular2", (DL_FUNC) &_nhppp_vztdraw_sc_step_regular2, 5},
    {NULL, NULL, 0}
};

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