12#ifndef MLPACK_BINDINGS_R_R_OPTION_HPP
13#define MLPACK_BINDINGS_R_R_OPTION_HPP
53 const std::string& identifier,
54 const std::string& description,
55 const std::string& alias,
56 const std::string& cppName,
57 const bool required =
false,
58 const bool input =
true,
59 const bool noTranspose =
false,
60 const std::string& =
"")
64 data.
desc = description;
65 data.
name = identifier;
67 data.
alias = alias[0];
75 if (identifier ==
"verbose")
82 data.
value = boost::any(defaultValue);
85 if (identifier !=
"verbose")
94 &GetPrintableParam<T>;
101 &PrintOutputProcessing<T>;
103 &PrintInputProcessing<T>;
105 &PrintSerializeUtil<T>;
111 if (identifier !=
"verbose")
static std::string ProgramName()
Get the program name as set by the BINDING_NAME() macro.
FunctionMapType functionMap
static IO & GetSingleton()
Retrieve the singleton.
static void ClearSettings()
Clear all of the settings, removing all parameters and function mappings.
static void RestoreSettings(const std::string &name, const bool fatal=true)
Restore all of the parameters and function mappings of the given name, if they exist.
static void StoreSettings(const std::string &name)
Take all parameters and function mappings and store them, under the given name.
static void Add(util::ParamData &&d)
Adds a parameter to the hierarchy; use the PARAM_*() macros instead of this (i.e.
ROption(const T defaultValue, const std::string &identifier, const std::string &description, const std::string &alias, const std::string &cppName, const bool required=false, const bool input=true, const bool noTranspose=false, const std::string &="")
Construct a ROption object.
Linear algebra utility functions, generally performed on matrices or vectors.
#define TYPENAME(x)
The TYPENAME macro is used internally to convert a type into a string.
This structure holds all of the information about a single parameter, including its value (which is s...
bool noTranspose
True if this is a matrix that should not be transposed.
char alias
Alias for this parameter.
std::string desc
Description of this parameter, if any.
bool wasPassed
True if the option was passed to the program.
boost::any value
The actual value that is held.
std::string tname
Type information of this parameter.
bool required
True if this option is required.
bool input
True if this option is an input option (otherwise, it is output).
bool loaded
If this is an input parameter that needs extra loading, this indicates whether or not it has been loa...
std::string name
Name of this parameter.
std::string cppType
The true name of the type, as it would be written in C++.
bool persistent
If this should be preserved across different settings (i.e.