193 std::tuple
>>::type* = 0) 195 const std::string prefix(indent,
' ');
199 std::string paramName = d.
name;
200 std::string goParamName = paramName;
201 if (!paramName.empty())
215 std::cout << prefix <<
"// Detect if the parameter was passed; set if so." 219 std::cout << prefix <<
"if param." << goParamName
220 <<
" != nil {" << std::endl;
223 std::cout << prefix << prefix <<
"gonumToArmaMatWithInfo" 224 <<
"(\"" << d.
name <<
"\", param." << goParamName
228 std::cout << prefix << prefix <<
"setPassed(\"" << d.
name <<
"\")" 230 std::cout << prefix <<
"}" << std::endl;
236 std::cout << prefix <<
"gonumToArmaMatWithInfo" 237 <<
"(\"" << d.
name <<
"\", " << goParamName
241 std::cout << prefix <<
"setPassed(\"" << d.
name <<
"\")" << std::endl;
243 std::cout << std::endl;
253 const typename boost::disable_if
>::type* = 0, 257 std::string goStrippedType, strippedType, printedType, defaultsType;
258 StripType(d.
cppType, goStrippedType, strippedType, printedType, defaultsType);
260 const std::string prefix(indent,
' ');
264 std::string paramName = d.
name;
265 std::string goParamName = paramName;
266 if (!paramName.empty())
280 std::cout << prefix <<
"// Detect if the parameter was passed; set if so." 284 std::cout << prefix <<
"if param." << goParamName <<
" != nil {" 287 std::cout << prefix << prefix <<
"set" << strippedType <<
"(\"" 288 << d.
name <<
"\", param." << goParamName <<
")" << std::endl;
291 std::cout << prefix << prefix <<
"setPassed(\"" << d.
name <<
"\")" 293 std::cout << prefix <<
"}" << std::endl;
299 std::cout << prefix <<
"set" << strippedType <<
"(\"" << d.
name 300 <<
"\", " << goParamName <<
")" << std::endl;
303 std::cout << prefix <<
"setPassed(\"" << d.
name <<
"\")" << std::endl;
305 std::cout << std::endl;
324 PrintInputProcessing
::type>(d, boost::any value
The actual value that is held.
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.
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.
std::string name
Name of this parameter.
bool required
True if this option is required.
void PrintInputProcessing(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 input processing for a standard option type.
std::string cppType
The true name of the type, as it would be written in C++.
if(NOT BUILD_GO_SHLIB) macro(add_go_binding name) endmacro() return() endif() endmacro() macro(post_go_setup) if(BUILD_GO_BINDINGS) file(APPEND "$