mlpack::bindings::julia Namespace Reference

Classes

class  JuliaOption
 The Julia 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 Julia name (this just returns the binding name). More...

 
template
<
typename
T
>
std::string GetJuliaType (util::ParamData &, const typename std::enable_if<!util::IsStdVector< 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, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0)
 
template
<
typename
T
>
std::string GetJuliaType (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, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0)
 
template
<
typename
T
>
std::string GetJuliaType (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, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0)
 
template
<
typename
T
>
std::string GetJuliaType (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 GetJuliaType (util::ParamData &d, const typename std::enable_if<!util::IsStdVector< T >::value >::type *=0, 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 GetJuliaType< bool > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< 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 *, const typename std::enable_if<!data::HasSerialize< bool >::value >::type *)
 
template
<
>
std::string GetJuliaType< double > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< 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 *, const typename std::enable_if<!data::HasSerialize< double >::value >::type *)
 
template
<
>
std::string GetJuliaType< int > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< 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 *, const typename std::enable_if<!data::HasSerialize< int >::value >::type *)
 
template
<
>
std::string GetJuliaType< size_t > (util::ParamData &, const typename std::enable_if<!util::IsStdVector< size_t >::value >::type *, const typename std::enable_if<!arma::is_arma_type< size_t >::value >::type *, const typename std::enable_if<!std::is_same< size_t, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *, const typename std::enable_if<!data::HasSerialize< size_t >::value >::type *)
 
template
<
>
std::string GetJuliaType< std::string > (util::ParamData &, const typename std::enable_if< !util::IsStdVector< 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 *, const typename std::enable_if< !data::HasSerialize< std::string >::value >::type *)
 
