get_printable_param.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_TESTS_GET_PRINTABLE_PARAM_HPP
14 #define MLPACK_BINDINGS_TESTS_GET_PRINTABLE_PARAM_HPP
15 
16 #include <mlpack/prereqs.hpp>
19 
20 namespace mlpack {
21 namespace bindings {
22 namespace tests {
23 
27 template<typename T>
28 std::string GetPrintableParam(
29  const util::ParamData& data,
30  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
31  const typename boost::disable_if<util::IsStdVector<T>>::type* = 0,
32  const typename boost::disable_if<data::HasSerialize<T>>::type* = 0,
33  const typename boost::disable_if<std::is_same<T,
34  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
35 
39 template<typename T>
40 std::string GetPrintableParam(
41  const util::ParamData& data,
42  const typename boost::enable_if<util::IsStdVector<T>>::type* = 0);
43 
47 template<typename T>
48 std::string GetPrintableParam(
49  const util::ParamData& data,
50  const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0);
51 
55 template<typename T>
56 std::string GetPrintableParam(
57  const util::ParamData& data,
58  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
59  const typename boost::enable_if<data::HasSerialize<T>>::type* = 0);
60 
64 template<typename T>
65 std::string GetPrintableParam(
66  const util::ParamData& data,
67  const typename boost::enable_if<std::is_same<T,
68  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
69 
75 template<typename T>
77  const void* /* input */,
78  void* output)
79 {
80  *((std::string*) output) =
81  GetPrintableParam<typename std::remove_pointer<T>::type>(data);
82 }
83 
84 } // namespace tests
85 } // namespace bindings
86 } // namespace mlpack
87 
88 // Include implementation.
89 #include "get_printable_param_impl.hpp"
90 
91 #endif
strip_type.hpp
Definition: add_to_po.hpp:21
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
std::string GetPrintableParam(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)
Print an option.