12 #ifndef MLPACK_BINDINGS_R_GET_R_TYPE_HPP 13 #define MLPACK_BINDINGS_R_GET_R_TYPE_HPP 28 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
29 const typename std::enable_if<!std::is_same<T,
30 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
38 const typename std::enable_if<!util::IsStdVector<bool>::value>::type*,
39 const typename std::enable_if<!data::HasSerialize<bool>::value>::type*,
40 const typename std::enable_if<!arma::is_arma_type<bool>::value>::type*,
41 const typename std::enable_if<!std::is_same<bool,
42 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
50 const typename std::enable_if<!util::IsStdVector<int>::value>::type*,
51 const typename std::enable_if<!data::HasSerialize<int>::value>::type*,
52 const typename std::enable_if<!arma::is_arma_type<int>::value>::type*,
53 const typename std::enable_if<!std::is_same<int,
54 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
62 const typename std::enable_if<!util::IsStdVector<size_t>::value>::type*,
63 const typename std::enable_if<!data::HasSerialize<size_t>::value>::type*,
64 const typename std::enable_if<!arma::is_arma_type<size_t>::value>::type*,
65 const typename std::enable_if<!std::is_same<size_t,
66 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
74 const typename std::enable_if<!util::IsStdVector<double>::value>::type*,
75 const typename std::enable_if<!data::HasSerialize<double>::value>::type*,
76 const typename std::enable_if<!arma::is_arma_type<double>::value>::type*,
77 const typename std::enable_if<!std::is_same<double,
78 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
84 inline std::string GetRType<std::string>(
86 const typename std::enable_if<
88 const typename std::enable_if<
90 const typename std::enable_if<
91 !arma::is_arma_type<std::string>::value>::type*,
92 const typename std::enable_if<
93 !std::is_same<std::string,
94 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
104 return GetRType<typename T::value_type>(d) +
" vector";
110 const typename std::enable_if<!std::is_same<T,
111 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0,
112 const typename std::enable_if<arma::is_arma_type<T>::value>::type* = 0)
114 std::string elemType = GetRType<typename T::elem_type>(d);
115 std::string type =
"matrix";
121 return elemType +
" " + type;
127 const typename std::enable_if<std::is_same<T,
128 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
130 return "numeric matrix/data.frame with info";
136 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
This structure holds all of the information about a single parameter, including its value (which is s...
std::string GetRType< bool >(util::ParamData &, const typename std::enable_if<!util::IsStdVector< bool >::value >::type *, const typename std::enable_if<!data::HasSerialize< bool >::value >::type *, const typename std::enable_if<!arma::is_arma_type< bool >::value >::type *, const typename std::enable_if<!std::is_same< bool, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *)
std::string GetRType< int >(util::ParamData &, const typename std::enable_if<!util::IsStdVector< int >::value >::type *, const typename std::enable_if<!data::HasSerialize< int >::value >::type *, const typename std::enable_if<!arma::is_arma_type< int >::value >::type *, const typename std::enable_if<!std::is_same< int, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *)
Metaprogramming structure for vector detection.
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...
std::string GetRType< double >(util::ParamData &, const typename std::enable_if<!util::IsStdVector< double >::value >::type *, const typename std::enable_if<!data::HasSerialize< double >::value >::type *, const typename std::enable_if<!arma::is_arma_type< double >::value >::type *, const typename std::enable_if<!std::is_same< double, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *)
std::string cppType
The true name of the type, as it would be written in C++.
std::string GetRType< size_t >(util::ParamData &, const typename std::enable_if<!util::IsStdVector< size_t >::value >::type *, const typename std::enable_if<!data::HasSerialize< size_t >::value >::type *, const typename std::enable_if<!arma::is_arma_type< size_t >::value >::type *, const typename std::enable_if<!std::is_same< size_t, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *)
std::string GetRType(util::ParamData &, const typename std::enable_if<!util::IsStdVector< T >::value >::type *=0, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0)