mlpack  3.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
get_printable_type.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_R_GET_PRINTABLE_TYPE_HPP
14 #define MLPACK_BINDINGS_R_GET_PRINTABLE_TYPE_HPP
15 
16 #include <mlpack/prereqs.hpp>
18 
19 namespace mlpack {
20 namespace bindings {
21 namespace r {
22 
23 template<typename T>
25  util::ParamData& /* d */,
26  const typename boost::disable_if<util::IsStdVector<T>>::type* = 0,
27  const typename boost::disable_if<data::HasSerialize<T>>::type* = 0,
28  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
29  const typename boost::disable_if<std::is_same<T,
30  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
31 
32 template<>
34  util::ParamData& /* d */,
35  const typename boost::disable_if<util::IsStdVector<int>>::type*,
36  const typename boost::disable_if<data::HasSerialize<int>>::type*,
37  const typename boost::disable_if<arma::is_arma_type<int>>::type*,
38  const typename boost::disable_if<std::is_same<int,
39  std::tuple<data::DatasetInfo, arma::mat>>>::type*);
40 
41 template<>
43  util::ParamData& /* d */,
44  const typename boost::disable_if<util::IsStdVector<double>>::type*,
45  const typename boost::disable_if<data::HasSerialize<double>>::type*,
46  const typename boost::disable_if<arma::is_arma_type<double>>::type*,
47  const typename boost::disable_if<std::is_same<double,
48  std::tuple<data::DatasetInfo, arma::mat>>>::type*);
49 
50 template<>
51 inline std::string GetPrintableType<std::string>(
52  util::ParamData& /* d */,
53  const typename boost::disable_if<util::IsStdVector<std::string>>::type*,
54  const typename boost::disable_if<data::HasSerialize<std::string>>::type*,
55  const typename boost::disable_if<arma::is_arma_type<std::string>>::type*,
56  const typename boost::disable_if<std::is_same<std::string,
57  std::tuple<data::DatasetInfo, arma::mat>>>::type*);
58 
59 template<>
61  util::ParamData& /* d */,
62  const typename boost::disable_if<util::IsStdVector<size_t>>::type*,
63  const typename boost::disable_if<data::HasSerialize<size_t>>::type*,
64  const typename boost::disable_if<arma::is_arma_type<size_t>>::type*,
65  const typename boost::disable_if<std::is_same<size_t,
66  std::tuple<data::DatasetInfo, arma::mat>>>::type*);
67 
68 template<>
70  util::ParamData& /* d */,
71  const typename boost::disable_if<util::IsStdVector<bool>>::type*,
72  const typename boost::disable_if<data::HasSerialize<bool>>::type*,
73  const typename boost::disable_if<arma::is_arma_type<bool>>::type*,
74  const typename boost::disable_if<std::is_same<bool,
75  std::tuple<data::DatasetInfo, arma::mat>>>::type*);
76 
77 template<typename T>
79  util::ParamData& d,
80  const typename boost::enable_if<util::IsStdVector<T>>::type* = 0,
81  const typename boost::disable_if<std::is_same<T,
82  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
83 
84 template<typename T>
86  util::ParamData& /* d */,
87  const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0,
88  const typename boost::disable_if<std::is_same<T,
89  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
90 
91 template<typename T>
93  util::ParamData& /* d */,
94  const typename boost::enable_if<std::is_same<T,
95  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
96 
97 template<typename T>
99  util::ParamData& d,
100  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
101  const typename boost::enable_if<data::HasSerialize<T>>::type* = 0,
102  const typename boost::disable_if<std::is_same<T,
103  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
104 
105 template<typename T>
107  const void* /* input */,
108  void* output)
109 {
110  *((std::string*) output) =
111  GetPrintableType<typename std::remove_pointer<T>::type>(d);
112 }
113 
114 } // namespace r
115 } // namespace bindings
116 } // namespace mlpack
117 
118 #include "get_printable_type_impl.hpp"
119 
120 #endif
std::string GetPrintableType< int >(util::ParamData &, const typename boost::disable_if< util::IsStdVector< int >>::type *, const typename boost::disable_if< data::HasSerialize< int >>::type *, const typename boost::disable_if< arma::is_arma_type< int >>::type *, const typename boost::disable_if< std::is_same< int, std::tuple< data::DatasetInfo, arma::mat >>>::type *)
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string GetPrintableType(util::ParamData &, 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< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type *=0)
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
std::string GetPrintableType< bool >(util::ParamData &, const typename boost::disable_if< util::IsStdVector< bool >>::type *, const typename boost::disable_if< data::HasSerialize< bool >>::type *, const typename boost::disable_if< arma::is_arma_type< bool >>::type *, const typename boost::disable_if< std::is_same< bool, std::tuple< data::DatasetInfo, arma::mat >>>::type *)
std::string GetPrintableType< double >(util::ParamData &, const typename boost::disable_if< util::IsStdVector< double >>::type *, const typename boost::disable_if< data::HasSerialize< double >>::type *, const typename boost::disable_if< arma::is_arma_type< double >>::type *, const typename boost::disable_if< std::is_same< double, std::tuple< data::DatasetInfo, arma::mat >>>::type *)
src mlpack core util version hpp VERSION_HPP_CONTENTS string(REGEX REPLACE".*#define MLPACK_VERSION_MAJOR ([0-9]+).*""\\1"MLPACK_VERSION_MAJOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* MLPACK_VERSION_MINOR "$
Definition: CMakeLists.txt:79
std::string GetPrintableType< size_t >(util::ParamData &, const typename boost::disable_if< util::IsStdVector< size_t >>::type *, const typename boost::disable_if< data::HasSerialize< size_t >>::type *, const typename boost::disable_if< arma::is_arma_type< size_t >>::type *, const typename boost::disable_if< std::is_same< size_t, std::tuple< data::DatasetInfo, arma::mat >>>::type *)