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& paramName);
56 
57 // Recursion base case.
58 inline std::string PrintInputOptions();
59 
65 template<typename T, typename... Args>
66 std::string PrintInputOptions(const std::string& paramName,
67  const T& value,
68  Args... args);
69 
70 // Recursion base case.
71 inline std::string PrintOutputOptions();
72 
73 template<typename T, typename... Args>
74 std::string PrintOutputOptions(const std::string& paramName,
75  const T& value,
76  Args... args);
77 
82 template<typename... Args>
83 std::string ProgramCall(const std::string& programName, Args... args);
84 
89 inline std::string ProgramCall(const std::string& programName);
90 
94 inline std::string PrintModel(const std::string& modelName);
95 
100 inline std::string PrintDataset(const std::string& datasetName);
101 
106 inline std::string ParamString(const std::string& paramName);
107 
113 inline bool IgnoreCheck(const std::string& paramName);
114 
120 inline bool IgnoreCheck(const std::vector<std::string>& constraints);
121 
128 inline bool IgnoreCheck(
129  const std::vector<std::pair<std::string, bool>>& constraints,
130  const std::string& paramName);
131 
132 } // namespace python
133 } // namespace bindings
134 } // namespace mlpack
135 
136 // Include implementation.
137 #include "print_doc_functions_impl.hpp"
138 
139 #endif
std::string PrintValue(const T &value, bool quotes)
Given a parameter type, print the corresponding value.
std::string PrintOutputOptionInfo()
Print any special information about output options.
std::string PrintDefault(const std::string &paramName)
Given a parameter name, print its corresponding default value.
std::string GetBindingName(const std::string &bindingName)
Given the name of a binding, print its Python name.
Linear algebra utility functions, generally performed on matrices or vectors.
std::string PrintOutputOptions()
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 PrintModel(const std::string &modelName)
Given the name of a model, print it.
python
Definition: CMakeLists.txt:6
std::string PrintInputOptionInfo()
Print any special information about input options.
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 PrintDataset(const std::string &datasetName)
Given the name of a matrix, print it.
std::string PrintInputOptions()
std::string PrintImport(const std::string &bindingName)
Print any import information for the Python binding.
bool IgnoreCheck(const std::string &paramName)
Print whether or not we should ignore a check on the given parameter.