mlpack 3.4.2
print_type_doc.hpp
Go to the documentation of this file.
1
13#ifndef MLPACK_BINDINGS_MARKDOWN_PRINT_TYPE_DOC_HPP
14#define MLPACK_BINDINGS_MARKDOWN_PRINT_TYPE_DOC_HPP
15
16#include "binding_info.hpp"
17
23
24namespace mlpack {
25namespace bindings {
26namespace markdown {
27
32template<typename T>
33std::string PrintTypeDoc(util::ParamData& data)
34{
35 if (BindingInfo::Language() == "cli")
36 {
37 return cli::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
38 }
39 else if (BindingInfo::Language() == "python")
40 {
41 return python::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
42 }
43 else if (BindingInfo::Language() == "julia")
44 {
45 return julia::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
46 }
47 else if (BindingInfo::Language() == "go")
48 {
49 return go::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
50 }
51 else if (BindingInfo::Language() == "r")
52 {
53 return r::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
54 }
55 else
56 {
57 throw std::invalid_argument("PrintTypeDoc(): unknown "
58 "BindingInfo::Language() " + BindingInfo::Language() + "!");
59 }
60}
61
62} // namespace markdown
63} // namespace bindings
64} // namespace mlpack
65
66#endif
static std::string & Language()
Get or modify the current language (don't set it to something invalid!).
std::string PrintTypeDoc(util::ParamData &data)
Print the type of a parameter into the output string.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:53