14 #ifndef MLPACK_BINDINGS_GO_GET_GO_TYPE_HPP 15 #define MLPACK_BINDINGS_GO_GET_GO_TYPE_HPP 30 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
31 const typename std::enable_if<!std::is_same<T,
32 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
40 const typename std::enable_if<!util::IsStdVector<int>::value>::type*,
41 const typename std::enable_if<!data::HasSerialize<int>::value>::type*,
42 const typename std::enable_if<!arma::is_arma_type<int>::value>::type*,
43 const typename std::enable_if<!std::is_same<int,
44 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
52 const typename std::enable_if<!util::IsStdVector<float>::value>::type*,
53 const typename std::enable_if<!data::HasSerialize<float>::value>::type*,
54 const typename std::enable_if<!arma::is_arma_type<float>::value>::type*,
55 const typename std::enable_if<!std::is_same<float,
56 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
64 const typename std::enable_if<!util::IsStdVector<double>::value>::type*,
65 const typename std::enable_if<!data::HasSerialize<double>::value>::type*,
66 const typename std::enable_if<!arma::is_arma_type<double>::value>::type*,
67 const typename std::enable_if<!std::is_same<double,
68 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
74 inline std::string GetGoType<std::string>(
76 const typename std::enable_if<
78 const typename std::enable_if<
80 const typename std::enable_if<
81 !arma::is_arma_type<std::string>::value>::type*,
82 const typename std::enable_if<!std::is_same<std::string,
83 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
91 const typename std::enable_if<!util::IsStdVector<bool>::value>::type*,
92 const typename std::enable_if<!data::HasSerialize<bool>::value>::type*,
93 const typename std::enable_if<!arma::is_arma_type<bool>::value>::type*,
94 const typename std::enable_if<!std::is_same<bool,
95 std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
105 return "[]" + GetGoType<typename T::value_type>(d);
111 const typename std::enable_if<!std::is_same<T,
112 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0,
113 const typename std::enable_if<arma::is_arma_type<T>::value>::type* = 0)
121 const typename std::enable_if<std::is_same<T,
122 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
124 return "matrixWithInfo";
130 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
133 std::string goStrippedType, strippedType, printedType, defaultsType;
134 StripType(d.
cppType, goStrippedType, strippedType, printedType, defaultsType);
135 return goStrippedType;
std::string GetGoType(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)
void StripType(const std::string &inputType, std::string &goStrippedType, std::string &strippedType, std::string &printedType, std::string &defaultsType)
Given an input type like, e.g., "LogisticRegression<>", return four types that can be used in Go code...
Linear algebra utility functions, generally performed on matrices or vectors.
std::string GetGoType< 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 GetGoType< 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 *)
This structure holds all of the information about a single parameter, including its value (which is s...
Metaprogramming structure for vector detection.
std::string GetGoType< 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 GetGoType< 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 *)