mlpack 3.4.2
get_printable_type.hpp
Go to the documentation of this file.
1
13#ifndef MLPACK_BINDINGS_GO_GET_PRINTABLE_TYPE_HPP
14#define MLPACK_BINDINGS_GO_GET_PRINTABLE_TYPE_HPP
15
16#include <mlpack/prereqs.hpp>
18
19namespace mlpack {
20namespace bindings {
21namespace go {
22
23template<typename T>
24inline std::string GetPrintableType(
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
32template<>
33inline std::string GetPrintableType<int>(
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
41template<>
42inline std::string GetPrintableType<double>(
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
50template<>
51inline 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
59template<>
60inline std::string GetPrintableType<bool>(
61 util::ParamData& /* d */,
62 const typename boost::disable_if<util::IsStdVector<bool>>::type*,
63 const typename boost::disable_if<data::HasSerialize<bool>>::type*,
64 const typename boost::disable_if<arma::is_arma_type<bool>>::type*,
65 const typename boost::disable_if<std::is_same<bool,
66 std::tuple<data::DatasetInfo, arma::mat>>>::type*);
67
68template<typename T>
69inline std::string GetPrintableType(
71 const typename boost::enable_if<util::IsStdVector<T>>::type* = 0,
72 const typename boost::disable_if<std::is_same<T,
73 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
74
75template<typename T>
76inline std::string GetPrintableType(
77 util::ParamData& /* d */,
78 const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0,
79 const typename boost::disable_if<std::is_same<T,
80 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
81
82template<typename T>
83inline std::string GetPrintableType(
84 util::ParamData& /* d */,
85 const typename boost::enable_if<std::is_same<T,
86 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
87
88template<typename T>
89inline std::string GetPrintableType(
91 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
92 const typename boost::enable_if<data::HasSerialize<T>>::type* = 0,
93 const typename boost::disable_if<std::is_same<T,
94 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
95
96template<typename T>
98 const void* /* input */,
99 void* output)
100{
101 *((std::string*) output) =
102 GetPrintableType<typename std::remove_pointer<T>::type>(d);
103}
104
105} // namespace go
106} // namespace bindings
107} // namespace mlpack
108
109#include "get_printable_type_impl.hpp"
110
111#endif
go
Definition: CMakeLists.txt:6
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(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)
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 *)
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 *)
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.
Metaprogramming structure for vector detection.
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:53