13 #ifndef MLPACK_BINDINGS_R_GET_TYPE_HPP 14 #define MLPACK_BINDINGS_R_GET_TYPE_HPP 29 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
30 const typename std::enable_if<!std::is_same<T,
31 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
39 const typename std::enable_if<!util::IsStdVector<int>::value>::type*,
40 const typename std::enable_if<!data::HasSerialize<int>::value>::type*,
41 const typename std::enable_if<!arma::is_arma_type<int>::value>::type*,
42 const typename std::enable_if<!std::is_same<int,
43 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
51 const typename std::enable_if<!util::IsStdVector<float>::value>::type*,
52 const typename std::enable_if<!data::HasSerialize<float>::value>::type*,
53 const typename std::enable_if<!arma::is_arma_type<float>::value>::type*,
54 const typename std::enable_if<!std::is_same<float,
55 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
63 const typename std::enable_if<!util::IsStdVector<double>::value>::type*,
64 const typename std::enable_if<!data::HasSerialize<double>::value>::type*,
65 const typename std::enable_if<!arma::is_arma_type<double>::value>::type*,
66 const typename std::enable_if<!std::is_same<double,
67 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
73 inline std::string GetType<std::string>(
75 const typename std::enable_if<
77 const typename std::enable_if<
79 const typename std::enable_if<
80 !arma::is_arma_type<std::string>::value>::type*,
81 const typename std::enable_if<!std::is_same<std::string,
82 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
90 const typename std::enable_if<!util::IsStdVector<bool>::value>::type*,
91 const typename std::enable_if<!data::HasSerialize<bool>::value>::type*,
92 const typename std::enable_if<!arma::is_arma_type<bool>::value>::type*,
93 const typename std::enable_if<!std::is_same<bool,
94 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
103 const typename std::enable_if<!std::is_same<T,
104 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
106 return "Vec" + GetType<typename T::value_type>(d);
112 const typename std::enable_if<arma::is_arma_type<T>::value>::type* = 0,
113 const typename std::enable_if<!std::is_same<T,
114 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
116 std::string type =
"";
117 if (std::is_same<typename T::elem_type, double>::value)
126 else if (std::is_same<typename T::elem_type, size_t>::value)
142 const typename std::enable_if<std::is_same<T,
143 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
145 return "MatWithInfo";
151 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
172 *((std::string*) output) =
173 GetType<typename std::remove_pointer<T>::type>(d);
Linear algebra utility functions, generally performed on matrices or vectors.
std::string GetType< float >(util::ParamData &, const typename std::enable_if<!util::IsStdVector< float >::value >::type *, const typename std::enable_if<!data::HasSerialize< float >::value >::type *, const typename std::enable_if<!arma::is_arma_type< float >::value >::type *, const typename std::enable_if<!std::is_same< float, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *)
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string GetType< 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 GetType(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)
This structure holds all of the information about a single parameter, including its value (which is s...
Metaprogramming structure for vector detection.
std::string GetType< 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 cppType
The true name of the type, as it would be written in C++.
std::string GetType< 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 *)