Document correct verbose default value in generated .R file.

This commit is contained in:
Ryan Curtin
2024-05-14 23:33:06 -04:00
parent 4dba5ba345
commit 559ba29b51
+10 -1
View File
@@ -67,7 +67,16 @@ void PrintDoc(util::ParamData& d,
}
else if (d.cppType == "bool")
{
oss << (MLPACK_ANY_CAST<bool>(d.value) ? "TRUE" : "FALSE");
// If the option is `verbose`, be sure to print the use of the global
// mlpack package option as a default.
if (d.name == "verbose")
{
oss << "getOption(\"mlpack.verbose\", FALSE)";
}
else
{
oss << (MLPACK_ANY_CAST<bool>(d.value) ? "TRUE" : "FALSE");
}
}
oss << "\"";
}