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 (const std::string &identifier, const std::string &description, const std::string &parent=std::string(""))
 Constructs an Option object.
 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.

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:
ignoreTemplate Whether 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.
defaultValue Default value this parameter will be initialized to.
identifier The name of the option (no dashes in front; for --help, we would pass "help").
description A short string describing the option.
parent Full pathname of the parent module that "owns" this option. The default is the root node (an empty string).
required Whether 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:
identifier The name of the option (no dashes in front); for --help we would pass "help".
description A short string describing the option.
parent Full 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:

Generated on 13 Aug 2014 for MLPACK by  doxygen 1.6.1