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<typename... Args> | |
std::string | CallMethod (const std::string &bindingName, const std::string &objectName, const std::string &methodName, Args... args) |
Print the string that calls a method from the object created. More... | |
template<typename... Args> | |
std::string | CreateObject (const std::string &bindingName, const std::string &objectName, const std::string &groupName, Args... args) |
Print the string that creates object of the given method with the given parameters. More... | |
std::string | CreateObject (const std::string &bindingName, const std::string &objectName, const std::string &groupName) |
Print the string that creates object of the given method with default parameters. More... | |
template < typename T > | |
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... | |
std::string | GetDataset (const std::string &datasetName, const std::string &url) |
Print the string that reads dataset from an online source. More... | |
std::string | GetMappedName (const std::string &methodName) |
Get the mapped name in the corresponding language. More... | |
template < typename T > | |
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 < typename T > | |
std::string | GetPrintableParam (util::ParamData &data, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!util::IsStdVector< T >::value >::type *=0, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Print an option of a simple type. More... | |
template < typename T > | |
std::string | GetPrintableParam (util::ParamData &data, const typename std::enable_if< util::IsStdVector< T >::value >::type *=0) |
Print a vector option, with spaces between it. More... | |
template < typename T > | |
std::string | GetPrintableParam (util::ParamData &data, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0) |
Print a matrix option (this prints its size). More... | |
template < typename T > | |
std::string | GetPrintableParam (util::ParamData &data, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if< data::HasSerialize< T >::value >::type *=0) |
Print a serializable class option (this prints the class name). More... | |
template < typename T > | |
std::string | GetPrintableParam (util::ParamData &data, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Print a combination DatasetInfo/matrix parameter. More... | |
template < typename T > | |
void | GetPrintableParam (util::ParamData &data, const void *, void *output) |
Print an option into a std::string. More... | |
template < typename T > | |
std::string | GetPrintableParamName (util::ParamData &data, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Get the parameter name for a type that has no special handling. More... | |
template < typename T > | |
std::string | GetPrintableParamName (util::ParamData &data, const typename std::enable_if< arma::is_arma_type< T >::value >::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 (util::ParamData &data, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if< data::HasSerialize< T >::value >::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 (util::ParamData &data, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::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 (util::ParamData &d, const void *, void *output) |
Get the parameter's name as seen by the user. More... | |
template < typename T > | |
std::string | GetPrintableParamValue (util::ParamData &data, const std::string &value, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Get the parameter name for a type that has no special handling. More... | |
template < typename T > | |
std::string | GetPrintableParamValue (util::ParamData &data, const std::string &value, const typename std::enable_if< arma::is_arma_type< T >::value >::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 (util::ParamData &data, const std::string &value, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if< data::HasSerialize< T >::value >::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 (util::ParamData &data, const std::string &value, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::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 (util::ParamData &d, const void *input, void *output) |
Get the parameter's name as seen by the user. More... | |
template < typename T > | |
void | GetPrintableType (util::ParamData &data, const void *, void *output) |
Print the type of a parameter into the output string. More... | |
template < typename T > | |
std::string | GetPrintableType (util::ParamData &data) |
Print the type of a parameter. More... | |
std::string | GetWrapperLink (const std::string &bindingName) |
std::string | GetWrapperName (const std::string &bindingName) |
Given the name of the binding, print the name for the wrapper for current language. More... | |
template < typename T > | |
bool | IgnoreCheck (const std::string &bindingName, const T &t) |
Return whether or not a runtime check on parameters should be ignored. More... | |
std::string | ImportExtLib () |
Print the import string that imports any external libs. More... | |
std::string | ImportSplit () |
Print the import string that imports mlpack's preprocess_split method. More... | |
std::string | ImportThis (const std::string &groupName) |
Import the current method. More... | |
template < typename T > | |
bool | IsSerializable (const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0) |
Return false, because the type is not serializable. More... | |
template < typename T > | |
bool | IsSerializable (const typename std::enable_if< data::HasSerialize< T >::value >::type *=0, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0) |
Return true, because the type is serializable. More... | |
template < typename T > | |
void | IsSerializable (util::ParamData &, const void *, void *output) |
Return whether or not the type is serializable. More... | |
std::string | ParamString (const std::string &bindingName, const std::string ¶mName) |
Print what a user would type to invoke the given option name. More... | |
std::string | ParamType (util::Params &p, 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 &bindingName, 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 < typename T > | |
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 < 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... | |
std::string | SplitTrainTest (const std::string &datasetName, const std::string &labelName, const std::string &trainDataset, const std::string &trainLabels, const std::string &testDataset, const std::string &testLabels, const std::string &splitRatio) |
Print the string that splits dataset into training and testing. More... | |
std::string mlpack::bindings::markdown::CallMethod | ( | const std::string & | bindingName, |
const std::string & | objectName, | ||
const std::string & | methodName, | ||
Args... | args | ||
) |
Print the string that calls a method from the object created.
std::string mlpack::bindings::markdown::CreateObject | ( | const std::string & | bindingName, |
const std::string & | objectName, | ||
const std::string & | groupName, | ||
Args... | args | ||
) |
Print the string that creates object of the given method with the given parameters.
|
inline |
Print the string that creates object of the given method with default parameters.
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.
|
inline |
Print the string that reads dataset from an online source.
|
inline |
Get the mapped name in the corresponding 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 std::enable_if<!arma::is_arma_type< T >::value >::type * | = 0 , |
||
const typename std::enable_if<!util::IsStdVector< T >::value >::type * | = 0 , |
||
const typename std::enable_if<!data::HasSerialize< T >::value >::type * | = 0 , |
||
const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::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 std::enable_if< util::IsStdVector< T >::value >::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 std::enable_if< arma::is_arma_type< T >::value >::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 std::enable_if<!arma::is_arma_type< T >::value >::type * | = 0 , |
||
const typename std::enable_if< data::HasSerialize< T >::value >::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 std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::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 std::enable_if<!arma::is_arma_type< T >::value >::type * | = 0 , |
||
const typename std::enable_if<!data::HasSerialize< T >::value >::type * | = 0 , |
||
const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::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 std::enable_if< arma::is_arma_type< T >::value >::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 std::enable_if<!arma::is_arma_type< T >::value >::type * | = 0 , |
||
const typename std::enable_if< data::HasSerialize< T >::value >::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 std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::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 std::enable_if<!arma::is_arma_type< T >::value >::type * | = 0 , |
||
const typename std::enable_if<!data::HasSerialize< T >::value >::type * | = 0 , |
||
const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::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 std::enable_if< arma::is_arma_type< T >::value >::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 std::enable_if<!arma::is_arma_type< T >::value >::type * | = 0 , |
||
const typename std::enable_if< data::HasSerialize< T >::value >::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 std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::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 |
|
inline |
Given the name of the binding, print the name for the wrapper for current language.
|
inline |
Return whether or not a runtime check on parameters should be ignored.
|
inline |
Print the import string that imports any external libs.
|
inline |
Print the import string that imports mlpack's preprocess_split method.
|
inline |
Import the current method.
bool mlpack::bindings::markdown::IsSerializable | ( | const typename std::enable_if<!data::HasSerialize< T >::value >::type * | = 0 | ) |
Return false, because the type is not serializable.
This includes Armadillo types, which we say aren't serializable (in this context) because they aren't mlpack models.
Definition at line 27 of file is_serializable.hpp.
bool mlpack::bindings::markdown::IsSerializable | ( | const typename std::enable_if< data::HasSerialize< T >::value >::type * | = 0 , |
const typename std::enable_if<!arma::is_arma_type< T >::value >::type * | = 0 |
||
) |
Return true, because the type is serializable.
Definition at line 37 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 48 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.
|
inline |
Print the string that splits dataset into training and testing.