string_type_param.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_CLI_STRING_TYPE_PARAM_HPP
14 #define MLPACK_BINDINGS_CLI_STRING_TYPE_PARAM_HPP
15 
16 #include <mlpack/prereqs.hpp>
19 
20 namespace mlpack {
21 namespace bindings {
22 namespace cli {
23 
27 template<typename T>
28 std::string StringTypeParamImpl(
29  const typename std::enable_if<!util::IsStdVector<T>::value>::type* = 0,
30  const typename std::enable_if<!data::HasSerialize<T>::value>::type* = 0);
31 
35 template<typename T>
36 std::string StringTypeParamImpl(
37  const typename std::enable_if<util::IsStdVector<T>::value>::type* = 0);
38 
42 template<typename T>
43 std::string StringTypeParamImpl(
44  const typename std::enable_if<data::HasSerialize<T>::value>::type* = 0);
45 
50 template<typename T>
52  const void* /* input */,
53  void* output)
54 {
55  std::string* outstr = (std::string*) output;
56  *outstr = StringTypeParamImpl<T>();
57 }
58 
60 template<>
61 inline void StringTypeParam<int>(util::ParamData& /* data */,
62  const void* /* input */,
63  void* output);
64 
66 template<>
67 inline void StringTypeParam<bool>(util::ParamData& /* data */,
68  const void* /* input */,
69  void* output);
70 
72 template<>
73 inline void StringTypeParam<std::string>(util::ParamData& /* data */,
74  const void* /* input */,
75  void* output);
76 
78 template<>
79 inline void StringTypeParam<double>(util::ParamData& /* data */,
80  const void* /* input */,
81  void* output);
82 
84 template<>
85 inline void StringTypeParam<std::tuple<mlpack::data::DatasetInfo, arma::mat>>(
86  util::ParamData& /* data */,
87  const void* /* input */,
88  void* output);
89 
90 } // namespace cli
91 } // namespace bindings
92 } // namespace mlpack
93 
94 // Include implementation.
95 #include "string_type_param_impl.hpp"
96 
97 #endif
static const bool value
void StringTypeParam< bool >(util::ParamData &, const void *, void *output)
Return "bool".
Linear algebra utility functions, generally performed on matrices or vectors.
void StringTypeParam(util::ParamData &, const void *, void *output)
Return a string containing the type of a parameter.
The core includes that mlpack expects; standard C++ includes and Armadillo.
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
void StringTypeParam< double >(util::ParamData &, const void *, void *output)
Return "double".
std::string StringTypeParamImpl(const typename std::enable_if<!util::IsStdVector< T >::value >::type *=0, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0)
Return a string containing the type of the parameter.
void StringTypeParam< int >(util::ParamData &, const void *, void *output)
Return "int".