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

// daudin
double daudin(int local_score, int sequence_length, NumericVector score_probabilities, Rcpp::Nullable<Rcpp::IntegerVector> sequence_min, Rcpp::Nullable<Rcpp::IntegerVector> sequence_max, Rcpp::Nullable<Rcpp::IntegerVector> score_values);
RcppExport SEXP _localScore_daudin(SEXP local_scoreSEXP, SEXP sequence_lengthSEXP, SEXP score_probabilitiesSEXP, SEXP sequence_minSEXP, SEXP sequence_maxSEXP, SEXP score_valuesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type local_score(local_scoreSEXP);
    Rcpp::traits::input_parameter< int >::type sequence_length(sequence_lengthSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type score_probabilities(score_probabilitiesSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type sequence_min(sequence_minSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type sequence_max(sequence_maxSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type score_values(score_valuesSEXP);
    rcpp_result_gen = Rcpp::wrap(daudin(local_score, sequence_length, score_probabilities, sequence_min, sequence_max, score_values));
    return rcpp_result_gen;
END_RCPP
}
// karlin
double karlin(int local_score, int sequence_length, NumericVector score_probabilities, Rcpp::Nullable<Rcpp::IntegerVector> sequence_min, Rcpp::Nullable<Rcpp::IntegerVector> sequence_max, Rcpp::Nullable<Rcpp::IntegerVector> score_values);
RcppExport SEXP _localScore_karlin(SEXP local_scoreSEXP, SEXP sequence_lengthSEXP, SEXP score_probabilitiesSEXP, SEXP sequence_minSEXP, SEXP sequence_maxSEXP, SEXP score_valuesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type local_score(local_scoreSEXP);
    Rcpp::traits::input_parameter< int >::type sequence_length(sequence_lengthSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type score_probabilities(score_probabilitiesSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type sequence_min(sequence_minSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type sequence_max(sequence_maxSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type score_values(score_valuesSEXP);
    rcpp_result_gen = Rcpp::wrap(karlin(local_score, sequence_length, score_probabilities, sequence_min, sequence_max, score_values));
    return rcpp_result_gen;
END_RCPP
}
// karlin_parameters
NumericVector karlin_parameters(NumericVector score_probabilities, Rcpp::Nullable<Rcpp::IntegerVector> sequence_min, Rcpp::Nullable<Rcpp::IntegerVector> sequence_max, Rcpp::Nullable<Rcpp::IntegerVector> score_values);
RcppExport SEXP _localScore_karlin_parameters(SEXP score_probabilitiesSEXP, SEXP sequence_minSEXP, SEXP sequence_maxSEXP, SEXP score_valuesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type score_probabilities(score_probabilitiesSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type sequence_min(sequence_minSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type sequence_max(sequence_maxSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type score_values(score_valuesSEXP);
    rcpp_result_gen = Rcpp::wrap(karlin_parameters(score_probabilities, sequence_min, sequence_max, score_values));
    return rcpp_result_gen;
END_RCPP
}
// mcc
double mcc(int local_score, int sequence_length, NumericVector score_probabilities, Rcpp::Nullable<Rcpp::IntegerVector> sequence_min, Rcpp::Nullable<Rcpp::IntegerVector> sequence_max, Rcpp::Nullable<Rcpp::IntegerVector> score_values);
RcppExport SEXP _localScore_mcc(SEXP local_scoreSEXP, SEXP sequence_lengthSEXP, SEXP score_probabilitiesSEXP, SEXP sequence_minSEXP, SEXP sequence_maxSEXP, SEXP score_valuesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type local_score(local_scoreSEXP);
    Rcpp::traits::input_parameter< int >::type sequence_length(sequence_lengthSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type score_probabilities(score_probabilitiesSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type sequence_min(sequence_minSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type sequence_max(sequence_maxSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type score_values(score_valuesSEXP);
    rcpp_result_gen = Rcpp::wrap(mcc(local_score, sequence_length, score_probabilities, sequence_min, sequence_max, score_values));
    return rcpp_result_gen;
END_RCPP
}
// maxPartialSumd
double maxPartialSumd(int k, NumericVector score_probabilities, Rcpp::Nullable<Rcpp::IntegerVector> sequence_min, Rcpp::Nullable<Rcpp::IntegerVector> sequence_max, Rcpp::Nullable<Rcpp::IntegerVector> score_values);
RcppExport SEXP _localScore_maxPartialSumd(SEXP kSEXP, SEXP score_probabilitiesSEXP, SEXP sequence_minSEXP, SEXP sequence_maxSEXP, SEXP score_valuesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type k(kSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type score_probabilities(score_probabilitiesSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type sequence_min(sequence_minSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type sequence_max(sequence_maxSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::IntegerVector> >::type score_values(score_valuesSEXP);
    rcpp_result_gen = Rcpp::wrap(maxPartialSumd(k, score_probabilities, sequence_min, sequence_max, score_values));
    return rcpp_result_gen;
END_RCPP
}
// stationary_distribution
NumericVector stationary_distribution(NumericMatrix m);
RcppExport SEXP _localScore_stationary_distribution(SEXP mSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type m(mSEXP);
    rcpp_result_gen = Rcpp::wrap(stationary_distribution(m));
    return rcpp_result_gen;
END_RCPP
}
// exact_mc
double exact_mc(int local_score, NumericMatrix m, int sequence_length, Nullable<NumericVector> score_values, Nullable<NumericVector> prob0);
RcppExport SEXP _localScore_exact_mc(SEXP local_scoreSEXP, SEXP mSEXP, SEXP sequence_lengthSEXP, SEXP score_valuesSEXP, SEXP prob0SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type local_score(local_scoreSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type m(mSEXP);
    Rcpp::traits::input_parameter< int >::type sequence_length(sequence_lengthSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type score_values(score_valuesSEXP);
    Rcpp::traits::input_parameter< Nullable<NumericVector> >::type prob0(prob0SEXP);
    rcpp_result_gen = Rcpp::wrap(exact_mc(local_score, m, sequence_length, score_values, prob0));
    return rcpp_result_gen;
END_RCPP
}
// localScoreC
SEXP localScoreC(SEXP v, bool suppressWarnings);
RcppExport SEXP _localScore_localScoreC(SEXP vSEXP, SEXP suppressWarningsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type v(vSEXP);
    Rcpp::traits::input_parameter< bool >::type suppressWarnings(suppressWarningsSEXP);
    rcpp_result_gen = Rcpp::wrap(localScoreC(v, suppressWarnings));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_localScore_daudin", (DL_FUNC) &_localScore_daudin, 6},
    {"_localScore_karlin", (DL_FUNC) &_localScore_karlin, 6},
    {"_localScore_karlin_parameters", (DL_FUNC) &_localScore_karlin_parameters, 4},
    {"_localScore_mcc", (DL_FUNC) &_localScore_mcc, 6},
    {"_localScore_maxPartialSumd", (DL_FUNC) &_localScore_maxPartialSumd, 5},
    {"_localScore_stationary_distribution", (DL_FUNC) &_localScore_stationary_distribution, 1},
    {"_localScore_exact_mc", (DL_FUNC) &_localScore_exact_mc, 5},
    {"_localScore_localScoreC", (DL_FUNC) &_localScore_localScoreC, 2},
    {NULL, NULL, 0}
};

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