print_doc_functions.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_PYTHON_PRINT_DOC_FUNCTIONS_HPP
14 #define MLPACK_BINDINGS_PYTHON_PRINT_DOC_FUNCTIONS_HPP
15 
17 
18 namespace mlpack {
19 namespace bindings {
20 namespace python {
21 
25 inline std::string GetBindingName(const std::string& bindingName);
26 
30 inline std::string PrintImport(const std::string& bindingName);
31 
35 inline std::string PrintInputOptionInfo();
36 
40 inline std::string PrintOutputOptionInfo();
41 
45 template<typename T>
46 inline std::string PrintValue(const T& value, bool quotes);
47 
48 // Special overload for booleans.
49 template<>
50 inline std::string PrintValue(const bool& value, bool quotes);
51 
55 inline std::string PrintDefault(const std::string& bindingName,
56  const std::string& paramName);
57 
58 // Recursion base case.
59 inline std::string PrintInputOptions(util::Params& params,
60  bool onlyHyperParams,
61  bool onlyMatrixParams);
62 
68 template<typename T, typename... Args>
69 std::string PrintInputOptions(util::Params& params,
70  bool onlyHyperParams,
71  bool onlyMatrixParams,
72  const std::string& paramName,
73  const T& value,
74  Args... args);
75 
76 // Recursion base case.
77 inline std::string PrintOutputOptions(util::Params& params);
78 
79 template<typename T, typename... Args>
80 std::string PrintOutputOptions(util::Params& params,
81  const std::string& paramName,
82  const T& value,
83  Args... args);
84 
89 template<typename... Args>
90 std::string ProgramCall(const std::string& programName, Args... args);
91 
96 inline std::string ProgramCall(util::Params& p, const std::string& programName);
97 
101 inline std::string PrintModel(const std::string& modelName);
102 
107 inline std::string PrintDataset(const std::string& datasetName);
108 
113 inline std::string ParamString(const std::string& paramName);
114 
115 inline std::string ImportExtLib();
116 
117 inline std::string ImportSplit();
118 
119 inline std::string ImportThis(const std::string& groupName);
120 
121 inline std::string SplitTrainTest(const std::string& datasetName,
122  const std::string& labelName,
123  const std::string& trainDataset,
124  const std::string& trainLabels,
125  const std::string& testDataset,
126  const std::string& testLabels,
127  const std::string& splitRatio);
128 
129 inline std::string GetDataset(const std::string& datasetName,
130  const std::string& url);
131 
132 template<typename... Args>
133 std::string CreateObject(const std::string& bindingName,
134  const std::string& objectName,
135  const std::string& groupName,
136  Args... args);
137 
138 inline std::string CreateObject(const std::string& bindingName,
139  const std::string& objectName,
140  const std::string& groupName);
141 
142 template<typename... Args>
143 std::string CallMethod(const std::string& bindingName,
144  const std::string& objectName,
145  const std::string& methodName,
146  Args... args);
147 
153 inline bool IgnoreCheck(const std::string& bindingName,
154  const std::string& paramName);
155 
161 inline bool IgnoreCheck(const std::string& bindingName,
162  const std::vector<std::string>& constraints);
163 
170 inline bool IgnoreCheck(
171  const std::string& bindingName,
172  const std::vector<std::pair<std::string, bool>>& constraints,
173  const std::string& paramName);
174 
175 } // namespace python
176 } // namespace bindings
177 } // namespace mlpack
178 
179 // Include implementation.
180 #include "print_doc_functions_impl.hpp"
181 
182 #endif
std::string CallMethod(const std::string &bindingName, const std::string &objectName, const std::string &methodName, Args... args)
std::string PrintValue(const T &value, bool quotes)
Given a parameter type, print the corresponding value.
std::string GetDataset(const std::string &datasetName, const std::string &url)
std::string PrintOutputOptionInfo()
Print any special information about output options.
std::string CreateObject(const std::string &bindingName, const std::string &objectName, const std::string &groupName, Args... args)
std::string GetBindingName(const std::string &bindingName)
Given the name of a binding, print its Python name.
std::string PrintOutputOptions(util::Params &params)
Linear algebra utility functions, generally performed on matrices or vectors.
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 ImportSplit()
std::string PrintModel(const std::string &modelName)
Given the name of a model, print it.
python
Definition: CMakeLists.txt:7
std::string PrintInputOptionInfo()
Print any special information about input options.
std::string SplitTrainTest(const std::string &datasetName, const std::string &labelName, const std::string &trainDataset, const std::string &trainLabels, const std::string &testDataset, const std::string &testLabels, const std::string &splitRatio)
std::string ImportExtLib()
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 PrintDefault(const std::string &bindingName, const std::string &paramName)
Given a parameter name, print its corresponding default value.
std::string PrintInputOptions(util::Params &params, bool onlyHyperParams, bool onlyMatrixParams)
bool IgnoreCheck(const std::string &bindingName, const std::string &paramName)
Print whether or not we should ignore a check on the given parameter.
std::string PrintDataset(const std::string &datasetName)
Given the name of a matrix, print it.
std::string ImportThis(const std::string &groupName)
std::string PrintImport(const std::string &bindingName)
Print any import information for the Python binding.