param_data.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_CORE_UTIL_PARAM_DATA_HPP
14 #define MLPACK_CORE_UTIL_PARAM_DATA_HPP
15 
16 #include <mlpack/prereqs.hpp>
17 #include <boost/any.hpp>
18 
22 #define TYPENAME(x) (std::string(typeid(x).name()))
23 
24 namespace mlpack {
25 namespace data {
26 
27 class IncrementPolicy;
28 
29 template<typename PolicyType, typename InputType>
30 class DatasetMapper;
31 
32 using DatasetInfo = DatasetMapper<IncrementPolicy, std::string>;
33 
34 } // namespace data
35 } // namespace mlpack
36 
37 namespace mlpack {
38 namespace util {
39 
52 struct ParamData
53 {
56  std::string name;
58  std::string desc;
61  std::string tname;
63  char alias;
66  bool wasPassed;
71  bool required;
73  bool input;
76  bool loaded;
79  bool persistent;
82  boost::any value;
84  std::string cppType;
85 };
86 
87 } // namespace util
88 } // namespace mlpack
89 
90 #endif
boost::any value
The actual value that is held.
Definition: param_data.hpp:82
strip_type.hpp
Definition: add_to_po.hpp:21
bool wasPassed
True if the option was passed to the program.
Definition: param_data.hpp:66
bool persistent
If this should be preserved across different settings (i.e.
Definition: param_data.hpp:79
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string desc
Description of this parameter, if any.
Definition: param_data.hpp:58
bool input
True if this option is an input option (otherwise, it is output).
Definition: param_data.hpp:73
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
bool loaded
If this is an input parameter that needs extra loading, this indicates whether or not it has been loa...
Definition: param_data.hpp:76
DatasetMapper< data::IncrementPolicy > DatasetInfo
char alias
Alias for this parameter.
Definition: param_data.hpp:63
std::string tname
Type information of this parameter.
Definition: param_data.hpp:61
std::string name
Name of this parameter.
Definition: param_data.hpp:56
bool required
True if this option is required.
Definition: param_data.hpp:71
std::string cppType
The true name of the type, as it would be written in C++.
Definition: param_data.hpp:84
bool noTranspose
True if this is a matrix that should not be transposed.
Definition: param_data.hpp:69