12#ifndef MLPACK_BINDINGS_CLI_SET_PARAM_HPP
13#define MLPACK_BINDINGS_CLI_SET_PARAM_HPP
29 const boost::any& value,
30 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
32 const typename boost::disable_if<std::is_same<T,
33 std::tuple<mlpack::data::DatasetInfo, arma::mat>>>::type* = 0,
34 const typename boost::disable_if<std::is_same<T, bool>>::type* = 0)
47 const typename boost::enable_if<std::is_same<T, bool>>::type* = 0)
60 const boost::any& value,
61 const typename std::enable_if<arma::is_arma_type<T>::value ||
63 std::tuple<data::DatasetInfo, arma::mat>>::value>::type* = 0)
66 typedef std::tuple<T, typename ParameterType<T>::type> TupleType;
67 TupleType& tuple = *boost::any_cast<TupleType>(&d.
value);
68 std::get<1>(tuple) = boost::any_cast<std::string>(value);
78 const boost::any& value,
79 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
83 typedef std::tuple<T*, typename ParameterType<T>::type> TupleType;
84 TupleType& tuple = *boost::any_cast<TupleType>(&d.
value);
85 std::get<1>(tuple) = boost::any_cast<std::string>(value);
99 SetParam<typename std::remove_pointer<T>::type>(
void SetParam(util::ParamData &d, const boost::any &value, 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, const typename boost::disable_if< std::is_same< T, bool > >::type *=0)
This overload is called when nothing special needs to happen to the name of the parameter.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
This structure holds all of the information about a single parameter, including its value (which is s...
bool wasPassed
True if the option was passed to the program.
boost::any value
The actual value that is held.