mlpack  master
option.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_CORE_UTIL_OPTION_HPP
14 #define MLPACK_CORE_UTIL_OPTION_HPP
15 
16 #include <string>
17 
18 #include "cli.hpp"
19 
20 namespace mlpack {
21 namespace util {
22 
31 template<typename N>
32 class Option
33 {
34  public:
50  Option(const N defaultValue,
51  const std::string& identifier,
52  const std::string& description,
53  const std::string& alias,
54  const bool required = false,
55  const bool input = true,
56  const bool noTranspose = false)
57  {
58  CLI::Add<N>(defaultValue, identifier, description, alias[0], required,
59  input, noTranspose);
60  }
61 };
62 
72 {
73  public:
83  ProgramDoc(const std::string& programName,
84  const std::string& documentation);
85 
90 };
91 
92 } // namespace util
93 } // namespace mlpack
94 
95 #endif
A static object whose constructor registers a parameter with the CLI class.
Definition: option.hpp:32
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: binarize.hpp:18
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.
Definition: option.hpp:50
std::string programName
The name of the program.
Definition: option.hpp:87
test cpp RESULT_VARIABLE MEX_RESULT_TRASH OUTPUT_VARIABLE MEX_OUTPUT ERROR_VARIABLE MEX_ERROR_TRASH string(REGEX MATCH"Warning: You are using"MEX_WARNING"${MEX_OUTPUT}") if(MEX_WARNING) string(REGEX REPLACE".*using [a-zA-Z]* version \"([0-9.]*)[^\"]*\".*""\\1"OTHER_COMPILER_VERSION"$
Definition: CMakeLists.txt:18
A static object whose constructor registers program documentation with the CLI class.
Definition: option.hpp:71
std::string documentation
Documentation for what the program does.
Definition: option.hpp:89