7 #ifndef MLPACK_CORE_UTIL_PARAMS_HPP 8 #define MLPACK_CORE_UTIL_PARAMS_HPP 24 typedef std::map<std::string, std::map<std::string,
31 Params(
const std::map<char, std::string>& aliases,
32 const std::map<std::string, ParamData>& parameters,
34 const std::string& bindingName,
47 bool Has(
const std::string& identifier)
const;
56 T&
Get(
const std::string& identifier);
79 T&
GetRaw(
const std::string& identifier);
93 const std::string& inputParamName);
96 std::map<std::string, ParamData>&
Parameters() {
return parameters; }
98 std::map<char, std::string>&
Aliases() {
return aliases; }
111 void SetPassed(
const std::string& identifier);
121 std::map<char, std::string> aliases;
123 std::map<std::string, ParamData> parameters;
134 std::string bindingName;
141 void CheckInputMatrix(
const T& matrix,
const std::string& identifier);
148 #include "params_impl.hpp" const BindingDetails & Doc() const
Get the binding details.
Linear algebra utility functions, generally performed on matrices or vectors.
void MakeInPlaceCopy(const std::string &outputParamName, const std::string &inputParamName)
Given two (matrix) parameters, ensure that the first is an in-place copy of the second.
std::map< char, std::string > & Aliases()
Get the map of aliases.
std::map< std::string, ParamData > & Parameters()
Get the map of parameters.
This structure holds all of the information about a single parameter, including its value (which is s...
std::map< std::string, std::map< std::string, void(*)(ParamData &, const void *, void *)> > FunctionMapType
T & Get(const std::string &identifier)
Get the value of type T found for the parameter specified by identifier.
std::string GetPrintable(const std::string &identifier)
Cast the given parameter of the given type to a short, printable std::string, for use in status messa...
bool Has(const std::string &identifier) const
Return true if the specified parameter was given.
void CheckInputMatrices()
Check all input matrices for NaN and inf values, and throw an exception if any are found...
Params()
Empty constructor.
FunctionMapType functionMap
Map for functions and types.
T & GetRaw(const std::string &identifier)
Get the raw value of the parameter before any processing that Get() might normally do...
The Params class holds all information about the parameters passed to a specific binding.
This structure holds all of the information about bindings documentation.
void SetPassed(const std::string &identifier)
Set the particular parameter as passed.
const std::string & BindingName() const
Get the binding name.