Classes | |
class | BindingInfo |
The BindingInfo class is used by the Markdown documentation generator to store multiple documentation objects, indexed by both the binding name (i.e. More... | |
class | ExampleWrapper |
class | LongDescriptionWrapper |
class | MDOption |
The Markdown option class. More... | |
class | ProgramNameWrapper |
class | SeeAlsoWrapper |
class | ShortDescriptionWrapper |
Functions | |
template | |
void | DefaultParam (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 | |
void | GetParam (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 | |
std::string | GetPrintableParam (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 | |
std::string | GetPrintableParam (util::ParamData &data, const typename boost::enable_if< util::IsStdVector< T >>::type *=0) |
Print a vector option, with spaces between it. More... | |
template | |
std::string | GetPrintableParam (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 | |
std::string | GetPrintableParam (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 | |
std::string | GetPrintableParam (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 | |
void | GetPrintableParam (util::ParamData &data, const void *, void *output) |
Print an option into a std::string. More... | |
template | |
std::string | GetPrintableParamName (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 | |
std::string | GetPrintableParamName (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 | |
std::string | GetPrintableParamName (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 | |
std::string | GetPrintableParamName (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 | |
void | GetPrintableParamName (util::ParamData &d, const void *, void *output) |
Get the parameter's name as seen by the user. More... | |
template | |
std::string | GetPrintableParamValue (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 | |
std::string | GetPrintableParamValue (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 | |
std::string | GetPrintableParamValue (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 | |
std::string | GetPrintableParamValue (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 | |
void | GetPrintableParamValue (util::ParamData &d, const void *input, void *output) |
Get the parameter's name as seen by the user. More... | |
template | |
void | GetPrintableType (util::ParamData &data, const void *, void *output) |
Print the type of a parameter into the output string. More... | |
template | |
std::string | GetPrintableType (util::ParamData &data) |
Print the type of a parameter. More... | |
template | |
bool | IgnoreCheck (const T &t) |
Return whether or not a runtime check on parameters should be ignored. More... | |
template | |
bool | IsSerializable (const typename boost::disable_if< data::HasSerialize< T >>::type *=0) |
Return false, because the type is not serializable. More... | |
template | |
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 | |
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 | |
void | IsSerializable (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 (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 | PrintInputOptionInfo (const std::string &language) |
Print any special information about input options. 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 | |
std::string | PrintTypeDoc (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 | |
std::string | PrintValue (const T &value, bool quotes) |
Given a parameter type, print the corresponding value. More... | |
template | |
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 | ( | 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 34 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 | ( | 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 | ( | 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.
References ParamData::value.
std::string mlpack::bindings::markdown::GetPrintableParam | ( | 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.
References ParamData::value.
std::string mlpack::bindings::markdown::GetPrintableParam | ( | 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.
References ParamData::value.
std::string mlpack::bindings::markdown::GetPrintableParam | ( | 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.
References ParamData::cppType, and ParamData::value.
std::string mlpack::bindings::markdown::GetPrintableParam | ( | 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.
References ParamData::value.
void mlpack::bindings::markdown::GetPrintableParam | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 33 of file get_printable_type.hpp.
References BindingInfo::Language().
std::string mlpack::bindings::markdown::GetPrintableType | ( | util::ParamData & | data | ) |
Print the type of a parameter.
The type printed depends on the current setting of BindingInfo::Language().
Definition at line 74 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 117 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 | ( | 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 IO module. (Note that because of the way BINDING_LONG_DESC() and BINDING_EXAMPLE() is structured, this doesn't mean that all of the PARAM_*() declarataions need to come before BINDING_LONG_DESC() and BINDING_EXAMPLE() 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 any special information about input options.
|
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 | ( | 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 33 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.