12 #ifndef MLPACK_BINDINGS_R_PRINT_DOC_HPP 13 #define MLPACK_BINDINGS_R_PRINT_DOC_HPP 40 bool out = *((
bool*) output);
41 std::ostringstream oss;
43 oss <<
"#' \\item{" << d.
name <<
"}{";
45 oss <<
"#' @param " << d.
name <<
" ";
46 oss << d.
desc.substr(0, d.
desc.size() - 1);
50 if (d.
cppType ==
"std::string" ||
55 oss <<
". Default value \"";
58 oss << boost::any_cast<std::string>(d.
value);
62 oss << boost::any_cast<double>(d.
value);
66 oss << boost::any_cast<int>(d.
value);
70 oss << (boost::any_cast<bool>(d.
value) ?
"TRUE" :
"FALSE");
76 oss <<
" (" << GetRType<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.
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...
#define MLPACK_COUT_STREAM
std::string name
Name of this parameter.
bool required
True if this option is required.
std::string HyphenateString(const std::string &str, const std::string &prefix, const bool force=false)
Hyphenate a string or split it onto multiple 80-character lines, with some amount of padding on each ...
std::string cppType
The true name of the type, as it would be written in C++.
void PrintDoc(util::ParamData &d, const void *, void *output)
Print the docstring documentation for a given parameter.