mlpack  master
Public Member Functions | List of all members
mlpack::util::Option< N > Class Template Reference

A static object whose constructor registers a parameter with the CLI class. More...

Public Member Functions

 Option (const N defaultValue, const std::string &identifier, const std::string &description, const std::string &alias, const bool required=false, const bool input=true, const bool noTranspose=false)
 Construct an Option object. More...
 

Detailed Description

template<typename N>
class mlpack::util::Option< N >

A static object whose constructor registers a parameter with the CLI class.

This should not be used outside of CLI itself, and you should use the PARAM_FLAG(), PARAM_DOUBLE(), PARAM_INT(), PARAM_STRING(), or other similar macros to declare these objects instead of declaring them directly.

See also
core/io/cli.hpp, mlpack::CLI

Definition at line 32 of file option.hpp.

Constructor & Destructor Documentation

template<typename N >
mlpack::util::Option< N >::Option ( const N  defaultValue,
const std::string identifier,
const std::string description,
const std::string alias,
const bool  required = false,
const bool  input = true,
const bool  noTranspose = false 
)
inline

Construct an Option object.

When constructed, it will register itself with CLI.

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

Definition at line 50 of file option.hpp.


The documentation for this class was generated from the following file: