get_printable_type.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_CLI_GET_PRINTABLE_TYPE_HPP
14 #define MLPACK_BINDINGS_CLI_GET_PRINTABLE_TYPE_HPP
15 
16 namespace mlpack {
17 namespace bindings {
18 namespace cli {
19 
23 template<typename T>
24 std::string GetPrintableType(
25  const util::ParamData& data,
26  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
27  const typename boost::disable_if<util::IsStdVector<T>>::type* = 0,
28  const typename boost::disable_if<data::HasSerialize<T>>::type* = 0,
29  const typename boost::disable_if<std::is_same<T,
30  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
31 
35 template<typename T>
36 std::string GetPrintableType(
37  const util::ParamData& data,
38  const typename std::enable_if<util::IsStdVector<T>::value>::type* = 0);
39 
43 template<typename T>
44 std::string GetPrintableType(
45  const util::ParamData& data,
46  const typename std::enable_if<arma::is_arma_type<T>::value>::type* = 0);
47 
51 template<typename T>
52 std::string GetPrintableType(
53  const util::ParamData& data,
54  const typename std::enable_if<std::is_same<T,
55  std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0);
56 
60 template<typename T>
61 std::string GetPrintableType(
62  const util::ParamData& data,
63  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
64  const typename boost::enable_if<data::HasSerialize<T>>::type* = 0);
65 
69 template<typename T>
71  const void* /* input */,
72  void* output)
73 {
74  *((std::string*) output) =
75  GetPrintableType<typename std::remove_pointer<T>::type>(data);
76 }
77 
78 } // namespace cli
79 } // namespace bindings
80 } // namespace mlpack
81 
82 #include "get_printable_type_impl.hpp"
83 
84 #endif
static const bool value
std::string GetPrintableType(const util::ParamData &data, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< util::IsStdVector< 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)
Return a string representing the command-line type of an option.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: add_to_po.hpp:21
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52