13 #ifndef MLPACK_BINDINGS_GO_GET_TYPE_HPP 14 #define MLPACK_BINDINGS_GO_GET_TYPE_HPP 29 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0)
37 const typename std::enable_if<!util::IsStdVector<int>::value>::type*,
38 const typename std::enable_if<!data::HasSerialize<int>::value>::type*,
39 const typename std::enable_if<!arma::is_arma_type<int>::value>::type*)
47 const typename std::enable_if<!util::IsStdVector<float>::value>::type*,
48 const typename std::enable_if<!data::HasSerialize<float>::value>::type*,
49 const typename std::enable_if<!arma::is_arma_type<float>::value>::type*)
57 const typename std::enable_if<!util::IsStdVector<double>::value>::type*,
58 const typename std::enable_if<!data::HasSerialize<double>::value>::type*,
59 const typename std::enable_if<!arma::is_arma_type<double>::value>::type*)
65 inline std::string GetType<std::string>(
67 const typename std::enable_if<
69 const typename std::enable_if<
71 const typename std::enable_if<
72 !arma::is_arma_type<std::string>::value>::type*)
80 const typename std::enable_if<!util::IsStdVector<bool>::value>::type*,
81 const typename std::enable_if<!data::HasSerialize<bool>::value>::type*,
82 const typename std::enable_if<!arma::is_arma_type<bool>::value>::type*)
92 return "Vec" + GetType<typename T::value_type>(d);
98 const typename std::enable_if<arma::is_arma_type<T>::value>::type* = 0)
100 std::string type =
"";
101 if (std::is_same<typename T::elem_type, double>::value)
110 else if (std::is_same<typename T::elem_type, size_t>::value)
126 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
147 *((std::string*) output) =
148 GetType<typename std::remove_pointer<T>::type>(d);
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
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 *)
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)
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 *)
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< 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 *)
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 *)
std::string cppType
The true name of the type, as it would be written in C++.