Classes | |
class | BindingInfo |
The BindingInfo class is used by the Markdown documentation generator to store multiple ProgramDoc objects, indexed by both the binding name (i.e. More... | |
class | MDOption |
The Markdown option class. More... | |
class | ProgramDocWrapper |
Functions | |
template < typename T > | |
void | DefaultParam (const util::ParamData &data, const void *, void *output) |
Print the default value of a parameter into the output string. More... | |
std::string | GetBindingName (const std::string &bindingName) |
Given the name of the binding, print the name for the current language (as given by BindingInfo). More... | |
std::string | GetBindingName (const std::string &language, const std::string &name) |
Given a language name and a binding name, return the name of that binding for that language. More... | |
template < typename T > | |
void | GetParam (const util::ParamData &d, const void *, void *output) |
All Markdown binding types are exactly what is held in the ParamData, so no special handling is necessary. More... | |
template < typename T > | |
std::string | GetPrintableParam (const util::ParamData &data, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< util::IsStdVector< T >>::type *=0, const typename boost::disable_if< data::HasSerialize< T >>::type *=0, const typename boost::disable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type *=0) |
Print an option of a simple type. More... | |
template < typename T > | |
std::string | GetPrintableParam (const util::ParamData &data, const typename boost::enable_if< util::IsStdVector< T >>::type *=0) |
Print a vector option, with spaces between it. More... | |
template < typename T > | |
std::string | GetPrintableParam (const util::ParamData &data, const typename boost::enable_if< arma::is_arma_type< T >>::type *=0) |
Print a matrix option (this prints its size). More... | |
template < typename T > | |
std::string | GetPrintableParam (const util::ParamData &data, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::enable_if< data::HasSerialize< T >>::type *=0) |
Print a serializable class option (this prints the class name). More... | |
template < typename T > | |
std::string | GetPrintableParam (const util::ParamData &data, const typename boost::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type *=0) |
Print a combination DatasetInfo/matrix parameter. More... | |
template < typename T > | |
void | GetPrintableParam (const util::ParamData &data, const void *, void *output) |
Print an option into a std::string. More... | |
template < typename T > | |
std::string | GetPrintableParamName (const util::ParamData &data, 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< data::DatasetInfo, arma::mat >>>::type *=0) |
Get the parameter name for a type that has no special handling. More... | |
template < typename T > | |
std::string | GetPrintableParamName (const util::ParamData &data, const typename boost::enable_if< arma::is_arma_type< T >>::type *=0) |
Get the parameter name for a matrix type (where the user has to pass the file that holds the matrix). More... | |
template < typename T > | |
std::string | GetPrintableParamName (const util::ParamData &data, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::enable_if< data::HasSerialize< T >>::type *=0) |
Get the parameter name for a serializable model type (where the user has to pass the file that holds the matrix). More... | |
template < typename T > | |
std::string | GetPrintableParamName (const util::ParamData &data, const typename boost::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type *=0) |
Get the parameter name for a mapped matrix type (where the user has to pass the file that holds the matrix). More... | |
template < typename T > | |
void | GetPrintableParamName (const util::ParamData &d, const void *, void *output) |
Get the parameter's name as seen by the user. More... | |
template < typename T > | |
std::string | GetPrintableParamValue (const util::ParamData &data, const std::string &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< data::DatasetInfo, arma::mat >>>::type *=0) |
Get the parameter name for a type that has no special handling. More... | |
template < typename T > | |
std::string | GetPrintableParamValue (const util::ParamData &data, const std::string &value, const typename boost::enable_if< arma::is_arma_type< T >>::type *=0) |
Get the parameter name for a matrix type (where the user has to pass the file that holds the matrix). More... | |
template < typename T > | |
std::string | GetPrintableParamValue (const util::ParamData &data, const std::string &value, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::enable_if< data::HasSerialize< T >>::type *=0) |
Get the parameter name for a serializable model type (where the user has to pass the file that holds the matrix). More... | |
template < typename T > | |
std::string | GetPrintableParamValue (const util::ParamData &data, const std::string &value, const typename boost::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type *=0) |
Get the parameter name for a mapped matrix type (where the user has to pass the file that holds the matrix). More... | |
template < typename T > | |
void | GetPrintableParamValue (const util::ParamData &d, const void *input, void *output) |
Get the parameter's name as seen by the user. More... | |
template < typename T > | |
void | GetPrintableType (const util::ParamData &data, const void *, void *output) |
Print the type of a parameter into the output string. More... | |
template < typename T > | |
std::string | GetPrintableType (const util::ParamData &data) |
Print the type of a parameter. More... | |
template < typename T > | |
bool | IgnoreCheck (const T &t) |
Return whether or not a runtime check on parameters should be ignored. More... | |
template < typename T > | |
bool | IsSerializable (const typename boost::disable_if< data::HasSerialize< T >>::type *=0) |
Return false, because the type is not serializable. More... | |
template < typename T > | |
bool | IsSerializable (const typename boost::enable_if< arma::is_arma_type< T >>::type *=0) |
Return false, because even though the type is serializable, it is an Armadillo type not an mlpack model. More... | |
template < typename T > | |
bool | IsSerializable (const typename boost::enable_if< data::HasSerialize< T >>::type *=0, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0) |
Return true, because the type is serializable. More... | |
template < typename T > | |
void | IsSerializable (const util::ParamData &, const void *, void *output) |
Return whether or not the type is serializable. More... | |
std::string | ParamString (const std::string ¶mName) |
Print what a user would type to invoke the given option name. More... | |
std::string | ParamType (const util::ParamData &d) |
Print the user-encountered type of an option. More... | |
std::string | PrintDataset (const std::string &dataset) |
Print a dataset type parameter (add .csv and return). More... | |
std::string | PrintDefault (const std::string ¶mName) |
Print the default value of an option, unless it is required (in which case Markdown italicized '–' is printed). More... | |
std::string | PrintImport (const std::string &bindingName) |
Print any imports that need to be done before using the binding. More... | |
std::string | PrintLanguage (const std::string &language) |
Print the name of the given language. More... | |
std::string | PrintModel (const std::string &model) |
Print a model type parameter (add .bin and return). More... | |
std::string | PrintOutputOptionInfo (const std::string &language) |
Print any special information about output options. More... | |
template < typename T > | |
std::string | PrintTypeDoc (const util::ParamData &data) |
Print the type of a parameter into the output string. More... | |
std::string | PrintTypeDocs () |
Print details about the different types for a language. More... | |
template < typename T > | |
std::string | PrintValue (const T &value, bool quotes) |
Given a parameter type, print the corresponding value. More... | |
template<typename... Args> | |
std::string | ProgramCall (const std::string &programName, Args... args) |
Given a program name and arguments for it, print what its invocation would be. More... | |
std::string | ProgramCall (const std::string &programName) |
Given a program name, print a call assuming that all arguments are specified. More... | |
void mlpack::bindings::markdown::DefaultParam | ( | const util::ParamData & | data, |
const void * | , | ||
void * | output | ||
) |
Print the default value of a parameter into the output string.
The type printed depends on the current setting of BindingInfo::Language().
Definition at line 31 of file default_param.hpp.
References BindingInfo::Language().
|
inline |
Given the name of the binding, print the name for the current language (as given by BindingInfo).
std::string mlpack::bindings::markdown::GetBindingName | ( | const std::string & | language, |
const std::string & | name | ||
) |
Given a language name and a binding name, return the name of that binding for that language.
Note that if a new language is added to the mlpack bindings, this method will need to be updated so that documentation can be successfully generated for that language.
void mlpack::bindings::markdown::GetParam | ( | const util::ParamData & | d, |
const void * | , | ||
void * | output | ||
) |
All Markdown binding types are exactly what is held in the ParamData, so no special handling is necessary.
Definition at line 26 of file get_param.hpp.
References ParamData::value.
std::string mlpack::bindings::markdown::GetPrintableParam | ( | const util::ParamData & | data, |
const typename boost::disable_if< arma::is_arma_type< T >>::type * | = 0 , |
||
const typename boost::disable_if< util::IsStdVector< T >>::type * | = 0 , |
||
const typename boost::disable_if< data::HasSerialize< T >>::type * | = 0 , |
||
const typename boost::disable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type * | = 0 |
||
) |
Print an option of a simple type.
Print an option.
Definition at line 26 of file get_printable_param.hpp.
std::string mlpack::bindings::markdown::GetPrintableParam | ( | const util::ParamData & | data, |
const typename boost::enable_if< util::IsStdVector< T >>::type * | = 0 |
||
) |
Print a vector option, with spaces between it.
Definition at line 43 of file get_printable_param.hpp.
std::string mlpack::bindings::markdown::GetPrintableParam | ( | const util::ParamData & | data, |
const typename boost::enable_if< arma::is_arma_type< T >>::type * | = 0 |
||
) |
Print a matrix option (this prints its size).
Print a matrix option (this just prints the filename).
Definition at line 59 of file get_printable_param.hpp.
std::string mlpack::bindings::markdown::GetPrintableParam | ( | const util::ParamData & | data, |
const typename boost::disable_if< arma::is_arma_type< T >>::type * | = 0 , |
||
const typename boost::enable_if< data::HasSerialize< T >>::type * | = 0 |
||
) |
Print a serializable class option (this prints the class name).
Print a serializable class option (this just prints the filename).
Print a model option (this just prints the filename).
Definition at line 75 of file get_printable_param.hpp.
std::string mlpack::bindings::markdown::GetPrintableParam | ( | const util::ParamData & | data, |
const typename boost::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type * | = 0 |
||
) |
Print a combination DatasetInfo/matrix parameter.
Print a mapped matrix option (this just prints the filename).
Definition at line 89 of file get_printable_param.hpp.
void mlpack::bindings::markdown::GetPrintableParam | ( | const util::ParamData & | data, |
const void * | , | ||
void * | output | ||
) |
Print an option into a std::string.
This should print a short, one-line representation of the object. The string will be stored in the output pointer.
data | Parameter data struct. |
input | Unused parameter. |
output | Output storage for the string. |
Definition at line 114 of file get_printable_param.hpp.
std::string mlpack::bindings::markdown::GetPrintableParamName | ( | const util::ParamData & | data, |
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< data::DatasetInfo, arma::mat >>>::type * | = 0 |
||
) |
Get the parameter name for a type that has no special handling.
std::string mlpack::bindings::markdown::GetPrintableParamName | ( | const util::ParamData & | data, |
const typename boost::enable_if< arma::is_arma_type< T >>::type * | = 0 |
||
) |
Get the parameter name for a matrix type (where the user has to pass the file that holds the matrix).
std::string mlpack::bindings::markdown::GetPrintableParamName | ( | const util::ParamData & | data, |
const typename boost::disable_if< arma::is_arma_type< T >>::type * | = 0 , |
||
const typename boost::enable_if< data::HasSerialize< T >>::type * | = 0 |
||
) |
Get the parameter name for a serializable model type (where the user has to pass the file that holds the matrix).
std::string mlpack::bindings::markdown::GetPrintableParamName | ( | const util::ParamData & | data, |
const typename boost::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type * | = 0 |
||
) |
Get the parameter name for a mapped matrix type (where the user has to pass the file that holds the matrix).
void mlpack::bindings::markdown::GetPrintableParamName | ( | const util::ParamData & | d, |
const void * | , | ||
void * | output | ||
) |
Get the parameter's name as seen by the user.
Definition at line 67 of file get_printable_param_name.hpp.
std::string mlpack::bindings::markdown::GetPrintableParamValue | ( | const util::ParamData & | data, |
const std::string & | 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< data::DatasetInfo, arma::mat >>>::type * | = 0 |
||
) |
Get the parameter name for a type that has no special handling.
std::string mlpack::bindings::markdown::GetPrintableParamValue | ( | const util::ParamData & | data, |
const std::string & | value, | ||
const typename boost::enable_if< arma::is_arma_type< T >>::type * | = 0 |
||
) |
Get the parameter name for a matrix type (where the user has to pass the file that holds the matrix).
std::string mlpack::bindings::markdown::GetPrintableParamValue | ( | const util::ParamData & | data, |
const std::string & | value, | ||
const typename boost::disable_if< arma::is_arma_type< T >>::type * | = 0 , |
||
const typename boost::enable_if< data::HasSerialize< T >>::type * | = 0 |
||
) |
Get the parameter name for a serializable model type (where the user has to pass the file that holds the matrix).
std::string mlpack::bindings::markdown::GetPrintableParamValue | ( | const util::ParamData & | data, |
const std::string & | value, | ||
const typename boost::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type * | = 0 |
||
) |
Get the parameter name for a mapped matrix type (where the user has to pass the file that holds the matrix).
void mlpack::bindings::markdown::GetPrintableParamValue | ( | const util::ParamData & | d, |
const void * | input, | ||
void * | output | ||
) |
Get the parameter's name as seen by the user.
Definition at line 71 of file get_printable_param_value.hpp.
void mlpack::bindings::markdown::GetPrintableType | ( | const util::ParamData & | data, |
const void * | , | ||
void * | output | ||
) |
Print the type of a parameter into the output string.
The type printed depends on the current setting of BindingInfo::Language().
Definition at line 30 of file get_printable_type.hpp.
References BindingInfo::Language().
std::string mlpack::bindings::markdown::GetPrintableType | ( | const util::ParamData & | data | ) |
Print the type of a parameter.
The type printed depends on the current setting of BindingInfo::Language().
Definition at line 56 of file get_printable_type.hpp.
|
inline |
Return whether or not a runtime check on parameters should be ignored.
We don't ignore any runtime checks for CLI bindings, so this always returns false.
Return whether or not a runtime check on parameters should be ignored.
For test bindings, we do not ignore any checks, so this always returns false.
Definition at line 111 of file print_doc_functions.hpp.
bool mlpack::bindings::markdown::IsSerializable | ( | const typename boost::disable_if< data::HasSerialize< T >>::type * | = 0 | ) |
Return false, because the type is not serializable.
Definition at line 25 of file is_serializable.hpp.
bool mlpack::bindings::markdown::IsSerializable | ( | const typename boost::enable_if< arma::is_arma_type< T >>::type * | = 0 | ) |
Return false, because even though the type is serializable, it is an Armadillo type not an mlpack model.
Definition at line 36 of file is_serializable.hpp.
bool mlpack::bindings::markdown::IsSerializable | ( | const typename boost::enable_if< data::HasSerialize< T >>::type * | = 0 , |
const typename boost::disable_if< arma::is_arma_type< T >>::type * | = 0 |
||
) |
Return true, because the type is serializable.
Definition at line 46 of file is_serializable.hpp.
void mlpack::bindings::markdown::IsSerializable | ( | const util::ParamData & | , |
const void * | , | ||
void * | output | ||
) |
Return whether or not the type is serializable.
Definition at line 57 of file is_serializable.hpp.
|
inline |
Print what a user would type to invoke the given option name.
Note that the name must exist in the CLI module. (Note that because of the way ProgramInfo is structured, this doesn't mean that all of the PARAM_*() declarataions need to come before the PROGRAM_INFO() declaration.)
|
inline |
Print the user-encountered type of an option.
|
inline |
Print a dataset type parameter (add .csv and return).
|
inline |
Print the default value of an option, unless it is required (in which case Markdown italicized '–' is printed).
|
inline |
Print any imports that need to be done before using the binding.
|
inline |
Print the name of the given language.
|
inline |
Print a model type parameter (add .bin and return).
|
inline |
Print any special information about output options.
std::string mlpack::bindings::markdown::PrintTypeDoc | ( | const util::ParamData & | data | ) |
Print the type of a parameter into the output string.
The type printed depends on the current setting of BindingInfo::Language().
Definition at line 30 of file print_type_doc.hpp.
References BindingInfo::Language().
|
inline |
Print details about the different types for a language.
|
inline |
Given a parameter type, print the corresponding value.
std::string mlpack::bindings::markdown::ProgramCall | ( | const std::string & | programName, |
Args... | args | ||
) |
Given a program name and arguments for it, print what its invocation would be.
|
inline |
Given a program name, print a call assuming that all arguments are specified.