14 #ifndef MLPACK_BINDINGS_GO_GET_GO_TYPE_HPP 15 #define MLPACK_BINDINGS_GO_GET_GO_TYPE_HPP 30 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
31 const typename boost::disable_if<std::is_same<T,
32 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
40 const typename boost::disable_if<util::IsStdVector<int>>::type*,
41 const typename boost::disable_if<data::HasSerialize<int>>::type*,
42 const typename boost::disable_if<arma::is_arma_type<int>>::type*,
43 const typename boost::disable_if<std::is_same<int,
44 std::tuple<data::DatasetInfo, arma::mat>>>::type*)
51 const util::ParamData& ,
52 const typename boost::disable_if<util::IsStdVector<float>>::type*,
53 const typename boost::disable_if<data::HasSerialize<float>>::type*,
54 const typename boost::disable_if<arma::is_arma_type<float>>::type*,
55 const typename boost::disable_if<std::is_same<float,
56 std::tuple<data::DatasetInfo, arma::mat>>>::type*)
63 const util::ParamData& ,
64 const typename boost::disable_if<util::IsStdVector<double>>::type*,
65 const typename boost::disable_if<data::HasSerialize<double>>::type*,
66 const typename boost::disable_if<arma::is_arma_type<double>>::type*,
67 const typename boost::disable_if<std::is_same<double,
68 std::tuple<data::DatasetInfo, arma::mat>>>::type*)
74 inline std::string GetGoType<std::string>(
75 const util::ParamData& ,
76 const typename boost::disable_if<util::IsStdVector<std::string>>::type*,
77 const typename boost::disable_if<data::HasSerialize<std::string>>::type*,
78 const typename boost::disable_if<arma::is_arma_type<std::string>>::type*,
79 const typename boost::disable_if<std::is_same<std::string,
80 std::tuple<data::DatasetInfo, arma::mat>>>::type*)
87 const util::ParamData& ,
88 const typename boost::disable_if<util::IsStdVector<bool>>::type*,
89 const typename boost::disable_if<data::HasSerialize<bool>>::type*,
90 const typename boost::disable_if<arma::is_arma_type<bool>>::type*,
91 const typename boost::disable_if<std::is_same<bool,
92 std::tuple<data::DatasetInfo, arma::mat>>>::type*)
99 const util::ParamData& d,
102 return "[]" + GetGoType<typename T::value_type>(d);
107 const util::ParamData& ,
108 const typename boost::disable_if<std::is_same<T,
109 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0,
110 const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0)
117 const util::ParamData& ,
118 const typename boost::enable_if<std::is_same<T,
119 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
121 return "matrixWithInfo";
126 const util::ParamData& d,
127 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
130 std::string goStrippedType, strippedType, printedType, defaultsType;
131 StripType(d.
cppType, goStrippedType, strippedType, printedType, defaultsType);
132 return goStrippedType;
std::string GetGoType< float >(const 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 *, const typename boost::disable_if< std::is_same< float, std::tuple< data::DatasetInfo, arma::mat >>>::type *)
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...
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string GetGoType< int >(const 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 *, const typename boost::disable_if< std::is_same< int, std::tuple< data::DatasetInfo, arma::mat >>>::type *)
std::string GetGoType(const 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, const typename boost::disable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type *=0)
std::string GetGoType< double >(const 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 *, const typename boost::disable_if< std::is_same< double, std::tuple< data::DatasetInfo, arma::mat >>>::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 >(const 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 *, const typename boost::disable_if< std::is_same< bool, std::tuple< data::DatasetInfo, arma::mat >>>::type *)
std::string cppType
The true name of the type, as it would be written in C++.