13 #ifndef MLPACK_BINDINGS_GO_PRINT_OUTPUT_PROCESSING_HPP
14 #define MLPACK_BINDINGS_GO_PRINT_OUTPUT_PROCESSING_HPP
32 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
34 const typename boost::disable_if<std::is_same<T,
35 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
37 const std::string prefix(indent,
' ');
46 std::string name = d.
name;
48 std::cout << prefix << name <<
" := getParam" << GetType<T>(d)
49 <<
"(\"" << d.
name <<
"\")" << std::endl;
59 const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0,
60 const typename std::enable_if<!std::is_same<T,
61 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
63 const std::string prefix(indent,
' ');
72 std::string name = d.
name;
74 std::cout << prefix <<
"var " << name <<
"Ptr mlpackArma" << std::endl;
75 std::cout << prefix << name <<
" := " << name
76 <<
"Ptr.armaToGonum" << GetType<T>(d)
77 <<
"(\"" << d.
name <<
"\")" << std::endl;
86 const typename boost::enable_if<std::is_same<T,
87 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
89 const std::string prefix(indent,
' ');
98 std::string name = d.
name;
100 std::cout << prefix <<
"var " << name <<
"Ptr mlpackArma" << std::endl;
101 std::cout << prefix << name <<
" := " << name <<
"Ptr.armaToGonumWith"
102 <<
"Info(\"" << d.
name <<
"\")" << std::endl;
112 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
116 std::string goStrippedType, strippedType, printedType, defaultsType;
117 StripType(d.
cppType, goStrippedType, strippedType, printedType, defaultsType);
119 const std::string prefix(indent,
' ');
128 std::string name = d.
name;
130 std::cout << prefix <<
"var " << name <<
" " << goStrippedType << std::endl;
131 std::cout << prefix << name <<
".get" << strippedType
132 <<
"(\"" << d.
name <<
"\")" << std::endl;
145 PrintOutputProcessing<typename std::remove_pointer<T>::type>(d, 2);