test_function_map.hpp
Go to the documentation of this file.
1 
11 #ifndef MLPACK_BINDINGS_TESTS_TEST_FUNCTION_MAP_HPP
12 #define MLPACK_BINDINGS_TESTS_TEST_FUNCTION_MAP_HPP
13 
15 
16 namespace mlpack {
17 namespace bindings {
18 namespace tests {
19 
21 {
22  public:
23  // Convenience typedef.
24  typedef std::map<std::string, std::map<std::string,
25  void (*)(util::ParamData&, const void*, void*)>> FunctionMapType;
26 
28  static TestFunctionMap& GetSingleton();
29 
34  static void RegisterFunction(
35  const std::string& tname,
36  const std::string& functionName,
37  void (*func)(util::ParamData&, const void*, void*));
38 
40  static const FunctionMapType& FunctionMap();
41 
42  private:
45 
48  FunctionMapType functionMap;
49 };
50 
51 } // namespace tests
52 } // namespace bindings
53 } // namespace mlpack
54 
55 #endif
static const FunctionMapType & FunctionMap()
Get the populated function map.
Linear algebra utility functions, generally performed on matrices or vectors.
std::map< std::string, std::map< std::string, void(*)(util::ParamData &, const void *, void *)> > FunctionMapType
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
static void RegisterFunction(const std::string &tname, const std::string &functionName, void(*func)(util::ParamData &, const void *, void *))
Register the function func for the given typename tname and the given function name functionName...
static TestFunctionMap & GetSingleton()
Get the instantiated TestFunctionMap object.