mlpack  master
default_param.hpp
Go to the documentation of this file.
1 
7 #ifndef MLPACK_CORE_UTIL_DEFAULT_PARAM_HPP
8 #define MLPACK_CORE_UTIL_DEFAULT_PARAM_HPP
9 
10 #include <mlpack/prereqs.hpp>
11 
12 namespace mlpack {
13 namespace util {
14 
18 template<typename T>
20  const ParamData& data,
21  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
22  const typename boost::disable_if<IsStdVector<T>>::type* = 0,
23  const typename boost::disable_if<data::HasSerialize<T>>::type* = 0,
24  const typename boost::disable_if<std::is_same<T, std::string>>::type* = 0,
25  const typename boost::disable_if<std::is_same<T,
26  std::tuple<mlpack::data::DatasetInfo, arma::mat>>>::type* = 0);
27 
31 template<typename T>
33  const ParamData& data,
34  const typename boost::enable_if<IsStdVector<T>>::type* = 0);
35 
40 template<typename T>
42  const ParamData& data,
43  const typename boost::enable_if_c<
44  arma::is_arma_type<T>::value ||
46  std::is_same<T, std::tuple<mlpack::data::DatasetInfo,
47  arma::mat>>::value ||
48  std::is_same<T, std::string>::value>::type* /* junk */ = 0);
49 
54 template<typename T>
56 {
57  return DefaultParamImpl<T>(data);
58 }
59 
60 } // namespace util
61 } // namespace mlpack
62 
63 // Include implementation.
64 #include "default_param_impl.hpp"
65 
66 #endif
Auxiliary information for a dataset, including mappings to/from strings and the datatype of each dime...
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: binarize.hpp:18
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string DefaultParam(const ParamData &data)
Return the default value of an option.
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:90
test cpp RESULT_VARIABLE MEX_RESULT_TRASH OUTPUT_VARIABLE MEX_OUTPUT ERROR_VARIABLE MEX_ERROR_TRASH string(REGEX MATCH"Warning: You are using"MEX_WARNING"${MEX_OUTPUT}") if(MEX_WARNING) string(REGEX REPLACE".*using [a-zA-Z]* version \"([0-9.]*)[^\"]*\".*""\\1"OTHER_COMPILER_VERSION"$
Definition: CMakeLists.txt:18
std::string DefaultParamImpl(const ParamData &data, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< 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.