mlpack_main.hpp
Go to the documentation of this file.
1 
9 #ifndef MLPACK_BINDINGS_R_MLPACK_MAIN_HPP
10 #define MLPACK_BINDINGS_R_MLPACK_MAIN_HPP
11 
12 #ifndef BINDING_TYPE
13  #error "BINDING_TYPE not defined! Don't include this file directly!"
14 #endif
15 #if BINDING_TYPE != BINDING_TYPE_R
16  #error "BINDING_TYPE is not set to BINDING_TYPE_R!"
17 #endif
18 
19 // This doesn't actually matter for this binding type.
20 #define BINDING_MATRIX_TRANSPOSED true
21 
24 
29 #define PRINT_PARAM_STRING mlpack::bindings::r::ParamString
30 
35 #define PRINT_PARAM_VALUE mlpack::bindings::r::PrintValue
36 
41 #define PRINT_DATASET mlpack::bindings::r::PrintDataset
42 
47 #define PRINT_MODEL mlpack::bindings::r::PrintModel
48 
56 #define PRINT_CALL(...) mlpack::bindings::r::ProgramCall(false, __VA_ARGS__)
57 
62 #define BINDING_IGNORE_CHECK(...) mlpack::bindings::r::IgnoreCheck( \
63  STRINGIFY(BINDING_NAME), __VA_ARGS__)
64 
70 #define BINDING_MIN_LABEL 0
71 
72 namespace mlpack {
73 namespace util {
74 
75 template<typename T>
77 
78 }
79 }
80 
82 
83 // In R, we want to call the binding function mlpack_<BINDING_NAME>() instead of
84 // just <BINDING_NAME>(), so we change the definition of BINDING_FUNCTION().
85 #undef BINDING_FUNCTION
86 #define BINDING_FUNCTION(...) JOIN(mlpack_, BINDING_NAME)(__VA_ARGS__)
87 
88 // Add default parameters that are included in every program.
89 PARAM_FLAG("verbose", "Display informational messages and the full list of "
90  "parameters and timers at the end of execution.", "v");
91 
92 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
mlpack::bindings::cli::CLIOption< T > Option
Definition: mlpack_main.hpp:77
PARAM_FLAG("verbose", "Display informational messages and the full list of " "parameters and timers at the end of execution.", "v")
The R option class.
Definition: R_option.hpp:31