Home
Get Started
Documentation
Community
Google Summer of Code
FAQ
GitHub
Home
Get Started
Documentation
Community
Google Summer of Code
FAQ
GitHub
get_param.hpp
Go to the documentation of this file.
1
12
#ifndef MLPACK_BINDINGS_PYTHON_GET_PARAM_HPP
13
#define MLPACK_BINDINGS_PYTHON_GET_PARAM_HPP
14
15
#include <
mlpack/prereqs.hpp
>
16
17
namespace
mlpack
{
18
namespace
bindings {
19
namespace
python
{
20
25
template
<
typename
T>
26
void
GetParam
(
const
util::ParamData
& d,
27
const
void
*
/* input */
,
28
void
* output)
29
{
30
*((T**) output) =
const_cast<
T*
>
(boost::any_cast<T>(&d.
value
));
31
}
32
33
}
// namespace python
34
}
// namespace bindings
35
}
// namespace mlpack
36
37
#endif
mlpack::util::ParamData::value
boost::any value
The actual value that is held.
Definition:
param_data.hpp:82
mlpack::bindings::python::GetParam
void GetParam(const util::ParamData &d, const void *, void *output)
All Python binding types are exactly what is held in the ParamData, so no special handling is necessa...
Definition:
get_param.hpp:26
mlpack
strip_type.hpp
Definition:
add_to_po.hpp:21
prereqs.hpp
The core includes that mlpack expects; standard C++ includes and Armadillo.
python
python
Definition:
CMakeLists.txt:4
mlpack::util::ParamData
This structure holds all of the information about a single parameter, including its value (which is s...
Definition:
param_data.hpp:52