12#ifndef MLPACK_BINDINGS_R_GET_R_TYPE_HPP
13#define MLPACK_BINDINGS_R_GET_R_TYPE_HPP
28 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
29 const typename boost::disable_if<std::is_same<T,
30 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
40 const typename boost::disable_if<arma::is_arma_type<bool>>::type*,
41 const typename boost::disable_if<std::is_same<
bool,
42 std::tuple<data::DatasetInfo, arma::mat>>>::type*)
52 const typename boost::disable_if<arma::is_arma_type<int>>::type*,
53 const typename boost::disable_if<std::is_same<
int,
54 std::tuple<data::DatasetInfo, arma::mat>>>::type*)
64 const typename boost::disable_if<arma::is_arma_type<size_t>>::type*,
65 const typename boost::disable_if<std::is_same<
size_t,
66 std::tuple<data::DatasetInfo, arma::mat>>>::type*)
76 const typename boost::disable_if<arma::is_arma_type<double>>::type*,
77 const typename boost::disable_if<std::is_same<
double,
78 std::tuple<data::DatasetInfo, arma::mat>>>::type*)
84inline std::string GetRType<std::string>(
88 const typename boost::disable_if<arma::is_arma_type<std::string>>::type*,
89 const typename boost::disable_if<std::is_same<std::string,
90 std::tuple<data::DatasetInfo, arma::mat>>>::type*)
100 return GetRType<typename T::value_type>(d) +
" vector";
106 const typename boost::disable_if<std::is_same<T,
107 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0,
108 const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0)
110 std::string elemType = GetRType<typename T::elem_type>(d);
111 std::string type =
"matrix";
117 return elemType +
" " + type;
123 const typename boost::enable_if<std::is_same<T,
124 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
126 return "numeric matrix/data.frame with info";
132 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
std::string GetRType< size_t >(util::ParamData &, const typename boost::disable_if< util::IsStdVector< size_t > >::type *, const typename boost::disable_if< data::HasSerialize< size_t > >::type *, const typename boost::disable_if< arma::is_arma_type< size_t > >::type *, const typename boost::disable_if< std::is_same< size_t, std::tuple< data::DatasetInfo, arma::mat > > >::type *)
std::string GetRType< bool >(util::ParamData &, const typename boost::disable_if< util::IsStdVector< bool > >::type *, const typename boost::disable_if< data::HasSerialize< bool > >::type *, const typename boost::disable_if< arma::is_arma_type< bool > >::type *, const typename boost::disable_if< std::is_same< bool, std::tuple< data::DatasetInfo, arma::mat > > >::type *)
std::string GetRType(util::ParamData &, const typename boost::disable_if< util::IsStdVector< T > >::type *=0, const typename boost::disable_if< data::HasSerialize< T > >::type *=0, const typename boost::disable_if< arma::is_arma_type< T > >::type *=0, const typename boost::disable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat > > >::type *=0)
std::string GetRType< double >(util::ParamData &, const typename boost::disable_if< util::IsStdVector< double > >::type *, const typename boost::disable_if< data::HasSerialize< double > >::type *, const typename boost::disable_if< arma::is_arma_type< double > >::type *, const typename boost::disable_if< std::is_same< double, std::tuple< data::DatasetInfo, arma::mat > > >::type *)
std::string GetRType< int >(util::ParamData &, const typename boost::disable_if< util::IsStdVector< int > >::type *, const typename boost::disable_if< data::HasSerialize< int > >::type *, const typename boost::disable_if< arma::is_arma_type< int > >::type *, const typename boost::disable_if< std::is_same< int, std::tuple< data::DatasetInfo, arma::mat > > >::type *)
std::string StripType(std::string cppType)
Given a C++ type name, turn it into something that has no special characters that can simply be print...
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
Metaprogramming structure for vector detection.
This structure holds all of the information about a single parameter, including its value (which is s...
std::string cppType
The true name of the type, as it would be written in C++.