132 std::tuple
>>::type* = 0) 134 const std::string prefix(indent,
' ');
145 std::cout << prefix <<
"result = arma_numpy.mat_to_numpy_" 146 << GetNumpyTypeChar
() 147 <<
"(GetParamWithInfo[arma.Mat[double]]('" << d.
name <<
"'))" 158 std::cout << prefix <<
"result['" << d.
name 159 <<
"'] = arma_numpy.mat_to_numpy_" << GetNumpyTypeChar
() 160 <<
"(GetParamWithInfo[arma.Mat[double]]('" << d.
name <<
"'))" 172 const bool onlyOutput,
173 const typename boost::disable_if
>::type* = 0, 177 std::string strippedType, printedType, defaultsType;
180 const std::string prefix(indent,
' ');
190 std::cout << prefix <<
"result = " << strippedType <<
"Type()" << std::endl;
191 std::cout << prefix <<
"(<" << strippedType <<
"Type?> result).modelptr = " 192 <<
"GetParamPtr[" << strippedType <<
"]('" << d.
name <<
"')" 202 for (
auto it = parameters.begin(); it != parameters.end(); ++it)
208 std::cout << prefix <<
"if (<" << strippedType
209 <<
"Type> result).modelptr" << d.
name <<
" == (<" << strippedType
210 <<
"Type> " << data.
name <<
").modelptr:" << std::endl;
211 std::cout << prefix <<
" (<" << strippedType
212 <<
"Type> result).modelptr = <" << strippedType <<
"*> 0" 214 std::cout << prefix <<
" result = " << data.
name << std::endl;
218 std::cout << prefix <<
"if " << data.
name <<
" is not None:" 220 std::cout << prefix <<
" if (<" << strippedType
221 <<
"Type> result).modelptr" << d.
name <<
" == (<" << strippedType
222 <<
"Type> " << data.
name <<
").modelptr:" << std::endl;
223 std::cout << prefix <<
" (<" << strippedType
224 <<
"Type> result).modelptr = <" << strippedType <<
"*> 0" 226 std::cout << prefix <<
" result = " << data.
name << std::endl;
238 std::cout << prefix <<
"result['" << d.
name <<
"'] = " << strippedType
239 <<
"Type()" << std::endl;
240 std::cout << prefix <<
"(<" << strippedType <<
"Type?> result['" << d.
name 241 <<
"']).modelptr = GetParamPtr[" << strippedType <<
"]('" << d.
name 242 <<
"')" << std::endl;
251 for (
auto it = parameters.begin(); it != parameters.end(); ++it)
257 std::cout << prefix <<
"if (<" << strippedType <<
"Type> result['" 258 << d.
name <<
"']).modelptr == (<" << strippedType <<
"Type> " 259 << data.
name <<
").modelptr:" << std::endl;
260 std::cout << prefix <<
" (<" << strippedType <<
"Type> result['" 261 << d.
name <<
"']).modelptr = <" << strippedType <<
"*> 0" 263 std::cout << prefix <<
" result['" << d.
name <<
"'] = " << data.
name 268 std::cout << prefix <<
"if " << data.
name <<
" is not None:" 270 std::cout << prefix <<
" if (<" << strippedType <<
"Type> result['" 271 << d.
name <<
"']).modelptr == (<" << strippedType <<
"Type> " 272 << data.
name <<
").modelptr:" << std::endl;
273 std::cout << prefix <<
" (<" << strippedType <<
"Type> result['" 274 << d.
name <<
"']).modelptr = <" << strippedType <<
"*> 0" 276 std::cout << prefix <<
" result['" << d.
name <<
"'] = " << data.
name 302 std::tuple
* tuple = (std::tuple*) input; 304 PrintOutputProcessing
::type>(d, 305 std::get<0>(*tuple), std::get<1>(*tuple));
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
bool input
True if this option is an input option (otherwise, it is output).
This structure holds all of the information about a single parameter, including its value (which is s...
std::string name
Name of this parameter.
bool required
True if this option is required.
void PrintOutputProcessing(util::ParamData &d, const size_t indent, const bool onlyOutput, 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.
void StripType(const std::string &inputType, std::string &strippedType, std::string &printedType, std::string &defaultsType)
Given an input type like, e.g., "LogisticRegression<>", return three types that can be used in Python...
std::string cppType
The true name of the type, as it would be written in C++.
if(NOT BUILD_GO_SHLIB) macro(add_go_binding name) endmacro() return() endif() endmacro() macro(post_go_setup) if(BUILD_GO_BINDINGS) file(APPEND "$
static std::map< std::string, util::ParamData > & Parameters()
Return a modifiable list of parameters that IO knows about.