14 #ifndef MLPACK_CORE_UTIL_PARAM_CHECKS_HPP 15 #define MLPACK_CORE_UTIL_PARAM_CHECKS_HPP 52 const std::vector<std::string>& constraints,
53 const bool fatal =
true,
54 const std::string& customErrorMessage =
"",
55 const bool allowNone =
false);
88 const std::vector<std::string>& constraints,
89 const bool fatal =
true,
90 const std::string& customErrorMessage =
"");
119 util::Params& params,
120 const std::vector<std::string>& constraints,
121 const bool fatal =
true,
122 const std::string& customErrorMessage =
"");
150 const std::string& paramName,
151 const std::vector<T>&
set,
153 const std::string& errorMessage);
181 const std::string& paramName,
182 const std::function<
bool(T)>& conditional,
184 const std::string& errorMessage);
198 util::Params& params,
199 const std::vector<std::pair<std::string, bool>>& constraints,
200 const std::string& paramName);
219 const std::string& reason);
225 #include "param_checks_impl.hpp" void RequireNoneOrAllPassed(util::Params ¶ms, const std::vector< std::string > &constraints, const bool fatal=true, const std::string &customErrorMessage="")
Require that either none or all of the given parameters in the constraints set were passed to the IO ...
Linear algebra utility functions, generally performed on matrices or vectors.
void RequireParamInSet(util::Params ¶ms, const std::string ¶mName, const std::vector< T > &set, const bool fatal, const std::string &errorMessage)
Require that a given parameter is in a set of allowable parameters.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void RequireParamValue(util::Params ¶ms, const std::string ¶mName, const std::function< bool(T)> &conditional, const bool fatal, const std::string &errorMessage)
Require that a given parameter satisfies the given conditional function.
void RequireAtLeastOnePassed(util::Params ¶ms, const std::vector< std::string > &constraints, const bool fatal=true, const std::string &customErrorMessage="")
Require that at least one of the given parameters in the constraints set was passed to the IO object;...
void RequireOnlyOnePassed(util::Params ¶ms, const std::vector< std::string > &constraints, const bool fatal=true, const std::string &customErrorMessage="", const bool allowNone=false)
Require that only one of the given parameters in the constraints set was passed to the IO object; oth...
void ReportIgnoredParam(util::Params ¶ms, const std::vector< std::pair< std::string, bool >> &constraints, const std::string ¶mName)
Report that a parameter is ignored, if each of the constraints given are satisfied.