mlpack  master
string_type_param.hpp
Go to the documentation of this file.
1 
8 #ifndef MLPACK_CORE_UTIL_STRING_TYPE_PARAM_HPP
9 #define MLPACK_CORE_UTIL_STRING_TYPE_PARAM_HPP
10 
11 #include <mlpack/prereqs.hpp>
12 
13 namespace mlpack {
14 namespace util {
15 
19 template<typename T>
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 
28 template<typename T>
30  const typename boost::enable_if<IsStdVector<T>>::type* = 0);
31 
35 template<typename T>
37  const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0);
38 
42 template<typename T>
44  const typename boost::enable_if<data::HasSerialize<T>>::type* = 0);
45 
50 template<typename T>
52 {
53  return StringTypeParamImpl<T>();
54 }
55 
57 template<>
59 
61 template<>
63 
65 template<>
66 inline std::string StringTypeParam<std::string>();
67 
69 template<>
71 
73 template<>
75 
77 template<>
79  arma::mat>>();
80 
81 } // namespace util
82 } // namespace mlpack
83 
84 // Include implementation.
85 #include "string_type_param_impl.hpp"
86 
87 #endif
std::string StringTypeParam< float >()
Return "float".
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 StringTypeParamImpl(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)
Return a string containing the type of the parameter.
std::string StringTypeParam< double >()
Return "double".
std::string StringTypeParam< int >()
Return "int".
DatasetMapper< data::IncrementPolicy > DatasetInfo
std::string StringTypeParam< bool >()
Return "bool".
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 StringTypeParam()
Return a string containing the type of a parameter.