/**
 * @file inst/include/mlpack.h
 * @author Yashwant Singh Parihar
 * @author Dirk Eddelbuettel
 *
 * Include all of the base components required to work mlpack bindings.
 *
 * mlpack is free software; you may redistribute it and/or modify it under the
 * terms of the 3-clause BSD license.  You should have received a copy of the
 * 3-clause BSD license along with mlpack.  If not, see
 * http://www.opensource.org/licenses/BSD-3-Clause for more information.
 */
#ifndef MLPACK_BINDINGS_R_MLPACK_H
#define MLPACK_BINDINGS_R_MLPACK_H

// Armadillo does not provide an official support for unsigned / signed 8 bits
// integers.
// Since `char` might be represented differently on various hardware.
// We override Armadillo definition for unsigned and signed 8 bits integer to
// use uint8_t / int8_t respectively.
#ifndef ARMA_U8_TYPE
  #define ARMA_U8_TYPE std::uint8_t
#endif

#ifndef ARMA_S8_TYPE
  #define ARMA_S8_TYPE std::int8_t
#endif

// This also includes the Rcpp headers along with RcppArmadillo
#include <RcppArmadillo.h>

// Rcpp has its own stream object which cooperates more nicely with R's i/o
// And like armadillo, mlpack can use this stream object as well.
#if !defined(MLPACK_COUT_STREAM)
  #define MLPACK_COUT_STREAM Rcpp::Rcout
#endif
#if !defined(MLPACK_CERR_STREAM)
  #define MLPACK_CERR_STREAM Rcpp::Rcerr
#endif

// If we are on Windows 8 or older, simply disable httplib since it will fail to
// compile on CRAN.
#if defined(_WIN32) && defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0A00
  #undef  MLPACK_DISABLE_HTTPLIB
  #define MLPACK_DISABLE_HTTPLIB
#endif

#if !defined(MLPACK_R_ENABLE_STB)
  #undef  MLPACK_DISABLE_STB
  #define MLPACK_DISABLE_STB
#endif

#if !defined(MLPACK_R_ENABLE_DR_LIBS)
  #undef  MLPACK_DISABLE_DR_LIBS
  #define MLPACK_DISABLE_DR_LIBS
#endif

#if !defined(MLPACK_R_ENABLE_HTTPLIB)
  #undef  MLPACK_DISABLE_HTTPLIB
  #define MLPACK_DISABLE_HTTPLIB
#endif



// Include the core library
#include <mlpack.hpp>

// Prevent inclusion of Rcpp.h and RcppArmadillo.h via the
// autogenerated RcppExports.cpp
#define Rcpp_hpp
#define RcppArmadillo__RcppArmadillo__h

#endif
