14 #ifndef MLPACK_CORE_UTIL_PARAM_CHECKS_HPP 15 #define MLPACK_CORE_UTIL_PARAM_CHECKS_HPP 48 const std::vector<std::string>& constraints,
49 const bool fatal =
true,
50 const std::string& customErrorMessage =
"");
81 const std::vector<std::string>& constraints,
82 const bool fatal =
true,
83 const std::string& customErrorMessage =
"");
111 const std::vector<std::string>& constraints,
112 const bool fatal =
true,
113 const std::string& customErrorMessage =
"");
140 const std::vector<T>&
set,
142 const std::string& errorMessage);
169 const std::function<
bool(T)>& conditional,
171 const std::string& errorMessage);
184 const std::vector<std::pair<std::string, bool>>& constraints,
185 const std::string& paramName);
204 const std::string& reason);
210 #include "param_checks_impl.hpp"
void RequireOnlyOnePassed(const std::vector< std::string > &constraints, const bool fatal=true, const std::string &customErrorMessage="")
Require that only one of the given parameters in the constraints set was passed to the CLI object; ot...
void RequireAtLeastOnePassed(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 CLI object...
The core includes that mlpack expects; standard C++ includes and Armadillo.
void ReportIgnoredParam(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.
void RequireNoneOrAllPassed(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 CLI...
void RequireParamInSet(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.
void RequireParamValue(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.