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

// Rginv
arma::mat Rginv(const arma::mat& m, double rcond);
RcppExport SEXP _kimfilter_Rginv(SEXP mSEXP, SEXP rcondSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat& >::type m(mSEXP);
    Rcpp::traits::input_parameter< double >::type rcond(rcondSEXP);
    rcpp_result_gen = Rcpp::wrap(Rginv(m, rcond));
    return rcpp_result_gen;
END_RCPP
}
// gen_inv
arma::mat gen_inv(arma::mat m);
RcppExport SEXP _kimfilter_gen_inv(SEXP mSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type m(mSEXP);
    rcpp_result_gen = Rcpp::wrap(gen_inv(m));
    return rcpp_result_gen;
END_RCPP
}
// ss_prob_cpp
arma::mat ss_prob_cpp(arma::mat mat);
RcppExport SEXP _kimfilter_ss_prob_cpp(SEXP matSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type mat(matSEXP);
    rcpp_result_gen = Rcpp::wrap(ss_prob_cpp(mat));
    return rcpp_result_gen;
END_RCPP
}
// self_rbind
arma::mat self_rbind(arma::mat mat, int times);
RcppExport SEXP _kimfilter_self_rbind(SEXP matSEXP, SEXP timesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type mat(matSEXP);
    Rcpp::traits::input_parameter< int >::type times(timesSEXP);
    rcpp_result_gen = Rcpp::wrap(self_rbind(mat, times));
    return rcpp_result_gen;
END_RCPP
}
// contains
bool contains(std::string s, Rcpp::List L);
RcppExport SEXP _kimfilter_contains(SEXP sSEXP, SEXP LSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type s(sSEXP);
    Rcpp::traits::input_parameter< Rcpp::List >::type L(LSEXP);
    rcpp_result_gen = Rcpp::wrap(contains(s, L));
    return rcpp_result_gen;
END_RCPP
}
// kim_filter_cpp
Rcpp::List kim_filter_cpp(Rcpp::List& ssm, const arma::mat& yt, Rcpp::Nullable<Rcpp::NumericMatrix> Xo, Rcpp::Nullable<Rcpp::NumericMatrix> Xs, Rcpp::Nullable<Rcpp::NumericMatrix> weight, bool smooth);
RcppExport SEXP _kimfilter_kim_filter_cpp(SEXP ssmSEXP, SEXP ytSEXP, SEXP XoSEXP, SEXP XsSEXP, SEXP weightSEXP, SEXP smoothSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::List& >::type ssm(ssmSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type yt(ytSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::NumericMatrix> >::type Xo(XoSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::NumericMatrix> >::type Xs(XsSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::NumericMatrix> >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< bool >::type smooth(smoothSEXP);
    rcpp_result_gen = Rcpp::wrap(kim_filter_cpp(ssm, yt, Xo, Xs, weight, smooth));
    return rcpp_result_gen;
END_RCPP
}
// kim_filter_tvtp_cpp
Rcpp::List kim_filter_tvtp_cpp(Rcpp::List& ssm, const arma::mat& yt, Rcpp::Nullable<Rcpp::NumericMatrix> Xo, Rcpp::Nullable<Rcpp::NumericMatrix> Xs, Rcpp::Nullable<Rcpp::NumericMatrix> weight, bool smooth);
RcppExport SEXP _kimfilter_kim_filter_tvtp_cpp(SEXP ssmSEXP, SEXP ytSEXP, SEXP XoSEXP, SEXP XsSEXP, SEXP weightSEXP, SEXP smoothSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::List& >::type ssm(ssmSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type yt(ytSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::NumericMatrix> >::type Xo(XoSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::NumericMatrix> >::type Xs(XsSEXP);
    Rcpp::traits::input_parameter< Rcpp::Nullable<Rcpp::NumericMatrix> >::type weight(weightSEXP);
    Rcpp::traits::input_parameter< bool >::type smooth(smoothSEXP);
    rcpp_result_gen = Rcpp::wrap(kim_filter_tvtp_cpp(ssm, yt, Xo, Xs, weight, smooth));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_kimfilter_Rginv", (DL_FUNC) &_kimfilter_Rginv, 2},
    {"_kimfilter_gen_inv", (DL_FUNC) &_kimfilter_gen_inv, 1},
    {"_kimfilter_ss_prob_cpp", (DL_FUNC) &_kimfilter_ss_prob_cpp, 1},
    {"_kimfilter_self_rbind", (DL_FUNC) &_kimfilter_self_rbind, 2},
    {"_kimfilter_contains", (DL_FUNC) &_kimfilter_contains, 2},
    {"_kimfilter_kim_filter_cpp", (DL_FUNC) &_kimfilter_kim_filter_cpp, 6},
    {"_kimfilter_kim_filter_tvtp_cpp", (DL_FUNC) &_kimfilter_kim_filter_tvtp_cpp, 6},
    {NULL, NULL, 0}
};

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