ROption< T > Class Template Reference

The R option class. More...

Public Member Functions

 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. More...

 

Detailed Description


template
class mlpack::bindings::r::ROption< T >

The R option class.

Definition at line 31 of file R_option.hpp.

Constructor & Destructor Documentation

◆ ROption()

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 &  = "" 
)
inline

Construct a ROption object.

When constructed, it will register itself with IO. The testName parameter is not used and added for compatibility reasons.

Parameters
defaultValueDefault value this parameter will be initialized to (for flags, this should be false, for instance).
identifierThe name of the option (no dashes in front; for –help, we would pass "help").
descriptionA short string describing the option.
aliasShort name of the parameter. "" for no alias.
cppNameName of the C++ type of this parameter (i.e. "int").
requiredWhether or not the option is required at runtime.
inputWhether or not the option is an input option.
noTransposeIf the parameter is a matrix and this is true, then the matrix will not be transposed on loading.
*(testName) Is not used and added for compatibility reasons.

Definition at line 52 of file R_option.hpp.

References IO::Add(), ParamData::alias, IO::ClearSettings(), ParamData::cppType, ParamData::desc, IO::functionMap, IO::GetSingleton(), ParamData::input, ParamData::loaded, ParamData::name, ParamData::noTranspose, ParamData::persistent, IO::ProgramName(), ParamData::required, IO::RestoreSettings(), IO::StoreSettings(), ParamData::tname, TYPENAME, ParamData::value, and ParamData::wasPassed.


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-3.4.2/src/mlpack/bindings/R/R_option.hpp