13 #ifndef MLPACK_BINDINGS_GO_PRINT_METHOD_INIT_HPP
14 #define MLPACK_BINDINGS_GO_PRINT_METHOD_INIT_HPP
32 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
34 const typename boost::disable_if<std::is_same<T,
35 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
40 if (std::is_same<T, bool>::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 boost::enable_if<arma::is_arma_type<T>>::type* = 0)
94 if (std::is_same<T, bool>::value)
109 std::cout << prefix << goParamName <<
": " << def <<
","
121 const typename boost::enable_if<std::is_same<T,
122 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
127 if (std::is_same<T, bool>::value)
142 std::cout << prefix << goParamName <<
": " << def <<
","
154 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
160 if (std::is_same<T, bool>::value)
175 std::cout << prefix << goParamName <<
": " << def <<
","
196 PrintMethodInit<typename std::remove_pointer<T>::type>(d,
boost::any value
The actual value that is held.
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 boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< data::HasSerialize< T >>::type *=0, const typename boost::disable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::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++.
src mlpack core util version hpp VERSION_HPP_CONTENTS string(REGEX REPLACE".*#define MLPACK_VERSION_MAJOR ([0-9]+).*""\\1"MLPACK_VERSION_MAJOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* MLPACK_VERSION_MINOR "$