mlpack
3.4.2
mlpack-3.4.2
src
mlpack
tests
main_tests
test_helper.hpp
Go to the documentation of this file.
1
12
#ifndef MLPACK_TESTS_MAIN_TESTS_TEST_HELPER_HPP
13
#define MLPACK_TESTS_MAIN_TESTS_TEST_HELPER_HPP
14
15
#include <
mlpack/prereqs.hpp
>
16
17
namespace
mlpack
{
18
namespace
util {
19
28
template
<
typename
T>
29
void
SetInputParam
(
const
std::string& name, T&& value)
30
{
31
IO::GetParam<typename std::remove_reference<T>::type>(name) =
32
std::forward<T>(value);
33
IO::SetPassed
(name);
34
}
35
36
}
// namespace util
37
}
// namespace mlpack
38
39
#endif
prereqs.hpp
The core includes that mlpack expects; standard C++ includes and Armadillo.
mlpack
Linear algebra utility functions, generally performed on matrices or vectors.
Definition:
add_to_cli11.hpp:21
mlpack::IO::SetPassed
static void SetPassed(const std::string &name)
Mark a particular parameter as passed.
mlpack::util::SetInputParam
void SetInputParam(const std::string &name, T &&value)
Utility function that is used in binding tests for setting a parameter and marking it as passed; it u...
Definition:
test_helper.hpp:29
Generated by
1.8.20