12 #ifndef MLPACK_BINDINGS_PYTHON_PRINT_DOC_HPP 13 #define MLPACK_BINDINGS_PYTHON_PRINT_DOC_HPP 40 const size_t indent = *((
size_t*) input);
41 std::ostringstream oss;
43 if (d.
name ==
"lambda")
44 oss << d.
name <<
"_ (";
46 oss << d.
name <<
" (";
47 oss << GetPrintableType<typename std::remove_pointer<T>::type>(d) <<
"): " 56 d.
cppType ==
"std::vector<std::string>" ||
57 d.
cppType ==
"std::vector<double>")
59 std::string defaultValue = DefaultParamImpl<T>(d);
60 oss <<
" Default value " << defaultValue <<
".";
void PrintDoc(const util::ParamData &d, const void *input, void *)
Print the docstring documentation for a given parameter.
The core includes that mlpack expects; standard C++ includes and Armadillo.
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 HyphenateString(const std::string &str, int padding)
* Hyphenate a string or split it onto multiple 80-character lines, with some * amount of padding on...
std::string cppType
The true name of the type, as it would be written in C++.