mlpack 3.4.2
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
19namespace mlpack {
20namespace bindings {
21namespace r {
22
26template<typename T>
29 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
30 const typename boost::disable_if<data::HasSerialize<T>>::type* = 0,
31 const typename boost::disable_if<std::is_same<T,
32 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
33{
41 MLPACK_COUT_STREAM << " \"" << d.name << "\" = IO_GetParam" << GetType<T>(d)
42 << "(\"" << d.name << "\")";
43}
44
48template<typename T>
51 const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0,
52 const typename std::enable_if<!std::is_same<T,
53 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
54{
62 MLPACK_COUT_STREAM << " \"" << d.name << "\" = IO_GetParam" << GetType<T>(d)
63 << "(\"" << d.name << "\")";
64}
65
69template<typename T>
72 const typename boost::enable_if<std::is_same<T,
73 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
74{
82 MLPACK_COUT_STREAM << " \"" << d.name << "\" = IO_GetParam" << GetType<T>(d)
83 << "(\"" << d.name << "\")";
84}
85
89template<typename T>
92 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
93 const typename boost::enable_if<data::HasSerialize<T>>::type* = 0)
94{
102 MLPACK_COUT_STREAM << " \"" << d.name << "\" = " << d.name;
103}
104
110template<typename T>
112 const void* /*input*/,
113 void* /* output */)
114{
115 PrintOutputProcessing<typename std::remove_pointer<T>::type>(d);
116}
117
118} // namespace r
119} // namespace bindings
120} // namespace mlpack
121
122#endif
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.
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.
#define MLPACK_COUT_STREAM
Definition: prereqs.hpp:45
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:53
std::string name
Name of this parameter.
Definition: param_data.hpp:56