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

// row_mean_dgcmatrix
NumericVector row_mean_dgcmatrix(S4 matrix);
RcppExport SEXP _sctransform_row_mean_dgcmatrix(SEXP matrixSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< S4 >::type matrix(matrixSEXP);
    rcpp_result_gen = Rcpp::wrap(row_mean_dgcmatrix(matrix));
    return rcpp_result_gen;
END_RCPP
}
// row_mean_grouped_dgcmatrix
NumericMatrix row_mean_grouped_dgcmatrix(S4 matrix, IntegerVector group, bool shuffle);
RcppExport SEXP _sctransform_row_mean_grouped_dgcmatrix(SEXP matrixSEXP, SEXP groupSEXP, SEXP shuffleSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< S4 >::type matrix(matrixSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type group(groupSEXP);
    Rcpp::traits::input_parameter< bool >::type shuffle(shuffleSEXP);
    rcpp_result_gen = Rcpp::wrap(row_mean_grouped_dgcmatrix(matrix, group, shuffle));
    return rcpp_result_gen;
END_RCPP
}
// row_gmean_dgcmatrix
NumericVector row_gmean_dgcmatrix(S4 matrix, double eps);
RcppExport SEXP _sctransform_row_gmean_dgcmatrix(SEXP matrixSEXP, SEXP epsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< S4 >::type matrix(matrixSEXP);
    Rcpp::traits::input_parameter< double >::type eps(epsSEXP);
    rcpp_result_gen = Rcpp::wrap(row_gmean_dgcmatrix(matrix, eps));
    return rcpp_result_gen;
END_RCPP
}
// row_gmean_grouped_dgcmatrix
NumericMatrix row_gmean_grouped_dgcmatrix(S4 matrix, IntegerVector group, double eps, bool shuffle);
RcppExport SEXP _sctransform_row_gmean_grouped_dgcmatrix(SEXP matrixSEXP, SEXP groupSEXP, SEXP epsSEXP, SEXP shuffleSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< S4 >::type matrix(matrixSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type group(groupSEXP);
    Rcpp::traits::input_parameter< double >::type eps(epsSEXP);
    Rcpp::traits::input_parameter< bool >::type shuffle(shuffleSEXP);
    rcpp_result_gen = Rcpp::wrap(row_gmean_grouped_dgcmatrix(matrix, group, eps, shuffle));
    return rcpp_result_gen;
END_RCPP
}
// row_nonzero_count_dgcmatrix
IntegerVector row_nonzero_count_dgcmatrix(S4 matrix);
RcppExport SEXP _sctransform_row_nonzero_count_dgcmatrix(SEXP matrixSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< S4 >::type matrix(matrixSEXP);
    rcpp_result_gen = Rcpp::wrap(row_nonzero_count_dgcmatrix(matrix));
    return rcpp_result_gen;
END_RCPP
}
// row_nonzero_count_grouped_dgcmatrix
IntegerMatrix row_nonzero_count_grouped_dgcmatrix(S4 matrix, IntegerVector group);
RcppExport SEXP _sctransform_row_nonzero_count_grouped_dgcmatrix(SEXP matrixSEXP, SEXP groupSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< S4 >::type matrix(matrixSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type group(groupSEXP);
    rcpp_result_gen = Rcpp::wrap(row_nonzero_count_grouped_dgcmatrix(matrix, group));
    return rcpp_result_gen;
END_RCPP
}
// row_var_dgcmatrix
NumericVector row_var_dgcmatrix(NumericVector x, IntegerVector i, int rows, int cols);
RcppExport SEXP _sctransform_row_var_dgcmatrix(SEXP xSEXP, SEXP iSEXP, SEXP rowsSEXP, SEXP colsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type i(iSEXP);
    Rcpp::traits::input_parameter< int >::type rows(rowsSEXP);
    Rcpp::traits::input_parameter< int >::type cols(colsSEXP);
    rcpp_result_gen = Rcpp::wrap(row_var_dgcmatrix(x, i, rows, cols));
    return rcpp_result_gen;
END_RCPP
}
// grouped_mean_diff_per_row
NumericVector grouped_mean_diff_per_row(NumericMatrix x, IntegerVector group, bool shuffle);
RcppExport SEXP _sctransform_grouped_mean_diff_per_row(SEXP xSEXP, SEXP groupSEXP, SEXP shuffleSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type x(xSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type group(groupSEXP);
    Rcpp::traits::input_parameter< bool >::type shuffle(shuffleSEXP);
    rcpp_result_gen = Rcpp::wrap(grouped_mean_diff_per_row(x, group, shuffle));
    return rcpp_result_gen;
END_RCPP
}
// mean_boot
NumericVector mean_boot(NumericVector x, int N, int S);
RcppExport SEXP _sctransform_mean_boot(SEXP xSEXP, SEXP NSEXP, SEXP SSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP);
    Rcpp::traits::input_parameter< int >::type N(NSEXP);
    Rcpp::traits::input_parameter< int >::type S(SSEXP);
    rcpp_result_gen = Rcpp::wrap(mean_boot(x, N, S));
    return rcpp_result_gen;
END_RCPP
}
// mean_boot_grouped
NumericMatrix mean_boot_grouped(NumericVector x, IntegerVector group, int N, int S);
RcppExport SEXP _sctransform_mean_boot_grouped(SEXP xSEXP, SEXP groupSEXP, SEXP NSEXP, SEXP SSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type group(groupSEXP);
    Rcpp::traits::input_parameter< int >::type N(NSEXP);
    Rcpp::traits::input_parameter< int >::type S(SSEXP);
    rcpp_result_gen = Rcpp::wrap(mean_boot_grouped(x, group, N, S));
    return rcpp_result_gen;
END_RCPP
}
// distribution_shift
NumericVector distribution_shift(NumericMatrix x);
RcppExport SEXP _sctransform_distribution_shift(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(distribution_shift(x));
    return rcpp_result_gen;
END_RCPP
}
// qpois_reg
List qpois_reg(NumericMatrix X, NumericVector Y, const double tol, const int maxiters, const double minphi, const bool returnfit);
RcppExport SEXP _sctransform_qpois_reg(SEXP XSEXP, SEXP YSEXP, SEXP tolSEXP, SEXP maxitersSEXP, SEXP minphiSEXP, SEXP returnfitSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type X(XSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type Y(YSEXP);
    Rcpp::traits::input_parameter< const double >::type tol(tolSEXP);
    Rcpp::traits::input_parameter< const int >::type maxiters(maxitersSEXP);
    Rcpp::traits::input_parameter< const double >::type minphi(minphiSEXP);
    Rcpp::traits::input_parameter< const bool >::type returnfit(returnfitSEXP);
    rcpp_result_gen = Rcpp::wrap(qpois_reg(X, Y, tol, maxiters, minphi, returnfit));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_sctransform_row_mean_dgcmatrix", (DL_FUNC) &_sctransform_row_mean_dgcmatrix, 1},
    {"_sctransform_row_mean_grouped_dgcmatrix", (DL_FUNC) &_sctransform_row_mean_grouped_dgcmatrix, 3},
    {"_sctransform_row_gmean_dgcmatrix", (DL_FUNC) &_sctransform_row_gmean_dgcmatrix, 2},
    {"_sctransform_row_gmean_grouped_dgcmatrix", (DL_FUNC) &_sctransform_row_gmean_grouped_dgcmatrix, 4},
    {"_sctransform_row_nonzero_count_dgcmatrix", (DL_FUNC) &_sctransform_row_nonzero_count_dgcmatrix, 1},
    {"_sctransform_row_nonzero_count_grouped_dgcmatrix", (DL_FUNC) &_sctransform_row_nonzero_count_grouped_dgcmatrix, 2},
    {"_sctransform_row_var_dgcmatrix", (DL_FUNC) &_sctransform_row_var_dgcmatrix, 4},
    {"_sctransform_grouped_mean_diff_per_row", (DL_FUNC) &_sctransform_grouped_mean_diff_per_row, 3},
    {"_sctransform_mean_boot", (DL_FUNC) &_sctransform_mean_boot, 3},
    {"_sctransform_mean_boot_grouped", (DL_FUNC) &_sctransform_mean_boot_grouped, 4},
    {"_sctransform_distribution_shift", (DL_FUNC) &_sctransform_distribution_shift, 1},
    {"_sctransform_qpois_reg", (DL_FUNC) &_sctransform_qpois_reg, 6},
    {NULL, NULL, 0}
};

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