print_doc_functions.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_BINDINGS_GO_PRINT_DOC_FUNCTIONS_HPP
15 #define MLPACK_BINDINGS_GO_PRINT_DOC_FUNCTIONS_HPP
16 
18 
19 namespace mlpack {
20 namespace bindings {
21 namespace go {
22 
26 inline std::string GetBindingName(const std::string& bindingName);
27 
31 inline std::string PrintImport();
32 
36 inline std::string PrintOutputOptionInfo();
37 
41 inline std::string PrintInputOptionInfo();
42 
46 template<typename T>
47 inline std::string PrintValue(const T& value, bool quotes);
48 
49 // Special overload for booleans.
50 template<>
51 inline std::string PrintValue(const bool& value, bool quotes);
52 
56 inline std::string PrintDefault(const std::string& bindingName,
57  const std::string& paramName);
58 
59 // Base case: no modification needed.
60 inline void GetOptions(
61  util::Params& /* params */,
62  std::vector<std::tuple<std::string, std::string>>& /* results */);
63 
69 template<typename T, typename... Args>
70 void GetOptions(
71  util::Params& params,
72  std::vector<std::tuple<std::string, std::string>>& results,
73  const std::string& paramName,
74  const T& value,
75  Args... args);
76 
77 // Recursion base case.
78 inline std::string PrintOptionalInputs(util::Params& /* params */);
79 
80 // Recursion base case.
81 inline std::string PrintInputOptions(util::Params& /* params */);
82 
87 template<typename T, typename... Args>
88 std::string PrintOptionalInputs(util::Params& params,
89  const std::string& paramName,
90  const T& value,
91  Args... args);
92 
97 template<typename T, typename... Args>
98 std::string PrintInputOptions(util::Params& params,
99  const std::string& paramName,
100  const T& value,
101  Args... args);
102 
103 // Recursion base case.
104 inline std::string PrintOutputOptions(util::Params& /* params */);
105 
106 template<typename... Args>
107 std::string PrintOutputOptions(util::Params& params, Args... args);
108 
113 template<typename... Args>
114 std::string ProgramCall(const std::string& programName, Args... args);
115 
119 inline std::string ProgramCall(util::Params& params,
120  const std::string& programName);
121 
125 inline std::string PrintModel(const std::string& modelName);
126 
131 inline std::string PrintDataset(const std::string& datasetName);
132 
137 inline std::string ParamString(const std::string& paramName);
138 
142 inline bool IgnoreCheck(const std::string& paramName);
143 
148 inline bool IgnoreCheck(const std::vector<std::string>& constraints);
149 
154 inline bool IgnoreCheck(
155  const std::vector<std::pair<std::string, bool>>& constraints,
156  const std::string& paramName);
157 
158 } // namespace go
159 } // namespace bindings
160 } // namespace mlpack
161 
162 // Include implementation.
163 #include "print_doc_functions_impl.hpp"
164 
165 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
void GetOptions(util::Params &, std::vector< std::tuple< std::string, std::string >> &)
std::string PrintOutputOptions(util::Params &)
std::string PrintDataset(const std::string &datasetName)
Given the name of a matrix, print it.
std::string GetBindingName(const std::string &bindingName)
Given the name of a binding, print its Go name.
go
Definition: CMakeLists.txt:7
std::string PrintModel(const std::string &modelName)
Given the name of a model, print it.
std::string PrintDefault(const std::string &bindingName, const std::string &paramName)
Given a parameter name, print its corresponding default value.
std::string ProgramCall(const std::string &programName, Args... args)
Given a name of a binding and a variable number of arguments (and their contents), print the corresponding function call.
std::string PrintInputOptions(util::Params &)
std::string PrintInputOptionInfo()
Print any special information about input options.
std::string PrintValue(const T &value, bool quotes)
Given a parameter type, print the corresponding value.
std::string ParamString(const std::string &paramName)
Given the parameter name, determine what it would actually be when passed to the command line...
std::string PrintImport()
Print any import information for the Go binding.
bool IgnoreCheck(const std::string &paramName)
Print whether or not we should ignore a check on the given parameter.
std::string PrintOptionalInputs(util::Params &)
std::string PrintOutputOptionInfo()
Print any special information about output options.