print_input_param.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_R_PRINT_INPUT_PARAM_HPP
14 #define MLPACK_BINDINGS_R_PRINT_INPUT_PARAM_HPP
15 
16 #include <mlpack/prereqs.hpp>
17 
18 namespace mlpack {
19 namespace bindings {
20 namespace r {
21 
26 template<typename T>
28  const void* /* input */,
29  void* /* output */)
30 {
32  if (std::is_same<T, bool>::value)
33  MLPACK_COUT_STREAM << "=FALSE";
34  else if (!d.required)
35  MLPACK_COUT_STREAM << "=NA";
36 }
37 
38 } // namespace r
39 } // namespace bindings
40 } // namespace mlpack
41 
42 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
void PrintInputParam(util::ParamData &d, const void *, void *)
Print the declaration of an input parameter as part of a line in a R function definition.
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:51
#define MLPACK_COUT_STREAM
Definition: prereqs.hpp:45
std::string name
Name of this parameter.
Definition: param_data.hpp:55
bool required
True if this option is required.
Definition: param_data.hpp:70