12 #ifndef MLPACK_BINDINGS_JULIA_GET_JULIA_TYPE_HPP 13 #define MLPACK_BINDINGS_JULIA_GET_JULIA_TYPE_HPP 25 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
26 const typename std::enable_if<!std::is_same<T,
27 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0,
36 const typename std::enable_if<!util::IsStdVector<bool>::value>::type*,
37 const typename std::enable_if<!arma::is_arma_type<bool>::value>::type*,
38 const typename std::enable_if<!std::is_same<bool,
39 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*,
40 const typename std::enable_if<!data::HasSerialize<bool>::value>::type*)
48 const typename std::enable_if<!util::IsStdVector<int>::value>::type*,
49 const typename std::enable_if<!arma::is_arma_type<int>::value>::type*,
50 const typename std::enable_if<!std::is_same<int,
51 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*,
52 const typename std::enable_if<!data::HasSerialize<int>::value>::type*)
60 const typename std::enable_if<!util::IsStdVector<size_t>::value>::type*,
61 const typename std::enable_if<!arma::is_arma_type<size_t>::value>::type*,
62 const typename std::enable_if<!std::is_same<size_t,
63 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*,
64 const typename std::enable_if<!data::HasSerialize<size_t>::value>::type*)
72 const typename std::enable_if<!util::IsStdVector<double>::value>::type*,
73 const typename std::enable_if<!arma::is_arma_type<double>::value>::type*,
74 const typename std::enable_if<!std::is_same<double,
75 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*,
76 const typename std::enable_if<!data::HasSerialize<double>::value>::type*)
83 inline std::string GetJuliaType<std::string>(
85 const typename std::enable_if<
87 const typename std::enable_if<
88 !arma::is_arma_type<std::string>::value>::type*,
89 const typename std::enable_if<!std::is_same<std::string,
90 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*,
91 const typename std::enable_if<
101 const typename std::enable_if<!std::is_same<T,
102 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0,
103 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0)
105 return "Vector{" + GetJuliaType<typename T::value_type>(d) +
"}";
112 const typename std::enable_if<!std::is_same<T,
113 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0,
114 const typename std::enable_if<arma::is_arma_type<T>::value>::type* = 0)
118 if (std::is_same<typename T::elem_type, size_t>::value)
119 return std::string(
"Array{Int, ") + (T::is_col || T::is_row ?
"1" :
"2")
122 return "Array{" + GetJuliaType<typename T::elem_type>(d) +
", " 123 + (T::is_col || T::is_row ?
"1" :
"2") +
"}";
129 const typename std::enable_if<std::is_same<T,
130 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
132 return "Tuple{Array{Bool, 1}, Array{Float64, 2}}";
140 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
146 std::ostringstream oss;
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string GetJuliaType< bool >(util::ParamData &, const typename std::enable_if<!util::IsStdVector< 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 *, const typename std::enable_if<!data::HasSerialize< bool >::value >::type *)
std::string GetJuliaType< size_t >(util::ParamData &, const typename std::enable_if<!util::IsStdVector< 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 *, const typename std::enable_if<!data::HasSerialize< size_t >::value >::type *)
std::string GetJuliaType< int >(util::ParamData &, const typename std::enable_if<!util::IsStdVector< 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 *, const typename std::enable_if<!data::HasSerialize< int >::value >::type *)
This structure holds all of the information about a single parameter, including its value (which is s...
std::string GetJuliaType< double >(util::ParamData &, const typename std::enable_if<!util::IsStdVector< 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 *, const typename std::enable_if<!data::HasSerialize< double >::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 cppType
The true name of the type, as it would be written in C++.
std::string GetJuliaType(util::ParamData &, const typename std::enable_if<!util::IsStdVector< 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, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0)