mlpack
3.4.2
mlpack-3.4.2
src
mlpack
bindings
R
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>
27
void
PrintInputParam
(
util::ParamData
& d,
28
const
void
*
/* input */
,
29
void
*
/* output */
)
30
{
31
MLPACK_COUT_STREAM
<< d.
name
;
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
prereqs.hpp
The core includes that mlpack expects; standard C++ includes and Armadillo.
mlpack::util::ParamData
This structure holds all of the information about a single parameter, including its value (which is s...
Definition:
param_data.hpp:53
mlpack
Linear algebra utility functions, generally performed on matrices or vectors.
Definition:
add_to_cli11.hpp:21
MLPACK_COUT_STREAM
#define MLPACK_COUT_STREAM
Definition:
prereqs.hpp:45
mlpack::util::ParamData::name
std::string name
Name of this parameter.
Definition:
param_data.hpp:56
mlpack::bindings::r::PrintInputParam
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.
Definition:
print_input_param.hpp:27
mlpack::util::ParamData::required
bool required
True if this option is required.
Definition:
param_data.hpp:71
Generated by
1.8.20