mlpack  master
print_param.hpp
Go to the documentation of this file.
1 
8 #ifndef MLPACK_CORE_UTIL_PRINT_PARAM_HPP
9 #define MLPACK_CORE_UTIL_PRINT_PARAM_HPP
10 
11 #include <mlpack/prereqs.hpp>
12 #include "param_data.hpp"
13 
14 namespace mlpack {
15 namespace util {
16 
20 template<typename T>
21 void PrintParamImpl(
22  const ParamData& data,
23  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
24  const typename boost::disable_if<IsStdVector<T>>::type* = 0,
25  const typename boost::disable_if<data::HasSerialize<T>>::type* = 0,
26  const typename boost::disable_if<std::is_same<T,
27  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
28 
32 template<typename T>
33 void PrintParamImpl(
34  const ParamData& data,
35  const typename boost::enable_if<IsStdVector<T>>::type* = 0);
36 
40 template<typename T>
41 void PrintParamImpl(
42  const ParamData& data,
43  const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0);
44 
48 template<typename T>
49 void PrintParamImpl(
50  const ParamData& data,
51  const typename boost::enable_if<data::HasSerialize<T>>::type* = 0);
52 
56 template<typename T>
57 void PrintParamImpl(
58  const ParamData& data,
59  const typename boost::enable_if<std::is_same<T,
60  std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0);
61 
65 template<typename T>
66 void PrintParam(const ParamData& data)
67 {
68  PrintParamImpl<T>(data);
69 }
70 
71 } // namespace util
72 } // namespace mlpack
73 
74 // Include implementation.
75 #include "print_param_impl.hpp"
76 
77 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: binarize.hpp:18
The core includes that mlpack expects; standard C++ includes and Armadillo.
void PrintParam(const ParamData &data)
Print an option.
Definition: print_param.hpp:66
void PrintParamImpl(const ParamData &data, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< 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.
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:90