mlpack
get_printable_param_value_impl.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_BINDINGS_CLI_GET_PRINTABLE_PARAM_VALUE_IMPL_HPP
15 #define MLPACK_BINDINGS_CLI_GET_PRINTABLE_PARAM_VALUE_IMPL_HPP
16 
17 #include <mlpack/prereqs.hpp>
19 
20 namespace mlpack {
21 namespace bindings {
22 namespace cli {
23 
27 template<typename T>
29  util::ParamData& /* data */,
30  const std::string& input,
31  const typename std::enable_if<!arma::is_arma_type<T>::value>::type*,
32  const typename std::enable_if<!data::HasSerialize<T>::value>::type*,
33  const typename std::enable_if<!std::is_same<T,
34  std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
35 {
36  return input;
37 }
38 
43 template<typename T>
45  util::ParamData& /* data */,
46  const std::string& input,
47  const typename std::enable_if<arma::is_arma_type<T>::value>::type*)
48 {
49  return input + ".csv";
50 }
51 
56 template<typename T>
58  util::ParamData& /* data */,
59  const std::string& input,
60  const typename std::enable_if<!arma::is_arma_type<T>::value>::type*,
61  const typename std::enable_if<data::HasSerialize<T>::value>::type*)
62 {
63  return input + ".bin";
64 }
65 
70 template<typename T>
72  util::ParamData& /* data */,
73  const std::string& input,
74  const typename std::enable_if<std::is_same<T,
75  std::tuple<data::DatasetInfo, arma::mat>>::value>::type*)
76 {
77  return input + ".arff";
78 }
79 
80 } // namespace cli
81 } // namespace bindings
82 } // namespace mlpack
83 
84 #endif
std::string GetPrintableParamValue(util::ParamData &data, const std::string &value, 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_value_impl.hpp:28
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