mlpack::bindings::tests Namespace Reference

Classes

class  TestFunctionMap
 
class  TestOption
 A static object whose constructor registers a parameter with the IO class. More...

 

Functions

void CleanMemory (util::Params &params)
 Delete any unique pointers that are held by the IO object. More...

 
template
<
typename
T
>
void DeleteAllocatedMemory (util::ParamData &d, const void *, void *)
 
template
<
typename
T
>
void DeleteAllocatedMemoryImpl (util::ParamData &, 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
>
void DeleteAllocatedMemoryImpl (util::ParamData &, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0)
 
template
<
typename
T
>
void DeleteAllocatedMemoryImpl (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 * GetAllocatedMemory (util::ParamData &, 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
>
void * GetAllocatedMemory (util::ParamData &, const typename std::enable_if< arma::is_arma_type< T >::value >::type *=0)
 
template
<
typename
T
>
void * GetAllocatedMemory (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 GetAllocatedMemory (util::ParamData &d, const void *, void *output)
 
template
<
typename
T
>
T & GetParam (util::ParamData &d)
 This overload is called when nothing special needs to happen to the name of the parameter. More...

 
template
<
typename
T
>
void GetParam (util::ParamData &d, const void *, void *output)
 Return a parameter casted to the given type. 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. 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 just prints the filename). 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 just prints the filename). 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 mapped matrix option (this just prints the filename). More...

 
template
<
typename
T
>
void GetPrintableParam (util::ParamData &data, const void *, void *output)
 Print an option into a std::string. More...

 
template
<
typename
T
>
bool IgnoreCheck (const T &)
 Return whether or not a parameter check should be ignored. More...

 

Variables

std::string programName
 

Function Documentation

◆ CleanMemory()

void mlpack::bindings::tests::CleanMemory ( util::Params params)

Delete any unique pointers that are held by the IO object.

Referenced by MainTestFixture::CleanMemory(), KDEModel::Mode(), and RSModel::RandomBasis().

◆ DeleteAllocatedMemory()

void mlpack::bindings::tests::DeleteAllocatedMemory ( util::ParamData d,
const void *  ,
void *   
)

Definition at line 49 of file delete_allocated_memory.hpp.

◆ DeleteAllocatedMemoryImpl() [1/3]

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

Definition at line 22 of file delete_allocated_memory.hpp.

◆ DeleteAllocatedMemoryImpl() [2/3]

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

Definition at line 31 of file delete_allocated_memory.hpp.

◆ DeleteAllocatedMemoryImpl() [3/3]

void mlpack::bindings::tests::DeleteAllocatedMemoryImpl ( 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 
)

Definition at line 39 of file delete_allocated_memory.hpp.

References ParamData::value.

◆ GetAllocatedMemory() [1/4]

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

Definition at line 23 of file get_allocated_memory.hpp.

◆ GetAllocatedMemory() [2/4]

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

Definition at line 32 of file get_allocated_memory.hpp.

◆ GetAllocatedMemory() [3/4]

void* mlpack::bindings::tests::GetAllocatedMemory ( 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 
)

Definition at line 40 of file get_allocated_memory.hpp.

References ParamData::value.

◆ GetAllocatedMemory() [4/4]

void mlpack::bindings::tests::GetAllocatedMemory ( util::ParamData d,
const void *  ,
void *  output 
)

Definition at line 50 of file get_allocated_memory.hpp.

◆ GetParam() [1/2]

T& mlpack::bindings::tests::GetParam ( util::ParamData d)

This overload is called when nothing special needs to happen to the name of the parameter.

Definition at line 26 of file get_param.hpp.

References ParamData::value.

◆ GetParam() [2/2]

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

Return a parameter casted to the given type.

Type checking does not happen here!

Parameters
dParameter information.
*(input) Unused parameter.
outputPlace to store pointer to value.

Definition at line 41 of file get_param.hpp.

◆ GetPrintableParam() [1/6]

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

Print an option.

Definition at line 26 of file get_printable_param.hpp.

References ParamData::value.

◆ GetPrintableParam() [2/6]

std::string mlpack::bindings::tests::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::tests::GetPrintableParam ( util::ParamData data,
const typename std::enable_if< arma::is_arma_type< T >::value >::type *  = 0 
)

Print a matrix option (this just prints the filename).

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::tests::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 just prints the filename).

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::tests::GetPrintableParam ( util::ParamData data,
const typename std::enable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>::value >::type *  = 0 
)

Print a mapped matrix option (this just prints the filename).

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::tests::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.

Definition at line 76 of file get_printable_param.hpp.

◆ IgnoreCheck()

bool mlpack::bindings::tests::IgnoreCheck ( const T &  )
inline

Return whether or not a parameter check should be ignored.

For test bindings, we do not ignore any checks, so this always returns false.

Definition at line 24 of file ignore_check.hpp.

Variable Documentation

◆ programName

std::string programName