MLPACK  1.0.4
Public Member Functions
mlpack::util::Option< N > Class Template Reference

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

List of all members.

Public Member Functions

 Option (bool ignoreTemplate, N defaultValue, const std::string &identifier, const std::string &description, const std::string &parent=std::string(""), bool required=false)
 Construct an Option object.
 Option (const std::string &identifier, const std::string &description, const std::string &parent=std::string(""))
 Constructs an Option object.

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 42 of file option.hpp.


Constructor & Destructor Documentation

template<typename N >
mlpack::util::Option< N >::Option ( bool  ignoreTemplate,
defaultValue,
const std::string &  identifier,
const std::string &  description,
const std::string &  parent = std::string(""),
bool  required = false 
)

Construct an Option object.

When constructed, it will register itself with CLI.

Parameters:
ignoreTemplateWhether or not the template type matters for this option. Essentially differs options with no value (flags) from those that do, and thus require a type.
defaultValueDefault value this parameter will be initialized to.
identifierThe name of the option (no dashes in front; for --help, we would pass "help").
descriptionA short string describing the option.
parentFull pathname of the parent module that "owns" this option. The default is the root node (an empty string).
requiredWhether or not the option is required at runtime.
template<typename N >
mlpack::util::Option< N >::Option ( const std::string &  identifier,
const std::string &  description,
const std::string &  parent = std::string("") 
)

Constructs an Option object.

When constructed, it will register a flag with CLI.

Parameters:
identifierThe name of the option (no dashes in front); for --help we would pass "help".
descriptionA short string describing the option.
parentFull pathname of the parent module that "owns" this option. The default is the root node (an empty string).

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