get_printable_param_name.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_CLI_GET_PRINTABLE_PARAM_NAME_HPP
14 #define MLPACK_BINDINGS_CLI_GET_PRINTABLE_PARAM_NAME_HPP
15 
16 #include <mlpack/prereqs.hpp>
18 
19 namespace mlpack {
20 namespace bindings {
21 namespace cli {
22 
26 template<typename T>
27 std::string GetPrintableParamName(
28  util::ParamData& data,
29  const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
30  const typename std::enable_if<!data::HasSerialize<T>::value>::type* = 0,
31  const typename std::enable_if<!std::is_same<T,
32  std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0);
33 
38 template<typename T>
39 std::string GetPrintableParamName(
40  util::ParamData& data,
41  const typename std::enable_if<arma::is_arma_type<T>::value>::type* = 0);
42 
47 template<typename T>
48 std::string GetPrintableParamName(
49  util::ParamData& data,
50  const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
51  const typename std::enable_if<data::HasSerialize<T>::value>::type* = 0);
52 
57 template<typename T>
58 std::string GetPrintableParamName(
59  util::ParamData& data,
60  const typename std::enable_if<std::is_same<T,
61  std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0);
62 
66 template<typename T>
68  util::ParamData& d,
69  const void* /* input */,
70  void* output)
71 {
72  *((std::string*) output) =
73  GetPrintableParamName<typename std::remove_pointer<T>::type>(d);
74 }
75 
76 } // namespace cli
77 } // namespace bindings
78 } // namespace mlpack
79 
80 // Include implementation.
81 #include "get_printable_param_name_impl.hpp"
82 
83 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string GetPrintableParamName(util::ParamData &data, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0)
Get the parameter name for a type that has no special handling.
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52