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)
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*)
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*)
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*)
74inline std::string GetGoType<std::string>(
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*)
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*)
102 return "[]" + GetGoType<typename T::value_type>(d);
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)
118 const typename boost::enable_if<std::is_same<T,
119 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
121 return "matrixWithInfo";
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< 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 *, const typename boost::disable_if< std::is_same< double, std::tuple< data::DatasetInfo, arma::mat > > >::type *)
std::string GetGoType< 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 *, 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...
std::string GetGoType(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< 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 *, const typename boost::disable_if< std::is_same< bool, std::tuple< data::DatasetInfo, arma::mat > > >::type *)
std::string GetGoType< 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 *, const typename boost::disable_if< std::is_same< int, std::tuple< data::DatasetInfo, arma::mat > > >::type *)
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
Metaprogramming structure for vector detection.
This structure holds all of the information about a single parameter, including its value (which is s...
std::string cppType
The true name of the type, as it would be written in C++.