Home
Get Started
Documentation
Community
Google Summer of Code
FAQ
GitHub
Home
Get Started
Documentation
Community
Google Summer of Code
FAQ
GitHub
mlpack_main.hpp
Go to the documentation of this file.
1
9
#ifndef MLPACK_BINDINGS_GO_MLPACK_MAIN_HPP
10
#define MLPACK_BINDINGS_GO_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_GO
16
#error "BINDING_TYPE is not set to BINDING_TYPE_GO!"
17
#endif
18
19
// Matrices are transposed on load/save.
20
#define BINDING_MATRIX_TRANSPOSED true
21
22
#include <
mlpack/bindings/go/go_option.hpp
>
23
#include <
mlpack/bindings/go/print_doc_functions.hpp
>
24
29
#define PRINT_PARAM_STRING mlpack::bindings::go::ParamString
30
35
#define PRINT_PARAM_VALUE mlpack::bindings::go::PrintValue
36
41
#define PRINT_DATASET mlpack::bindings::go::PrintDataset
42
47
#define PRINT_MODEL mlpack::bindings::go::PrintModel
48
56
#define PRINT_CALL mlpack::bindings::go::ProgramCall
57
62
#define BINDING_IGNORE_CHECK(x) mlpack::bindings::go::IgnoreCheck( \
63
STRINGIFY(BINDING_NAME), x)
64
65
namespace
mlpack
{
66
namespace
util {
67
68
template
<
typename
T>
69
using
Option
=
mlpack::bindings::go::GoOption<T>
;
70
71
}
72
}
73
74
#include <
mlpack/core/util/param.hpp
>
75
76
// In Go, we want to call the binding function mlpack_<BINDING_NAME>() instead
77
// of just <BINDING_NAME>(), so we change the definition of BINDING_FUNCTION().
78
#undef BINDING_FUNCTION
79
#define BINDING_FUNCTION(...) JOIN(mlpack_, BINDING_NAME)(__VA_ARGS__)
80
81
// Add default parameters that are included in every program.
82
PARAM_GLOBAL
(
bool
,
"verbose"
,
"Display informational messages and the full "
83
"list of parameters and timers at the end of execution."
,
"v"
,
"bool"
,
84
false
,
true
,
false
,
false
);
85
86
#endif
print_doc_functions.hpp
mlpack
Linear algebra utility functions, generally performed on matrices or vectors.
Definition:
add_to_cli11.hpp:21
mlpack::bindings::go::GoOption
The Go option class.
Definition:
go_option.hpp:36
mlpack::util::Option
mlpack::bindings::cli::CLIOption< T > Option
Definition:
mlpack_main.hpp:70
PARAM_GLOBAL
PARAM_GLOBAL(bool, "help", "Default help info.", "h", "bool", false, true, false, false)
param.hpp
go_option.hpp