print_output_processing.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_R_PRINT_OUTPUT_PROCESSING_HPP
14 #define MLPACK_BINDINGS_R_PRINT_OUTPUT_PROCESSING_HPP
15 
16 #include <mlpack/prereqs.hpp>
17 #include "get_type.hpp"
18 
19 namespace mlpack {
20 namespace bindings {
21 namespace r {
22 
26 template<typename T>
28  util::ParamData& d,
29  const typename boost::disable_if>::type* = 0,
30  const typename boost::disable_if<data::HasSerialize>::type* = 0,
31  const typename boost::disable_if
32  std::tuple>>::type* = 0)
33 {
41  MLPACK_COUT_STREAM << " \"" << d.name << "\" = IO_GetParam" << GetType(d)
42  << "(\"" << d.name << "\")";
43 }
44 
48 template<typename T>
50  util::ParamData& d,
51  const typename boost::enable_if>::type* = 0,
52  const typename std::enable_if
53  std::tuple>::value>::type* = 0)
54 {
62  MLPACK_COUT_STREAM << " \"" << d.name << "\" = IO_GetParam" << GetType(d)
63  << "(\"" << d.name << "\")";
64 }
65 
69 template<typename T>
71  util::ParamData& d,
72  const typename boost::enable_if
73  std::tuple>>::type* = 0)
74 {
82  MLPACK_COUT_STREAM << " \"" << d.name << "\" = IO_GetParam" << GetType(d)
83  << "(\"" << d.name << "\")";
84 }
85 
89 template<typename T>
91  util::ParamData& d,
92  const typename boost::disable_if>::type* = 0,
93  const typename boost::enable_if<data::HasSerialize>::type* = 0)
94 {
102  MLPACK_COUT_STREAM << " \"" << d.name << "\" = " << d.name;
103 }
104 
110 template<typename T>
112  const void* /*input*/,
113  void* /* output */)
114 {
115  PrintOutputProcessing::type>(d);
116 }
117 
118 } // namespace r
119 } // namespace bindings
120 } // namespace mlpack
121 
122 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
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
#define MLPACK_COUT_STREAM
Definition: prereqs.hpp:45
std::string name
Name of this parameter.
Definition: param_data.hpp:56
void PrintOutputProcessing(util::ParamData &d, const typename boost::disable_if< arma::is_arma_type< 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 output processing for a regular parameter type.