get_printable_param_value.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_CLI_GET_PRINTABLE_PARAM_VALUE_HPP
14 #define MLPACK_BINDINGS_CLI_GET_PRINTABLE_PARAM_VALUE_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 GetPrintableParamValue(
28  const util::ParamData& data,
29  const std::string& value,
30  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
31  const typename boost::disable_if<data::HasSerialize<T>>::type* = 0,
32  const typename boost::disable_if<std::is_same<T,
33  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
34 
39 template<typename T>
40 std::string GetPrintableParamValue(
41  const util::ParamData& data,
42  const std::string& value,
43  const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0);
44 
49 template<typename T>
50 std::string GetPrintableParamValue(
51  const util::ParamData& data,
52  const std::string& value,
53  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
54  const typename boost::enable_if<data::HasSerialize<T>>::type* = 0);
55 
60 template<typename T>
61 std::string GetPrintableParamValue(
62  const util::ParamData& data,
63  const std::string& value,
64  const typename boost::enable_if<std::is_same<T,
65  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
66 
70 template<typename T>
72  const util::ParamData& d,
73  const void* input,
74  void* output)
75 {
76  *((std::string*) output) =
77  GetPrintableParamValue<typename std::remove_pointer<T>::type>(d,
78  *((std::string*) input));
79 }
80 
81 } // namespace cli
82 } // namespace bindings
83 } // namespace mlpack
84 
85 // Include implementation.
86 #include "get_printable_param_value_impl.hpp"
87 
88 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: add_to_po.hpp:21
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string GetPrintableParamValue(const util::ParamData &data, const std::string &value, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< data::HasSerialize< T >>::type *=0, const typename boost::disable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::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