template
<
typename
T
>
void GetParam (util::ParamData &d, const void *, void *output)
 All Julia 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 &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 GetPrintableType (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 GetPrintableType (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 GetPrintableType (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 GetPrintableType (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 GetPrintableType (util::ParamData &data, const void *, void *output)
 Print the command-line type of an option into a string. More...

 
bool IgnoreCheck (const std::string &paramName)
 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 &paramName)
 Print whether or not we should ignore a check on the given set of constraints. More...

 
std::string ParamString (const std::string &paramName)
 Given the parameter name, determine what it would actually be when passed to the command line. More...

 
std::string PrintDataset (const std::string &dataset)
 Print a dataset type parameter. More...

 
std::string PrintDefault (const std::string &bindingName, const std::string &paramName)
 Given a parameter name, print its corresponding default value. More...

 
template
<
typename
T
>
void PrintDoc (util::ParamData &d, const void *, void *output)
 
std::string PrintImport (const std::string &bindingName)
 Print any imports for Julia. More...

 
std::string PrintInputOptionInfo ()
 Print any special information about input options. More...

 
std::string PrintInputOptions (util::Params &p)
 
template<typename T , typename... Args>
std::string PrintInputOptions (util::Params &p, const std::string &paramName, const T &value, Args... args)
 Print an input option. More...

 
template
<
typename
T
>
void PrintInputParam (util::ParamData &d, const void *, void *)
 Print the declaration of an input parameter as part of a line in a Julia function definition. More...

 
template
<
typename
T
>
void PrintInputProcessing (util::ParamData &d, const std::string &functionName, 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 the input processing (basically calling params.Get<>()) for a non-serializable type. More...

 
template
<
typename
T
>
void PrintInputProcessing (util::ParamData &d, const std::string &functionName, 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 the input processing for an Armadillo type. More...

 
template
<
typename
T
>
void PrintInputProcessing (util::ParamData &d, const std::string &functionName, 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 the input processing for a serializable type. More...

 
template
<
typename
T
>
void PrintInputProcessing (util::ParamData &d, const std::string &functionName, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0)
 Print the input processing (basically calling params.Get<>()) for a matrix with DatasetInfo type. More...

 
template
<
typename
T
>
void PrintInputProcessing (util::ParamData &d, const void *input, void *)
 Print the input processing (basically calling params.Get<>()) for a type. More...

 
void PrintJL (const std::string &bindingName, const std::string &functionName, const std::string &mlpackJuliaLibSuffix)
 Print the code for a .jl binding for an mlpack program to stdout. More...

 
std::string PrintModel (const std::string &model)
 Print a model type parameter. More...

 
template
<
typename
T
>
void PrintModelTypeImport (util::ParamData &, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0)
 If the type is not serializable, print nothing. More...

 
template
<
typename
T
>
void PrintModelTypeImport (util::ParamData &, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0)
 Matrices are serializable but here we also print nothing. More...

 
template
<
typename
T
>
void PrintModelTypeImport (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)
 For non-matrix serializable types we need to print something. More...

 
template
<
typename
T
>
void PrintModelTypeImport (util::ParamData &d, const void *, void *)
 If the type is serializable, print the definition of a special utility function to set a IO parameter of that type to stdout. More...

 
std::string PrintOutputOptionInfo ()
 Print any special information about output options. More...

 
std::string PrintOutputOptions (util::Params &p)
 
template<typename T , typename... Args>
std::string PrintOutputOptions (util::Params &p, const std::string &paramName, const T &value, Args... args)
 
template
<
typename
T
>
void PrintOutputProcessing (util::ParamData &d, const std::string &functionName, 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 the output processing (basically calling params.Get<>()) for a non-serializable type. More...

 
template
<
typename
T
>
void PrintOutputProcessing (util::ParamData &d, const std::string &functionName, 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 the output processing for an Armadillo type. More...

 
template
<
typename
T
>
void PrintOutputProcessing (util::ParamData &d, const std::string &functionName, 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 the output processing for a serializable type. More...

 
template
<
typename
T
>
void PrintOutputProcessing (util::ParamData &d, const std::string &functionName, const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *=0)
 Print the output processing for a mat/DatasetInfo tuple type. More...

 
template
<
typename
T
>
void PrintOutputProcessing (util::ParamData &d, const void *input, void *)
 Print the output processing (basically calling params.Get<>()) for a type. More...

 
template
<
typename
T
>
void PrintParamDefn (util::ParamData &, const std::string &, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0)
 If the type is not serializable, print nothing. More...

 
template
<
typename
T
>
void PrintParamDefn (util::ParamData &, const std::string &, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0)
 Matrices are serializable but here we also print nothing. More...

 
template
<
typename
T
>
void PrintParamDefn (util::ParamData &d, const std::string &programName, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if< data::HasSerialize< T >::value >::type *=0)
 For non-matrix serializable types we need to print something. More...

 
template
<
typename
T
>
void PrintParamDefn (util::ParamData &d, const void *input, void *)
 If the type is serializable, print the definition of a special utility function to set a IO parameter of that type to stdout. More...

 
std::string PrintType (util::ParamData &param)
 Print the type of a parameter that a user would specify from Julia. 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<!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...

 
std::string PrintTypeDocs ()
 Print documentation for each of the types. 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 &p, const std::string &programName)
 Given a name of a binding, print an example call that uses all parameters (for Markdown documentation). More...

 

Function Documentation

◆ DefaultParam()

void mlpack::bindings::julia::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.

◆ DefaultParamImpl() [1/5]

std::string mlpack::bindings::julia::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.

◆ DefaultParamImpl() [2/5]

std::string mlpack::bindings::julia::DefaultParamImpl ( util::ParamData data,
const typename std::enable_if< util::IsStdVector< T >::value >::type *  = 0 
)

Return the default value of a vector option.

◆ DefaultParamImpl() [3/5]

std::string mlpack::bindings::julia::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.

◆ DefaultParamImpl() [4/5]

std::string mlpack::bindings::julia::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).

◆ DefaultParamImpl() [5/5]

std::string mlpack::bindings::julia::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).

◆ GetBindingName()

std::string mlpack::bindings::julia::GetBindingName ( const std::string &  bindingName)
inline

Given the name of a binding, print its Julia name (this just returns the binding name).

◆ GetJuliaType() [1/5]

std::string mlpack::bindings::julia::GetJuliaType ( util::ParamData ,
const typename std::enable_if<!util::IsStdVector< 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,
const typename std::enable_if<!data::HasSerialize< T >::value >::type *  = 0 
)
inline

Definition at line 22 of file get_julia_type.hpp.

Referenced by PrintDoc().

◆ GetJuliaType() [2/5]

std::string mlpack::bindings::julia::GetJuliaType ( 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,
const typename std::enable_if<!arma::is_arma_type< T >::value >::type *  = 0 
)
inline

Definition at line 98 of file get_julia_type.hpp.

◆ GetJuliaType() [3/5]

std::string mlpack::bindings::julia::GetJuliaType ( 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,
const typename std::enable_if< arma::is_arma_type< T >::value >::type *  = 0 
)
inline

Definition at line 109 of file get_julia_type.hpp.

◆ GetJuliaType() [4/5]

std::string mlpack::bindings::julia::GetJuliaType ( util::ParamData ,
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *  = 0 
)
inline

Definition at line 127 of file get_julia_type.hpp.

◆ GetJuliaType() [5/5]

std::string mlpack::bindings::julia::GetJuliaType ( util::ParamData d,
const typename std::enable_if<!util::IsStdVector< T >::value >::type *  = 0,
const typename std::enable_if<!arma::is_arma_type< T >::value >::type *  = 0,
const typename std::enable_if< data::HasSerialize< T >::value >::type *  = 0 
)
inline

Definition at line 137 of file get_julia_type.hpp.

References ParamData::cppType, and mlpack::util::StripType().

◆ GetJuliaType< bool >()

std::string mlpack::bindings::julia::GetJuliaType< bool > ( util::ParamData ,
const typename std::enable_if<!util::IsStdVector< 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 *  ,
const typename std::enable_if<!data::HasSerialize< bool >::value >::type *   
)
inline

Definition at line 34 of file get_julia_type.hpp.

◆ GetJuliaType< double >()

std::string mlpack::bindings::julia::GetJuliaType< double > ( util::ParamData ,
const typename std::enable_if<!util::IsStdVector< 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 *  ,
const typename std::enable_if<!data::HasSerialize< double >::value >::type *   
)
inline

Definition at line 70 of file get_julia_type.hpp.

◆ GetJuliaType< int >()

std::string mlpack::bindings::julia::GetJuliaType< int > ( util::ParamData ,
const typename std::enable_if<!util::IsStdVector< 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 *  ,
const typename std::enable_if<!data::HasSerialize< int >::value >::type *   
)
inline

Definition at line 46 of file get_julia_type.hpp.

◆ GetJuliaType< size_t >()

std::string mlpack::bindings::julia::GetJuliaType< size_t > ( util::ParamData ,
const typename std::enable_if<!util::IsStdVector< size_t >::value >::type *  ,
const typename std::enable_if<!arma::is_arma_type< size_t >::value >::type *  ,
const typename std::enable_if<!std::is_same< size_t, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *  ,
const typename std::enable_if<!data::HasSerialize< size_t >::value >::type *   
)
inline

Definition at line 58 of file get_julia_type.hpp.

◆ GetJuliaType< std::string >()

std::string mlpack::bindings::julia::GetJuliaType< std::string > ( util::ParamData ,
const typename std::enable_if< !util::IsStdVector< 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 *  ,
const typename std::enable_if< !data::HasSerialize< std::string >::value >::type *   
)
inline

Definition at line 83 of file get_julia_type.hpp.

◆ GetParam()

void mlpack::bindings::julia::GetParam ( util::ParamData d,
const void *  ,
void *  output 
)

All Julia 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.

◆ GetPrintableParam() [1/6]

std::string mlpack::bindings::julia::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.

◆ GetPrintableParam() [2/6]

std::string mlpack::bindings::julia::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.

◆ GetPrintableParam() [3/6]

std::string mlpack::bindings::julia::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.

◆ GetPrintableParam() [4/6]

std::string mlpack::bindings::julia::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.

◆ GetPrintableParam() [5/6]

std::string mlpack::bindings::julia::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.

◆ GetPrintableParam() [6/6]

void mlpack::bindings::julia::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.

Parameters
dataParameter data struct.
*(input) Unused parameter.
outputOutput storage for the string.

Definition at line 114 of file get_printable_param.hpp.

◆ GetPrintableType() [1/6]

std::string mlpack::bindings::julia::GetPrintableType ( 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.

◆ GetPrintableType() [2/6]

std::string mlpack::bindings::julia::GetPrintableType ( 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.

◆ GetPrintableType() [3/6]

std::string mlpack::bindings::julia::GetPrintableType ( 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.

◆ GetPrintableType() [4/6]

std::string mlpack::bindings::julia::GetPrintableType ( 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.

◆ GetPrintableType() [5/6]

std::string mlpack::bindings::julia::GetPrintableType ( 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.

◆ GetPrintableType() [6/6]

void mlpack::bindings::julia::GetPrintableType ( util::ParamData data,
const void *  ,
void *  output 
)

Print the command-line type of an option into a string.

Definition at line 70 of file get_printable_type.hpp.

◆ IgnoreCheck() [1/3]

bool mlpack::bindings::julia::IgnoreCheck ( const std::string &  paramName)
inline

Print whether or not we should ignore a check on the given parameter.

For Julia bindings, we ignore any checks on output parameters, so if paramName is an output parameter, this returns true.

◆ IgnoreCheck() [2/3]

bool mlpack::bindings::julia::IgnoreCheck ( const std::vector< std::string > &  constraints)
inline

Print whether or not we should ignore a check on the given set of constraints.

For Julia bindings, we ignore any checks on output parameters, so if any parameter is an output parameter, this returns true.

◆ IgnoreCheck() [3/3]

bool mlpack::bindings::julia::IgnoreCheck ( const std::vector< std::pair< std::string, bool >> &  constraints,
const std::string &  paramName 
)
inline

Print whether or not we should ignore a check on the given set of constraints.

For Julia bindings, we ignore any checks on output parameters, so if any constraint parameter or the main parameter are output parameters, this returns true.

◆ ParamString()

std::string mlpack::bindings::julia::ParamString ( const std::string &  paramName)
inline

Given the parameter name, determine what it would actually be when passed to the command line.

◆ PrintDataset()

std::string mlpack::bindings::julia::PrintDataset ( const std::string &  dataset)
inline

Print a dataset type parameter.

◆ PrintDefault()

std::string mlpack::bindings::julia::PrintDefault ( const std::string &  bindingName,
const std::string &  paramName 
)
inline

Given a parameter name, print its corresponding default value.

◆ PrintDoc()

void mlpack::bindings::julia::PrintDoc ( util::ParamData d,
const void *  ,
void *  output 
)

◆ PrintImport()

std::string mlpack::bindings::julia::PrintImport ( const std::string &  bindingName)
inline

Print any imports for Julia.

◆ PrintInputOptionInfo()

std::string mlpack::bindings::julia::PrintInputOptionInfo ( )
inline

Print any special information about input options.

◆ PrintInputOptions() [1/2]

std::string mlpack::bindings::julia::PrintInputOptions ( util::Params p)
inline

◆ PrintInputOptions() [2/2]

std::string mlpack::bindings::julia::PrintInputOptions ( util::Params p,
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. For a parameter 'x' with value '5', this will print something like x=5.

◆ PrintInputParam()

void mlpack::bindings::julia::PrintInputParam ( util::ParamData d,
const void *  ,
void *   
)

Print the declaration of an input parameter as part of a line in a Julia function definition.

This doesn't include any commas or anything.

Definition at line 27 of file print_input_param.hpp.

References if(), ParamData::name, and ParamData::required.

◆ PrintInputProcessing() [1/5]

void mlpack::bindings::julia::PrintInputProcessing ( util::ParamData d,
const std::string &  functionName,
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 the input processing (basically calling params.Get<>()) for a non-serializable type.

◆ PrintInputProcessing() [2/5]

void mlpack::bindings::julia::PrintInputProcessing ( util::ParamData d,
const std::string &  functionName,
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 the input processing for an Armadillo type.

◆ PrintInputProcessing() [3/5]

void mlpack::bindings::julia::PrintInputProcessing ( util::ParamData d,
const std::string &  functionName,
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 the input processing for a serializable type.

◆ PrintInputProcessing() [4/5]

void mlpack::bindings::julia::PrintInputProcessing ( util::ParamData d,
const std::string &  functionName,
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *  = 0 
)

Print the input processing (basically calling params.Get<>()) for a matrix with DatasetInfo type.

◆ PrintInputProcessing() [5/5]

void mlpack::bindings::julia::PrintInputProcessing ( util::ParamData d,
const void *  input,
void *   
)

Print the input processing (basically calling params.Get<>()) for a type.

Definition at line 70 of file print_input_processing.hpp.

◆ PrintJL()

void mlpack::bindings::julia::PrintJL ( const std::string &  bindingName,
const std::string &  functionName,
const std::string &  mlpackJuliaLibSuffix 
)

Print the code for a .jl binding for an mlpack program to stdout.

◆ PrintModel()

std::string mlpack::bindings::julia::PrintModel ( const std::string &  model)
inline

Print a model type parameter.

◆ PrintModelTypeImport() [1/4]

void mlpack::bindings::julia::PrintModelTypeImport ( util::ParamData ,
const typename std::enable_if<!arma::is_arma_type< T >::value >::type *  = 0,
const typename std::enable_if<!data::HasSerialize< T >::value >::type *  = 0 
)

If the type is not serializable, print nothing.

Definition at line 26 of file print_model_type_import.hpp.

◆ PrintModelTypeImport() [2/4]

void mlpack::bindings::julia::PrintModelTypeImport ( util::ParamData ,
const typename std::enable_if< arma::is_arma_type< T >::value >::type *  = 0 
)

Matrices are serializable but here we also print nothing.

Definition at line 38 of file print_model_type_import.hpp.

◆ PrintModelTypeImport() [3/4]

void mlpack::bindings::julia::PrintModelTypeImport ( 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 
)

For non-matrix serializable types we need to print something.

Definition at line 49 of file print_model_type_import.hpp.

References ParamData::cppType, and mlpack::util::StripType().

◆ PrintModelTypeImport() [4/4]

void mlpack::bindings::julia::PrintModelTypeImport ( util::ParamData d,
const void *  ,
void *   
)

If the type is serializable, print the definition of a special utility function to set a IO parameter of that type to stdout.

Definition at line 66 of file print_model_type_import.hpp.

◆ PrintOutputOptionInfo()

std::string mlpack::bindings::julia::PrintOutputOptionInfo ( )
inline

Print any special information about output options.

◆ PrintOutputOptions() [1/2]

std::string mlpack::bindings::julia::PrintOutputOptions ( util::Params p)
inline

◆ PrintOutputOptions() [2/2]

std::string mlpack::bindings::julia::PrintOutputOptions ( util::Params p,
const std::string &  paramName,
const T &  value,
Args...  args 
)

◆ PrintOutputProcessing() [1/5]

void mlpack::bindings::julia::PrintOutputProcessing ( util::ParamData d,
const std::string &  functionName,
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 the output processing (basically calling params.Get<>()) for a non-serializable type.

◆ PrintOutputProcessing() [2/5]

void mlpack::bindings::julia::PrintOutputProcessing ( util::ParamData d,
const std::string &  functionName,
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 the output processing for an Armadillo type.

◆ PrintOutputProcessing() [3/5]

void mlpack::bindings::julia::PrintOutputProcessing ( util::ParamData d,
const std::string &  functionName,
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 the output processing for a serializable type.

◆ PrintOutputProcessing() [4/5]

void mlpack::bindings::julia::PrintOutputProcessing ( util::ParamData d,
const std::string &  functionName,
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *  = 0 
)

Print the output processing for a mat/DatasetInfo tuple type.

◆ PrintOutputProcessing() [5/5]

void mlpack::bindings::julia::PrintOutputProcessing ( util::ParamData d,
const void *  input,
void *   
)

Print the output processing (basically calling params.Get<>()) for a type.

Definition at line 71 of file print_output_processing.hpp.

◆ PrintParamDefn() [1/4]

void mlpack::bindings::julia::PrintParamDefn ( util::ParamData ,
const std::string &  ,
const typename std::enable_if<!arma::is_arma_type< T >::value >::type *  = 0,
const typename std::enable_if<!data::HasSerialize< T >::value >::type *  = 0 
)

If the type is not serializable, print nothing.

Definition at line 26 of file print_param_defn.hpp.

◆ PrintParamDefn() [2/4]

void mlpack::bindings::julia::PrintParamDefn ( util::ParamData ,
const std::string &  ,
const typename std::enable_if< arma::is_arma_type< T >::value >::type *  = 0 
)

Matrices are serializable but here we also print nothing.

Definition at line 39 of file print_param_defn.hpp.

◆ PrintParamDefn() [3/4]

void mlpack::bindings::julia::PrintParamDefn ( util::ParamData d,
const std::string &  programName,
const typename std::enable_if<!arma::is_arma_type< T >::value >::type *  = 0,
const typename std::enable_if< data::HasSerialize< T >::value >::type *  = 0 
)

For non-matrix serializable types we need to print something.

Definition at line 51 of file print_param_defn.hpp.

References ParamData::cppType, and mlpack::util::StripType().

◆ PrintParamDefn() [4/4]

void mlpack::bindings::julia::PrintParamDefn ( util::ParamData d,
const void *  input,
void *   
)

If the type is serializable, print the definition of a special utility function to set a IO parameter of that type to stdout.

Definition at line 169 of file print_param_defn.hpp.

◆ PrintType()

std::string mlpack::bindings::julia::PrintType ( util::ParamData param)
inline

Print the type of a parameter that a user would specify from Julia.

◆ PrintTypeDoc() [1/6]

std::string mlpack::bindings::julia::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.

◆ PrintTypeDoc() [2/6]

std::string mlpack::bindings::julia::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.

◆ PrintTypeDoc() [3/6]

std::string mlpack::bindings::julia::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.

◆ PrintTypeDoc() [4/6]

std::string mlpack::bindings::julia::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.

◆ PrintTypeDoc() [5/6]

std::string mlpack::bindings::julia::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.

◆ PrintTypeDoc() [6/6]

void mlpack::bindings::julia::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.

◆ PrintTypeDocs()

std::string mlpack::bindings::julia::PrintTypeDocs ( )
inline

Print documentation for each of the types.

◆ PrintValue() [1/2]

std::string mlpack::bindings::julia::PrintValue ( const T &  value,
bool  quotes 
)
inline

Given a parameter type, print the corresponding value.

◆ PrintValue() [2/2]

std::string mlpack::bindings::julia::PrintValue ( const bool &  value,
bool  quotes 
)
inline

◆ ProgramCall() [1/2]

std::string mlpack::bindings::julia::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.

◆ ProgramCall() [2/2]

std::string mlpack::bindings::julia::ProgramCall ( util::Params p,
const std::string &  programName 
)
inline

Given a name of a binding, print an example call that uses all parameters (for Markdown documentation).