mlpack::util::Option< N >(3) A static object whose constructor registers a parameter with the CLI class.

SYNOPSIS


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 (boolignoreTemplate, NdefaultValue, const std::string &identifier, const std::string &description, const std::string &parent = std::string(''), boolrequired = 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).

Author

Generated automatically by Doxygen for MLPACK from the source code.