13 #ifndef MLPACK_BINDINGS_GO_GET_TYPE_HPP 14 #define MLPACK_BINDINGS_GO_GET_TYPE_HPP 29 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0)
37 const typename boost::disable_if<util::IsStdVector<int>>::type*,
38 const typename boost::disable_if<data::HasSerialize<int>>::type*,
39 const typename boost::disable_if<arma::is_arma_type<int>>::type*)
47 const typename boost::disable_if<util::IsStdVector<float>>::type*,
48 const typename boost::disable_if<data::HasSerialize<float>>::type*,
49 const typename boost::disable_if<arma::is_arma_type<float>>::type*)
57 const typename boost::disable_if<util::IsStdVector<double>>::type*,
58 const typename boost::disable_if<data::HasSerialize<double>>::type*,
59 const typename boost::disable_if<arma::is_arma_type<double>>::type*)
65 inline std::string GetType<std::string>(
67 const typename boost::disable_if<util::IsStdVector<std::string>>::type*,
68 const typename boost::disable_if<data::HasSerialize<std::string>>::type*,
69 const typename boost::disable_if<arma::is_arma_type<std::string>>::type*)
77 const typename boost::disable_if<util::IsStdVector<bool>>::type*,
78 const typename boost::disable_if<data::HasSerialize<bool>>::type*,
79 const typename boost::disable_if<arma::is_arma_type<bool>>::type*)
89 return "Vec" + GetType<typename T::value_type>(d);
95 const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0)
97 std::string type =
"";
98 if (std::is_same<typename T::elem_type, double>::value)
107 else if (std::is_same<typename T::elem_type, size_t>::value)
123 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
144 *((std::string*) output) =
145 GetType<typename std::remove_pointer<T>::type>(d);
std::string GetType< 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 *)
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string GetType(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)
std::string GetType< 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 *)
std::string GetType< 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 *)
std::string GetType< float >(util::ParamData &, const typename boost::disable_if< util::IsStdVector< float >>::type *, const typename boost::disable_if< data::HasSerialize< float >>::type *, const typename boost::disable_if< arma::is_arma_type< float >>::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 cppType
The true name of the type, as it would be written in C++.