mlpack  3.3.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 
22 
23 namespace mlpack {
24 namespace bindings {
25 namespace markdown {
26 
31 template<typename T>
32 std::string PrintTypeDoc(const util::ParamData& data)
33 {
34  if (BindingInfo::Language() == "cli")
35  {
36  return cli::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
37  }
38  else if (BindingInfo::Language() == "python")
39  {
40  return python::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
41  }
42  else if (BindingInfo::Language() == "julia")
43  {
44  return julia::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
45  }
46  else if (BindingInfo::Language() == "go")
47  {
48  return go::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
49  }
50  else
51  {
52  throw std::invalid_argument("PrintTypeDoc(): unknown "
53  "BindingInfo::Language() " + BindingInfo::Language() + "!");
54  }
55 }
56 
57 } // namespace markdown
58 } // namespace bindings
59 } // namespace mlpack
60 
61 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: add_to_po.hpp:21
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
std::string PrintTypeDoc(const util::ParamData &data)
Print the type of a parameter into the output string.
static std::string & Language()
Get or modify the current language (don&#39;t set it to something invalid!).