8 #ifndef MLPACK_CORE_UTIL_PARAM_DATA_HPP 9 #define MLPACK_CORE_UTIL_PARAM_DATA_HPP 13 #include <boost/any.hpp> 18 #define TYPENAME(x) (std::string(typeid(x).name())) 28 template<
typename T,
typename A>
32 template<
bool HasSerialize,
typename T>
71 template<
typename eT,
typename PolicyType>
147 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
149 const typename boost::disable_if<std::is_same<T,
150 std::tuple<mlpack::data::DatasetInfo, arma::mat>>>::type* = 0);
156 const typename boost::enable_if_c<
157 arma::is_arma_type<T>::value ||
159 arma::mat>>::
value ||
170 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
172 const typename boost::disable_if<std::is_same<T,
173 std::tuple<mlpack::data::DatasetInfo, arma::mat>>>::type* = 0);
180 const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0);
187 const typename boost::enable_if<std::is_same<T,
188 std::tuple<mlpack::data::DatasetInfo, arma::mat>>>::type* = 0);
202 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
204 const typename boost::disable_if<std::is_same<T,
205 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
215 const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0)
235 const typename boost::enable_if<std::is_same<T,
236 std::tuple<data::DatasetInfo, arma::mat>>>::type* = 0)
245 #include "param_data_impl.hpp" char alias
Alias for this parameter.
std::string tname
Type information of this parameter.
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.
bool input
True if this option is an input option (otherwise, it is output).
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string desc
Description of this parameter, if any.
bool noTranspose
True if this is a matrix that should not be transposed.
std::string boostName
The name of the parameter, as seen by boost::program_options.
bool isMappedString
If this is a matrix or model parameter, then boost::program_options will actually represent this as a...
T & HandleParameter(typename util::ParameterType< T >::type &value, util::ParamData &d, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< data::HasSerialize< T >>::type *=0, const typename boost::disable_if< std::is_same< T, std::tuple< mlpack::data::DatasetInfo, arma::mat >>>::type *=0)
If needed, map 'trueValue' to the right type and return it.
std::string MapParameterName(const std::string &identifier, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< data::HasSerialize< T >>::type *=0, const typename boost::disable_if< std::is_same< T, std::tuple< mlpack::data::DatasetInfo, arma::mat >>>::type *=0)
If needed, map the parameter name to the name that is used by boost.
T & HandleRawParameter(typename util::ParameterType< T >::type &value, util::ParamData &, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< data::HasSerialize< T >>::type *=0, const typename boost::disable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type *=0)
This will just return the value.
This structure holds all of the information about a single parameter, including its value (which is s...
bool loaded
If this is an input parameter that needs extra loading, this indicates whether or not it has been loa...
boost::any mappedValue
The value that the user interacts with, if the type is different than the type of the parameter...
Metaprogramming structure for vector detection.
ParameterTypeDeducer< data::HasSerialize< T >::value, T >::type type
Utility struct to return the type that boost::program_options should accept for a given input type...
boost::any value
The actual value that is held, as passed from the user (so the type could be different than the type ...
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"$
bool isFlag
True if the wasPassed value should not be ignored.
std::string name
Name of this parameter.
bool required
True if this option is required.