12 #ifndef MLPACK_BINDINGS_JULIA_PRINT_DOC_HPP 13 #define MLPACK_BINDINGS_JULIA_PRINT_DOC_HPP 23 const std::string juliaName = (d.
name ==
"type") ?
"type_" : d.
name;
25 std::ostringstream& oss = *((std::ostringstream*) output);
27 oss <<
"`" << juliaName <<
"::" << GetJuliaType<T>(d) <<
"`: " << d.
desc;
33 if (d.
cppType ==
"std::string" ||
38 oss <<
" Default value `";
41 oss << boost::any_cast<std::string>(d.
value);
45 oss << boost::any_cast<double>(d.
value);
49 oss << boost::any_cast<int>(d.
value);
53 oss << (boost::any_cast<bool>(d.
value) ?
"true" :
"false");
55 oss <<
"`." << std::endl;
void PrintDoc(const util::ParamData &d, const void *, void *output)
boost::any value
The actual value that is held.
Linear algebra utility functions, generally performed on matrices or vectors.
if(NOT BUILD_GO_SHLIB) macro(add_go_binding name) endmacro() return() endif() endmacro() if(NOT BUILD_GO_BINDINGS) not_found_return("Not building Go bindings.") endif() if(BUILD_GO_BINDINGS) if(FORCE_BUILD_GO_BINDINGS) find_package(Go 1.11.0) find_package(Gonum) if(NOT GO_FOUND OR NOT GONUM_FOUND) unset(BUILD_GO_BINDINGS CACHE) message(FATAL_ERROR "Go or Gonum not found
std::string desc
Description of this parameter, if any.
This structure holds all of the information about a single parameter, including its value (which is s...
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++.