default_param.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_BINDINGS_PYTHON_DEFAULT_PARAM_HPP
13 #define MLPACK_BINDINGS_PYTHON_DEFAULT_PARAM_HPP
14 
15 #include <mlpack/prereqs.hpp>
18 
19 namespace mlpack {
20 namespace bindings {
21 namespace python {
22 
26 template<typename T>
27 std::string DefaultParamImpl(
28  util::ParamData& data,
29  const typename boost::disable_if>::type* = 0,
30  const typename boost::disable_if<util::IsStdVector>::type* = 0,
31  const typename boost::disable_if<data::HasSerialize>::type* = 0,
32  const typename boost::disable_if>::type* = 0,
33  const typename boost::disable_if
34  std::tuple>>::type* = 0);
35 
39 template<typename T>
40 std::string DefaultParamImpl(
41  util::ParamData& data,
42  const typename boost::enable_if<util::IsStdVector>::type* = 0);
43 
47 template<typename T>
48 std::string DefaultParamImpl(
49  util::ParamData& data,
50  const typename boost::enable_if>::type* = 0);
51 
57 template<typename T>
58 std::string DefaultParamImpl(
59  util::ParamData& data,
60  const typename boost::enable_if_c<
61  arma::is_arma_type::value ||
62  std::is_samemlpack::data::DatasetInfo,
63  arma::mat>>::value>::type* /* junk */ = 0);
64 
69 template<typename T>
70 std::string DefaultParamImpl(
71  util::ParamData& data,
72  const typename boost::disable_if>::type* = 0,
73  const typename boost::enable_if<data::HasSerialize>::type* = 0);
74 
79 template<typename T>
81  const void* /* input */,
82  void* output)
83 {
84  std::string* outstr = (std::string*) output;
85  *outstr = DefaultParamImpl::type>(data);
86 }
87 
88 } // namespace python
89 } // namespace bindings
90 } // namespace mlpack
91 
92 // Include implementation.
93 #include "default_param_impl.hpp"
94 
95 #endif
Auxiliary information for a dataset, including mappings to/from strings (or other types) and the data...
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
python
Definition: CMakeLists.txt:6
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
Metaprogramming structure for vector detection.
void DefaultParam(util::ParamData &data, const void *, void *output)
Return the default value of an option.
std::string DefaultParamImpl(util::ParamData &data, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< util::IsStdVector< T >>::type *=0, const typename boost::disable_if< data::HasSerialize< T >>::type *=0, const typename boost::disable_if< std::is_same< T, std::string >>::type *=0, const typename boost::disable_if< std::is_same< T, std::tuple< mlpack::data::DatasetInfo, arma::mat >>>::type *=0)
Return the default value of an option.