13#ifndef MLPACK_CORE_UTIL_IO_HPP
14#define MLPACK_CORE_UTIL_IO_HPP
21#include <boost/any.hpp>
188 static bool HasParam(
const std::string& identifier);
232 const std::string& inputParamName);
250 static std::map<char, std::string>&
Aliases();
290 std::map<char, std::string> aliases;
292 std::map<std::string, util::ParamData> parameters;
297 typedef std::map<std::string, std::map<std::string,
303 std::map<std::string, std::tuple<std::map<std::string, util::ParamData>,
331 IO& operator=(
const IO& other);
337#include "io_impl.hpp"
Parses the command line for parameters and holds user-specified parameters.
static T & GetRawParam(const std::string &identifier)
Get the raw value of the parameter before any processing that GetParam() might normally do.
static 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.
static std::string ProgramName()
Get the program name as set by the BINDING_NAME() macro.
static void SetPassed(const std::string &name)
Mark a particular parameter as passed.
FunctionMapType functionMap
std::string programName
Holds the name of the program for –version.
static IO & GetSingleton()
Retrieve the singleton.
static void ClearSettings()
Clear all of the settings, removing all parameters and function mappings.
static bool HasParam(const std::string &identifier)
See if the specified flag was found while parsing.
std::map< std::string, std::map< std::string, void(*)(util::ParamData &, const void *, void *)> > FunctionMapType
Map for functions and types.
static void RestoreSettings(const std::string &name, const bool fatal=true)
Restore all of the parameters and function mappings of the given name, if they exist.
static T & GetParam(const std::string &identifier)
Get the value of type T found while parsing.
static std::string GetPrintableParam(const std::string &identifier)
Cast the given parameter of the given type to a short, printable std::string, for use in status messa...
util::BindingDetails doc
Holds the bindingDetails objects.
bool didParse
True, if IO was used to parse command line options.
Timers timer
Holds the timer objects.
static void StoreSettings(const std::string &name)
Take all parameters and function mappings and store them, under the given name.
static void Add(util::ParamData &&d)
Adds a parameter to the hierarchy; use the PARAM_*() macros instead of this (i.e.
static std::map< std::string, util::ParamData > & Parameters()
Return a modifiable list of parameters that IO knows about.
static std::map< char, std::string > & Aliases()
Return a modifiable list of aliases that IO knows about.
The timer class provides a way for mlpack methods to be timed.
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 bindings documentation.
This structure holds all of the information about a single parameter, including its value (which is s...