Classes | |
class | GoOption |
The Go option class. More... | |
Functions | |
template < typename T > | |
void | DefaultParam (util::ParamData &data, const void *, void *output) |
Return the default value of an option. More... | |
template < typename T > | |
std::string | DefaultParamImpl (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::string >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< mlpack::data::DatasetInfo, arma::mat >>::value >::type *=0) |
Return the default value of an option. More... | |
template < typename T > | |
std::string | DefaultParamImpl (util::ParamData &data, const typename std::enable_if< util::IsStdVector< T >::value >::type *=0) |
Return the default value of a vector option. More... | |
template < typename T > | |
std::string | DefaultParamImpl (util::ParamData &data, const typename std::enable_if< std::is_same< T, std::string >::value >::type *=0) |
Return the default value of a string option. More... | |
template < typename T > | |
std::string | DefaultParamImpl (util::ParamData &data, const typename std::enable_if< arma::is_arma_type< T >::value||std::is_same< T, std::tuple< mlpack::data::DatasetInfo, arma::mat >>::value >::type *=0) |
Return the default value of a matrix option, a tuple option, a serializable option, or a string option (this returns the default filename, or '' if the default is no file). More... | |
template < typename T > | |
std::string | DefaultParamImpl (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) |
Return the default value of a model option (this returns the default filename, or '' if the default is no file). More... | |
std::string | GetBindingName (const std::string &bindingName) |
Given the name of a binding, print its Go name. More... | |
template < typename T > | |
std::string | GetGoType (util::ParamData &, 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<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
template < typename T > | |
std::string | GetGoType (util::ParamData &d, const typename std::enable_if< util::IsStdVector< T >::value >::type *=0) |
template < typename T > | |
std::string | GetGoType (util::ParamData &, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0) |
template < typename T > | |
std::string | GetGoType (util::ParamData &, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
template < typename T > | |
std::string | GetGoType (util::ParamData &d, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if< data::HasSerialize< T >::value >::type *=0) |
template < > | |
std::string | GetGoType< bool > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< bool >::value >::type *, const typename std::enable_if<!data::HasSerialize< bool >::value >::type *, const typename std::enable_if<!arma::is_arma_type< bool >::value >::type *, const typename std::enable_if<!std::is_same< bool, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *) |
template < > | |
std::string | GetGoType< double > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< double >::value >::type *, const typename std::enable_if<!data::HasSerialize< double >::value >::type *, const typename std::enable_if<!arma::is_arma_type< double >::value >::type *, const typename std::enable_if<!std::is_same< double, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *) |
template < > | |
std::string | GetGoType< float > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< float >::value >::type *, const typename std::enable_if<!data::HasSerialize< float >::value >::type *, const typename std::enable_if<!arma::is_arma_type< float >::value >::type *, const typename std::enable_if<!std::is_same< float, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *) |
template < > | |
std::string | GetGoType< int > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< int >::value >::type *, const typename std::enable_if<!data::HasSerialize< int >::value >::type *, const typename std::enable_if<!arma::is_arma_type< int >::value >::type *, const typename std::enable_if<!std::is_same< int, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *) |
template < > | |
std::string | GetGoType< std::string > (util::ParamData &, const typename std::enable_if< !util::IsStdVector< std::string >::value >::type *, const typename std::enable_if< !data::HasSerialize< std::string >::value >::type *, const typename std::enable_if< !arma::is_arma_type< std::string >::value >::type *, const typename std::enable_if<!std::is_same< std::string, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *) |
void | GetOptions (util::Params &, std::vector< std::tuple< std::string, std::string >> &) |
template<typename T , typename... Args> | |
void | GetOptions (util::Params ¶ms, std::vector< std::tuple< std::string, std::string >> &results, const std::string ¶mName, const T &value, Args... args) |
Assemble a vector of string tuples indicating parameter names and what should be printed for them. More... | |
template < typename T > | |
void | GetParam (util::ParamData &d, const void *, void *output) |
All Go 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 | GetPrintableType (util::ParamData &, 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<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
template < typename T > | |
std::string | GetPrintableType (util::ParamData &d, const typename std::enable_if< util::IsStdVector< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
template < typename T > | |
std::string | GetPrintableType (util::ParamData &, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
template < typename T > | |
std::string | GetPrintableType (util::ParamData &, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
template < typename T > | |
std::string | GetPrintableType (util::ParamData &d, 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) |
template < typename T > | |
void | GetPrintableType (util::ParamData &d, const void *, void *output) |
template < > | |
std::string | GetPrintableType< bool > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< bool >::value >::type *, const typename std::enable_if<!data::HasSerialize< bool >::value >::type *, const typename std::enable_if<!arma::is_arma_type< bool >::value >::type *, const typename std::enable_if<!std::is_same< bool, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *) |
template < > | |
std::string | GetPrintableType< double > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< double >::value >::type *, const typename std::enable_if<!data::HasSerialize< double >::value >::type *, const typename std::enable_if<!arma::is_arma_type< double >::value >::type *, const typename std::enable_if<!std::is_same< double, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *) |
template < > | |
std::string | GetPrintableType< int > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< int >::value >::type *, const typename std::enable_if<!data::HasSerialize< int >::value >::type *, const typename std::enable_if<!arma::is_arma_type< int >::value >::type *, const typename std::enable_if<!std::is_same< int, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *) |
template < > | |
std::string | GetPrintableType< std::string > (util::ParamData &, const typename std::enable_if< !util::IsStdVector< std::string >::value >::type *, const typename std::enable_if< !data::HasSerialize< std::string >::value >::type *, const typename std::enable_if< !arma::is_arma_type< std::string >::value >::type *, const typename std::enable_if<!std::is_same< std::string, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *) |
template < typename T > | |
std::string | GetType (util::ParamData &, 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<!arma::is_arma_type< T >::value >::type *=0) |
template < typename T > | |
std::string | GetType (util::ParamData &d, const typename std::enable_if< util::IsStdVector< T >::value >::type *=0) |
template < typename T > | |
std::string | GetType (util::ParamData &, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0) |
template < typename T > | |
std::string | GetType (util::ParamData &d, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if< data::HasSerialize< T >::value >::type *=0) |
template < typename T > | |
void | GetType (util::ParamData &d, const void *, void *output) |
Function is used to generate the type names that are used in calls to functions like gonumToArma<type>() or setParam<type>(), and therefore what's returned isn't exactly the Go native type used for that parameter type. More... | |
template < > | |
std::string | GetType< bool > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< bool >::value >::type *, const typename std::enable_if<!data::HasSerialize< bool >::value >::type *, const typename std::enable_if<!arma::is_arma_type< bool >::value >::type *) |
template < > | |
std::string | GetType< double > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< double >::value >::type *, const typename std::enable_if<!data::HasSerialize< double >::value >::type *, const typename std::enable_if<!arma::is_arma_type< double >::value >::type *) |
template < > | |
std::string | GetType< float > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< float >::value >::type *, const typename std::enable_if<!data::HasSerialize< float >::value >::type *, const typename std::enable_if<!arma::is_arma_type< float >::value >::type *) |
template < > | |
std::string | GetType< int > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< int >::value >::type *, const typename std::enable_if<!data::HasSerialize< int >::value >::type *, const typename std::enable_if<!arma::is_arma_type< int >::value >::type *) |
template < > | |
std::string | GetType< std::string > (util::ParamData &, const typename std::enable_if< !util::IsStdVector< std::string >::value >::type *, const typename std::enable_if< !data::HasSerialize< std::string >::value >::type *, const typename std::enable_if< !arma::is_arma_type< std::string >::value >::type *) |
bool | IgnoreCheck (const std::string ¶mName) |
Print whether or not we should ignore a check on the given parameter. More... | |
bool | IgnoreCheck (const std::vector< std::string > &constraints) |
Print whether or not we should ignore a check on the given set of constraints. More... | |
bool | IgnoreCheck (const std::vector< std::pair< std::string, bool >> &constraints, const std::string ¶mName) |
Print whether or not we should ignore a check on the given set of constraints. More... | |
std::string | ParamString (const std::string ¶mName) |
Given the parameter name, determine what it would actually be when passed to the command line. More... | |
std::string | PrintDataset (const std::string &datasetName) |
Given the name of a matrix, print it. More... | |
std::string | PrintDefault (const std::string &bindingName, const std::string ¶mName) |
Given a parameter name, print its corresponding default value. More... | |
template < typename T > | |
void | PrintDefnInput (util::ParamData &d, 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) |
Print input in method definition for a regular parameter type. More... | |
template < typename T > | |
void | PrintDefnInput (util::ParamData &d, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0) |
Print input in method definition for a matrix type. More... | |
template < typename T > | |
void | PrintDefnInput (util::ParamData &d, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Print input in method definition for a matrix with info type. More... | |
template < typename T > | |
void | PrintDefnInput (util::ParamData &d, 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 input in method definition for a serializable model. More... | |
template < typename T > | |
void | PrintDefnInput (util::ParamData &d, const void *, void *) |
Given parameter information and the current number of spaces for indentation, print the code to process the output to cout. More... | |
template < typename T > | |
void | PrintDefnOutput (util::ParamData &d, 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) |
Print output for a regular parameter type. More... | |
template < typename T > | |
void | PrintDefnOutput (util::ParamData &d, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0) |
Print output for a matrix type. More... | |
template < typename T > | |
void | PrintDefnOutput (util::ParamData &d, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Print output for a matrix with info type. More... | |
template < typename T > | |
void | PrintDefnOutput (util::ParamData &d, 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 output for a serializable model. More... | |
template < typename T > | |
void | PrintDefnOutput (util::ParamData &d, const void *, void *) |
Given parameter information and the current number of spaces for indentation, print the code to process the output to cout. More... | |
template < typename T > | |
void | PrintDoc (util::ParamData &d, const void *input, void *isLower) |
Print the docstring documentation for a given parameter. More... | |
void | PrintGo (util::Params ¶ms, const util::BindingDetails &doc, const std::string &functionName, const std::string &bindingName) |
Given a list of parameter definition and program documentation, print a generated .go file to stdout. More... | |
std::string | PrintImport () |
Print any import information for the Go binding. More... | |
std::string | PrintInputOptionInfo () |
Print any special information about input options. More... | |
std::string | PrintInputOptions (util::Params &) |
template<typename T , typename... Args> | |
std::string | PrintInputOptions (util::Params ¶ms, const std::string ¶mName, const T &value, Args... args) |
Print an input option. More... | |
template < typename T > | |
void | PrintInputProcessing (util::ParamData &d, const size_t indent, 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) |
Print input processing for a standard option type. More... | |
template < typename T > | |
void | PrintInputProcessing (util::ParamData &d, const size_t indent, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0) |
Print input processing for a matrix type. More... | |
template < typename T > | |
void | PrintInputProcessing (util::ParamData &d, const size_t indent, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Print input processing for a matrix with info type. More... | |
template < typename T > | |
void | PrintInputProcessing (util::ParamData &d, const size_t indent, 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 input processing for a serializable type. More... | |
template < typename T > | |
void | PrintInputProcessing (util::ParamData &d, const void *input, void *) |
Given parameter information and the current number of spaces for indentation, print the code to process the input to cout. More... | |
template < typename T > | |
void | PrintMethodConfig (util::ParamData &d, const size_t indent, 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) |
Print param in configuration struct for a standard option type. More... | |
template < typename T > | |
void | PrintMethodConfig (util::ParamData &d, const size_t indent, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0) |
Print param in configuration struct for a matrix type. More... | |
template < typename T > | |
void | PrintMethodConfig (util::ParamData &d, const size_t indent, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Print param in configuration struct for a matrix with info type. More... | |
template < typename T > | |
void | PrintMethodConfig (util::ParamData &d, const size_t indent, 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 param in method configuration struct for a serializable type. More... | |
template < typename T > | |
void | PrintMethodConfig (util::ParamData &d, const void *input, void *) |
Given parameter information and the current number of spaces for indentation, print the code to process the input to cout. More... | |
template < typename T > | |
void | PrintMethodInit (util::ParamData &d, const size_t indent, 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) |
Print parameter with it's default value for a standard option type. More... | |
template < typename T > | |
void | PrintMethodInit (util::ParamData &d, const size_t indent, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0) |
Print parameter with its default value for a matrix type. More... | |
template < typename T > | |
void | PrintMethodInit (util::ParamData &d, const size_t indent, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Print parameter with its default value for a matrix with info type. More... | |
template < typename T > | |
void | PrintMethodInit (util::ParamData &d, const size_t indent, 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 parameter with its default value for a serializable type. More... | |
template < typename T > | |
void | PrintMethodInit (util::ParamData &d, const void *input, void *) |
Given parameter information and the current number of spaces for indentation, print the code to process the input to cout. More... | |
std::string | PrintModel (const std::string &modelName) |
Given the name of a model, print it. More... | |
std::string | PrintOptionalInputs (util::Params &) |
template<typename T , typename... Args> | |
std::string | PrintOptionalInputs (util::Params ¶ms, const std::string ¶mName, const T &value, Args... args) |
Print an input option. More... | |
std::string | PrintOutputOptionInfo () |
Print any special information about output options. More... | |
std::string | PrintOutputOptions (util::Params &) |
template<typename... Args> | |
std::string | PrintOutputOptions (util::Params ¶ms, Args... args) |
template < typename T > | |
void | PrintOutputProcessing (util::ParamData &d, const size_t indent, 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) |
Print output processing for a regular parameter type. More... | |
template < typename T > | |
void | PrintOutputProcessing (util::ParamData &d, const size_t indent, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Print output processing for a matrix type. More... | |
template < typename T > | |
void | PrintOutputProcessing (util::ParamData &d, const size_t indent, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Print output processing for a matrix with info type. More... | |
template < typename T > | |
void | PrintOutputProcessing (util::ParamData &d, const size_t indent, 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 output processing for a serializable model. More... | |
template < typename T > | |
void | PrintOutputProcessing (util::ParamData &d, const void *, void *) |
template < typename T > | |
std::string | PrintTypeDoc (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) |
Return a string representing the command-line type of an option. More... | |
template < typename T > | |
std::string | PrintTypeDoc (util::ParamData &data, const typename std::enable_if< util::IsStdVector< T >::value >::type *=0) |
Return a string representing the command-line type of a vector. More... | |
template < typename T > | |
std::string | PrintTypeDoc (util::ParamData &data, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0) |
Return a string representing the command-line type of a matrix option. More... | |
template < typename T > | |
std::string | PrintTypeDoc (util::ParamData &data, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0) |
Return a string representing the command-line type of a matrix tuple option. More... | |
template < typename T > | |
std::string | PrintTypeDoc (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) |
Return a string representing the command-line type of a model. More... | |
template < typename T > | |
void | PrintTypeDoc (util::ParamData &data, const void *, void *output) |
Print the command-line type of an option into a string. More... | |
template < typename T > | |
std::string | PrintValue (const T &value, bool quotes) |
Given a parameter type, print the corresponding value. More... | |
template < > | |
std::string | PrintValue (const bool &value, bool quotes) |
template<typename... Args> | |
std::string | ProgramCall (const std::string &programName, Args... args) |
Given a name of a binding and a variable number of arguments (and their contents), print the corresponding function call. More... | |
std::string | ProgramCall (util::Params ¶ms, const std::string &programName) |
Given the name of a binding, print its invocation. More... | |
void | StripType (const std::string &inputType, std::string &goStrippedType, std::string &strippedType, std::string &printedType, std::string &defaultsType) |
Given an input type like, e.g., "LogisticRegression<>", return four types that can be used in Go code. More... | |
void mlpack::bindings::go::DefaultParam | ( | util::ParamData & | data, |
const void * | , | ||
void * | output | ||
) |
Return the default value of an option.
This is the function that will be placed into the IO functionMap.
Definition at line 81 of file default_param.hpp.
std::string mlpack::bindings::go::DefaultParamImpl | ( | 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::string >::value >::type * | = 0 , |
||
const typename std::enable_if<!std::is_same< T, std::tuple< mlpack::data::DatasetInfo, arma::mat >>::value >::type * | = 0 |
||
) |
Return the default value of an option.
This is for regular types.
std::string mlpack::bindings::go::DefaultParamImpl | ( | util::ParamData & | data, |
const typename std::enable_if< util::IsStdVector< T >::value >::type * | = 0 |
||
) |
Return the default value of a vector option.
std::string mlpack::bindings::go::DefaultParamImpl | ( | util::ParamData & | data, |
const typename std::enable_if< std::is_same< T, std::string >::value >::type * | = 0 |
||
) |
Return the default value of a string option.
std::string mlpack::bindings::go::DefaultParamImpl | ( | util::ParamData & | data, |
const typename std::enable_if< arma::is_arma_type< T >::value||std::is_same< T, std::tuple< mlpack::data::DatasetInfo, arma::mat >>::value >::type * | = 0 |
||
) |
Return the default value of a matrix option, a tuple option, a serializable option, or a string option (this returns the default filename, or '' if the default is no file).
std::string mlpack::bindings::go::DefaultParamImpl | ( | 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 |
||
) |
Return the default value of a model option (this returns the default filename, or '' if the default is no file).
|
inline |
Given the name of a binding, print its Go name.
|
inline |
Definition at line 26 of file get_go_type.hpp.
|
inline |
Definition at line 101 of file get_go_type.hpp.
|
inline |
Definition at line 109 of file get_go_type.hpp.
|
inline |
Definition at line 119 of file get_go_type.hpp.
|
inline |
Definition at line 128 of file get_go_type.hpp.
References ParamData::cppType, and StripType().
|
inline |
Definition at line 89 of file get_go_type.hpp.
|
inline |
Definition at line 62 of file get_go_type.hpp.
|
inline |
Definition at line 50 of file get_go_type.hpp.
|
inline |
Definition at line 38 of file get_go_type.hpp.
|
inline |
Definition at line 74 of file get_go_type.hpp.
|
inline |
void mlpack::bindings::go::GetOptions | ( | util::Params & | params, |
std::vector< std::tuple< std::string, std::string >> & | results, | ||
const std::string & | paramName, | ||
const T & | value, | ||
Args... | args | ||
) |
Assemble a vector of string tuples indicating parameter names and what should be printed for them.
(For output parameters, we just need to print the value.)
void mlpack::bindings::go::GetParam | ( | util::ParamData & | d, |
const void * | , | ||
void * | output | ||
) |
All Go 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::go::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.
std::string mlpack::bindings::go::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.
std::string mlpack::bindings::go::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.
std::string mlpack::bindings::go::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.
std::string mlpack::bindings::go::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.
void mlpack::bindings::go::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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void mlpack::bindings::go::GetPrintableType | ( | util::ParamData & | d, |
const void * | , | ||
void * | output | ||
) |
Definition at line 100 of file get_printable_type.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 25 of file get_type.hpp.
|
inline |
Definition at line 88 of file get_type.hpp.
|
inline |
Definition at line 96 of file get_type.hpp.
|
inline |
Definition at line 124 of file get_type.hpp.
References ParamData::cppType.
void mlpack::bindings::go::GetType | ( | util::ParamData & | d, |
const void * | , | ||
void * | output | ||
) |
Function is used to generate the type names that are used in calls to functions like gonumToArma<type>() or setParam<type>(), and therefore what's returned isn't exactly the Go native type used for that parameter type.
d | Parameter data struct. |
* | (input) Unused parameter. |
output | Output storage for the string. |
Definition at line 143 of file get_type.hpp.
|
inline |
Definition at line 78 of file get_type.hpp.
|
inline |
Definition at line 55 of file get_type.hpp.
|
inline |
Definition at line 45 of file get_type.hpp.
|
inline |
Definition at line 35 of file get_type.hpp.
|
inline |
Definition at line 65 of file get_type.hpp.
|
inline |
Print whether or not we should ignore a check on the given parameter.
|
inline |
Print whether or not we should ignore a check on the given set of constraints.
|
inline |
Print whether or not we should ignore a check on the given set of constraints.
|
inline |
Given the parameter name, determine what it would actually be when passed to the command line.
|
inline |
Given the name of a matrix, print it.
Here we do not need to modify anything.
|
inline |
Given a parameter name, print its corresponding default value.
void mlpack::bindings::go::PrintDefnInput | ( | util::ParamData & | d, |
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 |
||
) |
Print input in method definition for a regular parameter type.
Definition at line 29 of file print_defn_input.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintDefnInput | ( | util::ParamData & | d, |
const typename std::enable_if< arma::is_arma_type< T >::value >::type * | = 0 |
||
) |
Print input in method definition for a matrix type.
Definition at line 47 of file print_defn_input.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintDefnInput | ( | util::ParamData & | d, |
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type * | = 0 |
||
) |
Print input in method definition for a matrix with info type.
Definition at line 63 of file print_defn_input.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintDefnInput | ( | util::ParamData & | d, |
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 input in method definition for a serializable model.
Definition at line 80 of file print_defn_input.hpp.
References mlpack::util::CamelCase(), ParamData::cppType, ParamData::name, ParamData::required, and StripType().
void mlpack::bindings::go::PrintDefnInput | ( | util::ParamData & | d, |
const void * | , | ||
void * | |||
) |
Given parameter information and the current number of spaces for indentation, print the code to process the output to cout.
This code assumes that data.input is false, and should not be called when data.input is true. If this is the only output, the results will be different.
The input pointer should be a pointer to a std::tuple<size_t, bool> where the first element is the indentation and the second element is a boolean representing whether or not this is the only output parameter.
d | Parameter data struct. |
* | (input) Pointer to size_t holding the indentation. |
* | (output) Unused parameter. |
Definition at line 112 of file print_defn_input.hpp.
void mlpack::bindings::go::PrintDefnOutput | ( | util::ParamData & | d, |
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 |
||
) |
Print output for a regular parameter type.
Definition at line 28 of file print_defn_output.hpp.
void mlpack::bindings::go::PrintDefnOutput | ( | util::ParamData & | d, |
const typename std::enable_if< arma::is_arma_type< T >::value >::type * | = 0 |
||
) |
Print output for a matrix type.
Definition at line 42 of file print_defn_output.hpp.
void mlpack::bindings::go::PrintDefnOutput | ( | util::ParamData & | d, |
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type * | = 0 |
||
) |
Print output for a matrix with info type.
Definition at line 54 of file print_defn_output.hpp.
void mlpack::bindings::go::PrintDefnOutput | ( | util::ParamData & | d, |
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 output for a serializable model.
Definition at line 67 of file print_defn_output.hpp.
References ParamData::cppType, and StripType().
void mlpack::bindings::go::PrintDefnOutput | ( | util::ParamData & | d, |
const void * | , | ||
void * | |||
) |
Given parameter information and the current number of spaces for indentation, print the code to process the output to cout.
This code assumes that data.input is false, and should not be called when data.input is true. If this is the only output, the results will be different.
The input pointer should be a pointer to a std::tuple<size_t, bool> where the first element is the indentation and the second element is a boolean representing whether or not this is the only output parameter.
d | Parameter data struct. |
* | (input) Pointer to size_t holding the indentation. |
* | (output) Unused parameter. |
Definition at line 93 of file print_defn_output.hpp.
void mlpack::bindings::go::PrintDoc | ( | util::ParamData & | d, |
const void * | input, | ||
void * | isLower | ||
) |
Print the docstring documentation for a given parameter.
You are responsible for setting up the line—this does not handle indentation or anything. This is meant to produce a line of documentation describing a single parameter.
The indent parameter (void* input, which should be a pointer to a size_t) should be passed to know how much to indent for a new line.
d | Parameter data struct. |
input | Pointer to size_t containing indent. |
isLower | is pointer to bool if isLower is true then parameter is Output or Required Input. |
Definition at line 39 of file print_doc.hpp.
References mlpack::util::CamelCase(), ParamData::cppType, ParamData::desc, mlpack::util::HyphenateString(), if(), ParamData::name, ParamData::required, and ParamData::value.
void mlpack::bindings::go::PrintGo | ( | util::Params & | params, |
const util::BindingDetails & | doc, | ||
const std::string & | functionName, | ||
const std::string & | bindingName | ||
) |
Given a list of parameter definition and program documentation, print a generated .go file to stdout.
params | Instantiated Params struct with program options. |
doc | Documentation for the program. |
functionName | Name of the function (i.e. "pca"). |
bindingName | Name of the binding as registered with IO. |
|
inline |
Print any import information for the Go binding.
|
inline |
Print any special information about input options.
|
inline |
std::string mlpack::bindings::go::PrintInputOptions | ( | util::Params & | params, |
const std::string & | paramName, | ||
const T & | value, | ||
Args... | args | ||
) |
Print an input option.
This will throw an exception if the parameter does not exist in IO.
void mlpack::bindings::go::PrintInputProcessing | ( | util::ParamData & | d, |
const size_t | indent, | ||
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 |
||
) |
Print input processing for a standard option type.
This gives us code like:
// Detect if the parameter was passed; set if so. if param.Name != nil { setParam<d.cppType>(params, "paramName", param.Name) setPassed(params, "paramName") }
Definition at line 29 of file print_input_processing.hpp.
References mlpack::util::CamelCase(), ParamData::cppType, if(), ParamData::name, ParamData::required, and ParamData::value.
void mlpack::bindings::go::PrintInputProcessing | ( | util::ParamData & | d, |
const size_t | indent, | ||
const typename std::enable_if< arma::is_arma_type< T >::value >::type * | = 0 |
||
) |
Print input processing for a matrix type.
This gives us code like:
// Detect if the parameter was passed; set if so. if param.Name != nil { gonumToArma<type>(params, "paramName", param.Name) setPassed(params, "paramName") }
Definition at line 131 of file print_input_processing.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintInputProcessing | ( | util::ParamData & | d, |
const size_t | indent, | ||
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type * | = 0 |
||
) |
Print input processing for a matrix with info type.
This gives us code like:
// Detect if the parameter was passed; set if so. if param.Name != nil { gonumToArmaMatWithInfo<type>(params, "paramName", param.Name) setPassed(params, "paramName") }
Definition at line 192 of file print_input_processing.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintInputProcessing | ( | util::ParamData & | d, |
const size_t | indent, | ||
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 input processing for a serializable type.
This gives us code like:
// Detect if the parameter was passed; set if so. if param.Name != nil { set<ModelType>(params, "paramName", param.Name) setPassed(params, "paramName") }
Definition at line 254 of file print_input_processing.hpp.
References mlpack::util::CamelCase(), ParamData::cppType, ParamData::name, ParamData::required, and StripType().
void mlpack::bindings::go::PrintInputProcessing | ( | util::ParamData & | d, |
const void * | input, | ||
void * | |||
) |
Given parameter information and the current number of spaces for indentation, print the code to process the input to cout.
This code assumes that data.input is true, and should not be called when data.input is false.
The number of spaces to indent should be passed through the input pointer.
d | Parameter data struct. |
input | Pointer to size_t holding the indentation. |
* | (output) Unused parameter. |
Definition at line 325 of file print_input_processing.hpp.
void mlpack::bindings::go::PrintMethodConfig | ( | util::ParamData & | d, |
const size_t | indent, | ||
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 |
||
) |
Print param in configuration struct for a standard option type.
Definition at line 29 of file print_method_config.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintMethodConfig | ( | util::ParamData & | d, |
const size_t | indent, | ||
const typename std::enable_if< arma::is_arma_type< T >::value >::type * | = 0 |
||
) |
Print param in configuration struct for a matrix type.
Definition at line 64 of file print_method_config.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintMethodConfig | ( | util::ParamData & | d, |
const size_t | indent, | ||
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type * | = 0 |
||
) |
Print param in configuration struct for a matrix with info type.
Definition at line 96 of file print_method_config.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintMethodConfig | ( | util::ParamData & | d, |
const size_t | indent, | ||
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 param in method configuration struct for a serializable type.
Definition at line 129 of file print_method_config.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintMethodConfig | ( | util::ParamData & | d, |
const void * | input, | ||
void * | |||
) |
Given parameter information and the current number of spaces for indentation, print the code to process the input to cout.
This code assumes that data.input is true, and should not be called when data.input is false.
The number of spaces to indent should be passed through the input pointer.
d | Parameter data struct. |
input | Pointer to size_t holding the indentation. |
* | (output) Unused parameter. |
Definition at line 170 of file print_method_config.hpp.
void mlpack::bindings::go::PrintMethodInit | ( | util::ParamData & | d, |
const size_t | indent, | ||
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 |
||
) |
Print parameter with it's default value for a standard option type.
Definition at line 29 of file print_method_init.hpp.
References mlpack::util::CamelCase(), ParamData::cppType, ParamData::name, ParamData::required, and ParamData::value.
void mlpack::bindings::go::PrintMethodInit | ( | util::ParamData & | d, |
const size_t | indent, | ||
const typename std::enable_if< arma::is_arma_type< T >::value >::type * | = 0 |
||
) |
Print parameter with its default value for a matrix type.
Definition at line 86 of file print_method_init.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintMethodInit | ( | util::ParamData & | d, |
const size_t | indent, | ||
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type * | = 0 |
||
) |
Print parameter with its default value for a matrix with info type.
Definition at line 118 of file print_method_init.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintMethodInit | ( | util::ParamData & | d, |
const size_t | indent, | ||
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 parameter with its default value for a serializable type.
Definition at line 151 of file print_method_init.hpp.
References mlpack::util::CamelCase(), ParamData::name, and ParamData::required.
void mlpack::bindings::go::PrintMethodInit | ( | util::ParamData & | d, |
const void * | input, | ||
void * | |||
) |
Given parameter information and the current number of spaces for indentation, print the code to process the input to cout.
This code assumes that data.input is true, and should not be called when data.input is false.
The number of spaces to indent should be passed through the input pointer.
d | Parameter data struct. |
input | Pointer to size_t holding the indentation. |
* | (output) Unused parameter. |
Definition at line 192 of file print_method_init.hpp.
|
inline |
Given the name of a model, print it.
Here we do not need to modify anything.
|
inline |
std::string mlpack::bindings::go::PrintOptionalInputs | ( | util::Params & | params, |
const std::string & | paramName, | ||
const T & | value, | ||
Args... | args | ||
) |
Print an input option.
This will throw an exception if the parameter does not exist in IO.
|
inline |
Print any special information about output options.
|
inline |
std::string mlpack::bindings::go::PrintOutputOptions | ( | util::Params & | params, |
Args... | args | ||
) |
void mlpack::bindings::go::PrintOutputProcessing | ( | util::ParamData & | d, |
const size_t | indent, | ||
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 |
||
) |
Print output processing for a regular parameter type.
This gives us code like:
<paramName> := GetParam<Type>(params, "paramName")
Definition at line 29 of file print_output_processing.hpp.
References mlpack::util::CamelCase(), and ParamData::name.
void mlpack::bindings::go::PrintOutputProcessing | ( | util::ParamData & | d, |
const size_t | indent, | ||
const typename std::enable_if< arma::is_arma_type< T >::value >::type * | = 0 , |
||
const typename std::enable_if<!std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type * | = 0 |
||
) |
Print output processing for a matrix type.
This gives us code like:
var <paramName>Ptr mlpackArma <paramName> := <paramName>_ptr.ArmaToGonum_<Type>(params, "paramName")
Definition at line 56 of file print_output_processing.hpp.
References mlpack::util::CamelCase(), and ParamData::name.
void mlpack::bindings::go::PrintOutputProcessing | ( | util::ParamData & | d, |
const size_t | indent, | ||
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type * | = 0 |
||
) |
Print output processing for a matrix with info type.
This gives us code like:
var <paramName>_ptr mlpackArma <paramName> := <paramName>Ptr.ArmaToGonumWithInfo<Type>(params, "paramName")
Definition at line 84 of file print_output_processing.hpp.
References mlpack::util::CamelCase(), and ParamData::name.
void mlpack::bindings::go::PrintOutputProcessing | ( | util::ParamData & | d, |
const size_t | indent, | ||
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 output processing for a serializable model.
This gives us code like:
var modelOut <Type> modelOut.get<Type>(params, "paramName")
Definition at line 111 of file print_output_processing.hpp.
References mlpack::util::CamelCase(), ParamData::cppType, ParamData::name, and StripType().
void mlpack::bindings::go::PrintOutputProcessing | ( | util::ParamData & | d, |
const void * | , | ||
void * | |||
) |
d | Parameter data struct. |
* | (input) Unused parameter. |
* | (output) Unused parameter. |
Definition at line 143 of file print_output_processing.hpp.
std::string mlpack::bindings::go::PrintTypeDoc | ( | 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 |
||
) |
Return a string representing the command-line type of an option.
std::string mlpack::bindings::go::PrintTypeDoc | ( | util::ParamData & | data, |
const typename std::enable_if< util::IsStdVector< T >::value >::type * | = 0 |
||
) |
Return a string representing the command-line type of a vector.
std::string mlpack::bindings::go::PrintTypeDoc | ( | util::ParamData & | data, |
const typename std::enable_if< arma::is_arma_type< T >::value >::type * | = 0 |
||
) |
Return a string representing the command-line type of a matrix option.
std::string mlpack::bindings::go::PrintTypeDoc | ( | util::ParamData & | data, |
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type * | = 0 |
||
) |
Return a string representing the command-line type of a matrix tuple option.
std::string mlpack::bindings::go::PrintTypeDoc | ( | 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 |
||
) |
Return a string representing the command-line type of a model.
void mlpack::bindings::go::PrintTypeDoc | ( | util::ParamData & | data, |
const void * | , | ||
void * | output | ||
) |
Print the command-line type of an option into a string.
Definition at line 72 of file print_type_doc.hpp.
|
inline |
Given a parameter type, print the corresponding value.
|
inline |
std::string mlpack::bindings::go::ProgramCall | ( | const std::string & | programName, |
Args... | args | ||
) |
Given a name of a binding and a variable number of arguments (and their contents), print the corresponding function call.
|
inline |
Given the name of a binding, print its invocation.
|
inline |
Given an input type like, e.g., "LogisticRegression<>", return four types that can be used in Go code.
goStrippedType will be a type with lower first letter of parameter name so it is of unexported type in GoDoc (e.g. "logisticRegression"), strippedType will be a type with no template parameters (e.g. "LogisticRegression"), printedType will be a printable type with the template parameters (e.g. "LogisticRegression<>"), and defaultsType will be a printable type with a default template parameter (e.g. "LogisticRegression\<T\>") that can be used for class definitions.
Definition at line 30 of file strip_type.hpp.
Referenced by GetGoType(), PrintDefnInput(), PrintDefnOutput(), PrintInputProcessing(), and PrintOutputProcessing().