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

// calcBATS
List calcBATS(const arma::mat& y, arma::mat& yHat, const arma::mat& wTranspose, const arma::mat& F, arma::mat& x, const arma::mat& g, arma::mat& e);
RcppExport SEXP _forecast_calcBATS(SEXP ySEXP, SEXP yHatSEXP, SEXP wTransposeSEXP, SEXP FSEXP, SEXP xSEXP, SEXP gSEXP, SEXP eSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat& >::type y(ySEXP);
    Rcpp::traits::input_parameter< arma::mat& >::type yHat(yHatSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type wTranspose(wTransposeSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type F(FSEXP);
    Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type g(gSEXP);
    Rcpp::traits::input_parameter< arma::mat& >::type e(eSEXP);
    rcpp_result_gen = Rcpp::wrap(calcBATS(y, yHat, wTranspose, F, x, g, e));
    return rcpp_result_gen;
END_RCPP
}
// calcBATSFaster
void calcBATSFaster(const arma::mat& y, arma::mat& yHat, const arma::mat& wTranspose, const arma::mat& F, arma::mat& x, const arma::mat& g, arma::mat& e, const arma::mat& xNought, const Nullable<IntegerVector>& sPeriods, const Nullable<double>& beta, int tau, int p, int q);
RcppExport SEXP _forecast_calcBATSFaster(SEXP ySEXP, SEXP yHatSEXP, SEXP wTransposeSEXP, SEXP FSEXP, SEXP xSEXP, SEXP gSEXP, SEXP eSEXP, SEXP xNoughtSEXP, SEXP sPeriodsSEXP, SEXP betaSEXP, SEXP tauSEXP, SEXP pSEXP, SEXP qSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat& >::type y(ySEXP);
    Rcpp::traits::input_parameter< arma::mat& >::type yHat(yHatSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type wTranspose(wTransposeSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type F(FSEXP);
    Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type g(gSEXP);
    Rcpp::traits::input_parameter< arma::mat& >::type e(eSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type xNought(xNoughtSEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type sPeriods(sPeriodsSEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< int >::type tau(tauSEXP);
    Rcpp::traits::input_parameter< int >::type p(pSEXP);
    Rcpp::traits::input_parameter< int >::type q(qSEXP);
    calcBATSFaster(y, yHat, wTranspose, F, x, g, e, xNought, sPeriods, beta, tau, p, q);
    return R_NilValue;
END_RCPP
}
// calcWTilda
arma::mat calcWTilda(arma::mat& wTildaTranspose, const arma::mat& D);
RcppExport SEXP _forecast_calcWTilda(SEXP wTildaTransposeSEXP, SEXP DSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat& >::type wTildaTranspose(wTildaTransposeSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type D(DSEXP);
    rcpp_result_gen = Rcpp::wrap(calcWTilda(wTildaTranspose, D));
    return rcpp_result_gen;
END_RCPP
}
// calcTBATSFaster
void calcTBATSFaster(const arma::mat& y, arma::mat& yHat, const arma::mat& wTranspose, const arma::mat& F, arma::mat& x, const arma::mat& g, arma::mat& e, const arma::mat& xNought);
RcppExport SEXP _forecast_calcTBATSFaster(SEXP ySEXP, SEXP yHatSEXP, SEXP wTransposeSEXP, SEXP FSEXP, SEXP xSEXP, SEXP gSEXP, SEXP eSEXP, SEXP xNoughtSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat& >::type y(ySEXP);
    Rcpp::traits::input_parameter< arma::mat& >::type yHat(yHatSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type wTranspose(wTransposeSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type F(FSEXP);
    Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type g(gSEXP);
    Rcpp::traits::input_parameter< arma::mat& >::type e(eSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type xNought(xNoughtSEXP);
    calcTBATSFaster(y, yHat, wTranspose, F, x, g, e, xNought);
    return R_NilValue;
END_RCPP
}
// etsTargetFunctionInit
SEXP etsTargetFunctionInit(SEXP p_y, SEXP p_nstate, SEXP p_errortype, SEXP p_trendtype, SEXP p_seasontype, SEXP p_damped, SEXP p_lower, SEXP p_upper, SEXP p_opt_crit, SEXP p_nmse, SEXP p_bounds, SEXP p_m, SEXP p_optAlpha, SEXP p_optBeta, SEXP p_optGamma, SEXP p_optPhi, SEXP p_givenAlpha, SEXP p_givenBeta, SEXP p_givenGamma, SEXP p_givenPhi, SEXP p_alpha, SEXP p_beta, SEXP p_gamma, SEXP p_phi, SEXP p_rho);
RcppExport SEXP _forecast_etsTargetFunctionInit(SEXP p_ySEXP, SEXP p_nstateSEXP, SEXP p_errortypeSEXP, SEXP p_trendtypeSEXP, SEXP p_seasontypeSEXP, SEXP p_dampedSEXP, SEXP p_lowerSEXP, SEXP p_upperSEXP, SEXP p_opt_critSEXP, SEXP p_nmseSEXP, SEXP p_boundsSEXP, SEXP p_mSEXP, SEXP p_optAlphaSEXP, SEXP p_optBetaSEXP, SEXP p_optGammaSEXP, SEXP p_optPhiSEXP, SEXP p_givenAlphaSEXP, SEXP p_givenBetaSEXP, SEXP p_givenGammaSEXP, SEXP p_givenPhiSEXP, SEXP p_alphaSEXP, SEXP p_betaSEXP, SEXP p_gammaSEXP, SEXP p_phiSEXP, SEXP p_rhoSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type p_y(p_ySEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_nstate(p_nstateSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_errortype(p_errortypeSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_trendtype(p_trendtypeSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_seasontype(p_seasontypeSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_damped(p_dampedSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_lower(p_lowerSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_upper(p_upperSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_opt_crit(p_opt_critSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_nmse(p_nmseSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_bounds(p_boundsSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_m(p_mSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_optAlpha(p_optAlphaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_optBeta(p_optBetaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_optGamma(p_optGammaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_optPhi(p_optPhiSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_givenAlpha(p_givenAlphaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_givenBeta(p_givenBetaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_givenGamma(p_givenGammaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_givenPhi(p_givenPhiSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_alpha(p_alphaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_beta(p_betaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_gamma(p_gammaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_phi(p_phiSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_rho(p_rhoSEXP);
    rcpp_result_gen = Rcpp::wrap(etsTargetFunctionInit(p_y, p_nstate, p_errortype, p_trendtype, p_seasontype, p_damped, p_lower, p_upper, p_opt_crit, p_nmse, p_bounds, p_m, p_optAlpha, p_optBeta, p_optGamma, p_optPhi, p_givenAlpha, p_givenBeta, p_givenGamma, p_givenPhi, p_alpha, p_beta, p_gamma, p_phi, p_rho));
    return rcpp_result_gen;
END_RCPP
}
// etsNelderMead
SEXP etsNelderMead(SEXP p_var, SEXP p_env, SEXP p_abstol, SEXP p_intol, SEXP p_alpha, SEXP p_beta, SEXP p_gamma, SEXP p_trace, SEXP p_maxit);
RcppExport SEXP _forecast_etsNelderMead(SEXP p_varSEXP, SEXP p_envSEXP, SEXP p_abstolSEXP, SEXP p_intolSEXP, SEXP p_alphaSEXP, SEXP p_betaSEXP, SEXP p_gammaSEXP, SEXP p_traceSEXP, SEXP p_maxitSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type p_var(p_varSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_env(p_envSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_abstol(p_abstolSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_intol(p_intolSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_alpha(p_alphaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_beta(p_betaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_gamma(p_gammaSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_trace(p_traceSEXP);
    Rcpp::traits::input_parameter< SEXP >::type p_maxit(p_maxitSEXP);
    rcpp_result_gen = Rcpp::wrap(etsNelderMead(p_var, p_env, p_abstol, p_intol, p_alpha, p_beta, p_gamma, p_trace, p_maxit));
    return rcpp_result_gen;
END_RCPP
}
// makeBATSWMatrix
List makeBATSWMatrix(const Nullable<double>& smallPhi, const Nullable<IntegerVector>& sPeriods, const Nullable<NumericVector>& arCoefs, const Nullable<NumericVector>& maCoefs);
RcppExport SEXP _forecast_makeBATSWMatrix(SEXP smallPhiSEXP, SEXP sPeriodsSEXP, SEXP arCoefsSEXP, SEXP maCoefsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Nullable<double>& >::type smallPhi(smallPhiSEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type sPeriods(sPeriodsSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type arCoefs(arCoefsSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type maCoefs(maCoefsSEXP);
    rcpp_result_gen = Rcpp::wrap(makeBATSWMatrix(smallPhi, sPeriods, arCoefs, maCoefs));
    return rcpp_result_gen;
END_RCPP
}
// makeBATSGMatrix
List makeBATSGMatrix(double alpha, const Nullable<double>& beta, const Nullable<NumericVector>& gammaVector, const Nullable<IntegerVector>& seasonalPeriods, int p, int q);
RcppExport SEXP _forecast_makeBATSGMatrix(SEXP alphaSEXP, SEXP betaSEXP, SEXP gammaVectorSEXP, SEXP seasonalPeriodsSEXP, SEXP pSEXP, SEXP qSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type gammaVector(gammaVectorSEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type seasonalPeriods(seasonalPeriodsSEXP);
    Rcpp::traits::input_parameter< int >::type p(pSEXP);
    Rcpp::traits::input_parameter< int >::type q(qSEXP);
    rcpp_result_gen = Rcpp::wrap(makeBATSGMatrix(alpha, beta, gammaVector, seasonalPeriods, p, q));
    return rcpp_result_gen;
END_RCPP
}
// makeTBATSWMatrix
List makeTBATSWMatrix(const Nullable<double>& smallPhi, const Nullable<IntegerVector>& kVector, const Nullable<NumericVector>& arCoefs, const Nullable<NumericVector>& maCoefs, const Nullable<int>& tau);
RcppExport SEXP _forecast_makeTBATSWMatrix(SEXP smallPhiSEXP, SEXP kVectorSEXP, SEXP arCoefsSEXP, SEXP maCoefsSEXP, SEXP tauSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Nullable<double>& >::type smallPhi(smallPhiSEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type kVector(kVectorSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type arCoefs(arCoefsSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type maCoefs(maCoefsSEXP);
    Rcpp::traits::input_parameter< const Nullable<int>& >::type tau(tauSEXP);
    rcpp_result_gen = Rcpp::wrap(makeTBATSWMatrix(smallPhi, kVector, arCoefs, maCoefs, tau));
    return rcpp_result_gen;
END_RCPP
}
// makeCIMatrix
arma::mat makeCIMatrix(int k, double m);
RcppExport SEXP _forecast_makeCIMatrix(SEXP kSEXP, SEXP mSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type k(kSEXP);
    Rcpp::traits::input_parameter< double >::type m(mSEXP);
    rcpp_result_gen = Rcpp::wrap(makeCIMatrix(k, m));
    return rcpp_result_gen;
END_RCPP
}
// makeSIMatrix
arma::mat makeSIMatrix(int k, double m);
RcppExport SEXP _forecast_makeSIMatrix(SEXP kSEXP, SEXP mSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type k(kSEXP);
    Rcpp::traits::input_parameter< double >::type m(mSEXP);
    rcpp_result_gen = Rcpp::wrap(makeSIMatrix(k, m));
    return rcpp_result_gen;
END_RCPP
}
// makeAIMatrix
arma::mat makeAIMatrix(const arma::mat& C, const arma::mat& S, int k);
RcppExport SEXP _forecast_makeAIMatrix(SEXP CSEXP, SEXP SSEXP, SEXP kSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat& >::type C(CSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type S(SSEXP);
    Rcpp::traits::input_parameter< int >::type k(kSEXP);
    rcpp_result_gen = Rcpp::wrap(makeAIMatrix(C, S, k));
    return rcpp_result_gen;
END_RCPP
}
// updateFMatrix
void updateFMatrix(arma::mat& F, const Nullable<double>& smallPhi, double alpha, const Nullable<double>& beta, const Nullable<arma::mat>& gammaBold, const Nullable<arma::mat>& ar, const Nullable<arma::mat>& ma, int tau);
RcppExport SEXP _forecast_updateFMatrix(SEXP FSEXP, SEXP smallPhiSEXP, SEXP alphaSEXP, SEXP betaSEXP, SEXP gammaBoldSEXP, SEXP arSEXP, SEXP maSEXP, SEXP tauSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat& >::type F(FSEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type smallPhi(smallPhiSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const Nullable<arma::mat>& >::type gammaBold(gammaBoldSEXP);
    Rcpp::traits::input_parameter< const Nullable<arma::mat>& >::type ar(arSEXP);
    Rcpp::traits::input_parameter< const Nullable<arma::mat>& >::type ma(maSEXP);
    Rcpp::traits::input_parameter< int >::type tau(tauSEXP);
    updateFMatrix(F, smallPhi, alpha, beta, gammaBold, ar, ma, tau);
    return R_NilValue;
END_RCPP
}
// updateWtransposeMatrix
void updateWtransposeMatrix(NumericMatrix& wTranspose, const Nullable<double>& smallPhi, int tau, const Nullable<NumericVector>& arCoefs, const Nullable<NumericVector>& maCoefs, int p, int q);
RcppExport SEXP _forecast_updateWtransposeMatrix(SEXP wTransposeSEXP, SEXP smallPhiSEXP, SEXP tauSEXP, SEXP arCoefsSEXP, SEXP maCoefsSEXP, SEXP pSEXP, SEXP qSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix& >::type wTranspose(wTransposeSEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type smallPhi(smallPhiSEXP);
    Rcpp::traits::input_parameter< int >::type tau(tauSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type arCoefs(arCoefsSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type maCoefs(maCoefsSEXP);
    Rcpp::traits::input_parameter< int >::type p(pSEXP);
    Rcpp::traits::input_parameter< int >::type q(qSEXP);
    updateWtransposeMatrix(wTranspose, smallPhi, tau, arCoefs, maCoefs, p, q);
    return R_NilValue;
END_RCPP
}
// updateGMatrix
void updateGMatrix(NumericMatrix& g, const Nullable<NumericMatrix>& gammaBold, double alpha, const Nullable<double>& beta, const Nullable<NumericVector>& gammaVector, const Nullable<IntegerVector>& seasonalPeriods);
RcppExport SEXP _forecast_updateGMatrix(SEXP gSEXP, SEXP gammaBoldSEXP, SEXP alphaSEXP, SEXP betaSEXP, SEXP gammaVectorSEXP, SEXP seasonalPeriodsSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix& >::type g(gSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericMatrix>& >::type gammaBold(gammaBoldSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const Nullable<NumericVector>& >::type gammaVector(gammaVectorSEXP);
    Rcpp::traits::input_parameter< const Nullable<IntegerVector>& >::type seasonalPeriods(seasonalPeriodsSEXP);
    updateGMatrix(g, gammaBold, alpha, beta, gammaVector, seasonalPeriods);
    return R_NilValue;
END_RCPP
}
// updateTBATSGammaBold
void updateTBATSGammaBold(NumericMatrix& gammaBold, const IntegerVector& kVector, const NumericVector& gammaOne, const NumericVector& gammaTwo);
RcppExport SEXP _forecast_updateTBATSGammaBold(SEXP gammaBoldSEXP, SEXP kVectorSEXP, SEXP gammaOneSEXP, SEXP gammaTwoSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix& >::type gammaBold(gammaBoldSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type kVector(kVectorSEXP);
    Rcpp::traits::input_parameter< const NumericVector& >::type gammaOne(gammaOneSEXP);
    Rcpp::traits::input_parameter< const NumericVector& >::type gammaTwo(gammaTwoSEXP);
    updateTBATSGammaBold(gammaBold, kVector, gammaOne, gammaTwo);
    return R_NilValue;
END_RCPP
}
// updateTBATSGMatrix
void updateTBATSGMatrix(arma::mat& g, const Nullable<arma::mat>& gammaBold, double alpha, const Nullable<double>& beta);
RcppExport SEXP _forecast_updateTBATSGMatrix(SEXP gSEXP, SEXP gammaBoldSEXP, SEXP alphaSEXP, SEXP betaSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat& >::type g(gSEXP);
    Rcpp::traits::input_parameter< const Nullable<arma::mat>& >::type gammaBold(gammaBoldSEXP);
    Rcpp::traits::input_parameter< double >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const Nullable<double>& >::type beta(betaSEXP);
    updateTBATSGMatrix(g, gammaBold, alpha, beta);
    return R_NilValue;
END_RCPP
}

RcppExport SEXP etscalc(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP etsforecast(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP etssimulate(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);

static const R_CallMethodDef CallEntries[] = {
    {"_forecast_calcBATS", (DL_FUNC) &_forecast_calcBATS, 7},
    {"_forecast_calcBATSFaster", (DL_FUNC) &_forecast_calcBATSFaster, 13},
    {"_forecast_calcWTilda", (DL_FUNC) &_forecast_calcWTilda, 2},
    {"_forecast_calcTBATSFaster", (DL_FUNC) &_forecast_calcTBATSFaster, 8},
    {"_forecast_etsTargetFunctionInit", (DL_FUNC) &_forecast_etsTargetFunctionInit, 25},
    {"_forecast_etsNelderMead", (DL_FUNC) &_forecast_etsNelderMead, 9},
    {"_forecast_makeBATSWMatrix", (DL_FUNC) &_forecast_makeBATSWMatrix, 4},
    {"_forecast_makeBATSGMatrix", (DL_FUNC) &_forecast_makeBATSGMatrix, 6},
    {"_forecast_makeTBATSWMatrix", (DL_FUNC) &_forecast_makeTBATSWMatrix, 5},
    {"_forecast_makeCIMatrix", (DL_FUNC) &_forecast_makeCIMatrix, 2},
    {"_forecast_makeSIMatrix", (DL_FUNC) &_forecast_makeSIMatrix, 2},
    {"_forecast_makeAIMatrix", (DL_FUNC) &_forecast_makeAIMatrix, 3},
    {"_forecast_updateFMatrix", (DL_FUNC) &_forecast_updateFMatrix, 8},
    {"_forecast_updateWtransposeMatrix", (DL_FUNC) &_forecast_updateWtransposeMatrix, 7},
    {"_forecast_updateGMatrix", (DL_FUNC) &_forecast_updateGMatrix, 6},
    {"_forecast_updateTBATSGammaBold", (DL_FUNC) &_forecast_updateTBATSGammaBold, 4},
    {"_forecast_updateTBATSGMatrix", (DL_FUNC) &_forecast_updateTBATSGMatrix, 4},
    {"etscalc",     (DL_FUNC) &etscalc,     11},
    {"etsforecast", (DL_FUNC) &etsforecast,  6},
    {"etssimulate", (DL_FUNC) &etssimulate, 11},
    {NULL, NULL, 0}
};

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