13 #ifndef MLPACK_BINDINGS_PYTHON_GET_CYTHON_TYPE_HPP 14 #define MLPACK_BINDINGS_PYTHON_GET_CYTHON_TYPE_HPP 28 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0)
36 const typename std::enable_if<!util::IsStdVector<int>::value>::type*,
37 const typename std::enable_if<!data::HasSerialize<int>::value>::type*,
38 const typename std::enable_if<!arma::is_arma_type<int>::value>::type*)
46 const typename std::enable_if<!util::IsStdVector<double>::value>::type*,
47 const typename std::enable_if<!data::HasSerialize<double>::value>::type*,
48 const typename std::enable_if<!arma::is_arma_type<double>::value>::type*)
54 inline std::string GetCythonType<std::string>(
56 const typename std::enable_if<
58 const typename std::enable_if<
60 const typename std::enable_if<
61 !arma::is_arma_type<std::string>::value>::type*)
69 const typename std::enable_if<!util::IsStdVector<size_t>::value>::type*,
70 const typename std::enable_if<!data::HasSerialize<size_t>::value>::type*,
71 const typename std::enable_if<!arma::is_arma_type<size_t>::value>::type*)
79 const typename std::enable_if<!util::IsStdVector<bool>::value>::type*,
80 const typename std::enable_if<!data::HasSerialize<bool>::value>::type*,
81 const typename std::enable_if<!arma::is_arma_type<bool>::value>::type*)
91 return "vector[" + GetCythonType<typename T::value_type>(d) +
"]";
97 const typename std::enable_if<arma::is_arma_type<T>::value>::type* = 0)
99 std::string type =
"Mat";
105 return "arma." + type +
"[" + GetCythonType<typename T::elem_type>(d) +
"]";
111 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.
std::string GetCythonType< 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 *)
This structure holds all of the information about a single parameter, including its value (which is s...
Metaprogramming structure for vector detection.
std::string GetCythonType(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 GetCythonType< 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 GetCythonType< 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 cppType
The true name of the type, as it would be written in C++.
std::string GetCythonType< 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 *)