mlpack
get_printable_param_name_impl.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_CLI_GET_PRINTABLE_PARAM_NAME_IMPL_HPP
14 #define MLPACK_BINDINGS_CLI_GET_PRINTABLE_PARAM_NAME_IMPL_HPP
15 
16 #include <mlpack/prereqs.hpp>
18 
19 namespace mlpack {
20 namespace bindings {
21 namespace cli {
22 
26 template<typename T>
29  const typename std::enable_if<!arma::is_arma_type<T>::value>::type*,
30  const typename std::enable_if<!data::HasSerialize<T>::value>::type*,
31  const typename std::enable_if<!std::is_same<T,
32  std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
33 {
34  return "--" + data.name;
35 }
36 
41 template<typename T>
44  const typename std::enable_if<arma::is_arma_type<T>::value>::type*)
45 {
46  return "--" + data.name + "_file";
47 }
48 
53 template<typename T>
56  const typename std::enable_if<!arma::is_arma_type<T>::value>::type*,
57  const typename std::enable_if<data::HasSerialize<T>::value>::type*)
58 {
59  return "--" + data.name + "_file";
60 }
61 
66 template<typename T>
69  const typename std::enable_if<std::is_same<T,
70  std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
71 {
72  return "--" + data.name + "_file";
73 }
74 
75 } // namespace cli
76 } // namespace bindings
77 } // namespace mlpack
78 
79 #endif
Definition: has_serialize.hpp:47
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
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
std::string name
Name of this parameter.
Definition: param_data.hpp:56
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.
Definition: get_printable_param_name_impl.hpp:27