13 #ifndef MLPACK_BINDINGS_GO_PRINT_METHOD_INIT_HPP 14 #define MLPACK_BINDINGS_GO_PRINT_METHOD_INIT_HPP 32 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
34 const typename std::enable_if<!std::is_same<T,
35 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
37 const std::string prefix(indent,
' ');
39 std::string def =
"nil";
40 if (std::is_same<T, bool>::value)
45 std::string name = d.
name;
46 std::string goParamName = name;
57 std::string value = boost::any_cast<std::string>(d.
value);
58 std::cout << prefix << goParamName <<
": \"" 59 << value <<
"\"," << std::endl;
63 double value = boost::any_cast<
double>(d.
value);
64 std::cout << prefix << goParamName <<
": " << value <<
"," << std::endl;
68 int value = boost::any_cast<
int>(d.
value);
69 std::cout << prefix << goParamName <<
": " << value <<
"," << std::endl;
73 bool value = boost::any_cast<
bool>(d.
value);
75 std::cout << prefix << goParamName <<
": false," << std::endl;
77 std::cout << prefix << goParamName <<
": true," << std::endl;
89 const typename std::enable_if<arma::is_arma_type<T>::value>::type* = 0)
91 const std::string prefix(indent,
' ');
93 std::string def =
"nil";
94 if (std::is_same<T, bool>::value)
99 std::string name = d.
name;
100 std::string goParamName = name;
109 std::cout << prefix << goParamName <<
": " << def <<
"," 121 const typename std::enable_if<std::is_same<T,
122 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
124 const std::string prefix(indent,
' ');
126 std::string def =
"nil";
127 if (std::is_same<T, bool>::value)
132 std::string name = d.
name;
133 std::string goParamName = name;
142 std::cout << prefix << goParamName <<
": " << def <<
"," 154 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
157 const std::string prefix(indent,
' ');
159 std::string def =
"nil";
160 if (std::is_same<T, bool>::value)
165 std::string name = d.
name;
166 std::string goParamName = name;
175 std::cout << prefix << goParamName <<
": " << def <<
"," 196 PrintMethodInit<typename std::remove_pointer<T>::type>(d,
boost::any value
The actual value that is held.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
This structure holds all of the information about a single parameter, including its value (which is s...
std::string CamelCase(std::string s, bool lower)
Given an snake_case like, e.g., "logistic_regression", return CamelCase(e.g.
void PrintMethodInit(util::ParamData &d, const size_t indent, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0)
Print parameter with it's default value for a standard option type.
std::string name
Name of this parameter.
bool required
True if this option is required.
std::string cppType
The true name of the type, as it would be written in C++.