mlpack 3.4.2
is_serializable.hpp
Go to the documentation of this file.
1
12#ifndef MLPACK_BINDINGS_MARKDOWN_IS_SERIALIZABLE_HPP
13#define MLPACK_BINDINGS_MARKDOWN_IS_SERIALIZABLE_HPP
14
15#include <mlpack/prereqs.hpp>
16
17namespace mlpack {
18namespace bindings {
19namespace markdown {
20
24template<typename T>
26 const typename boost::disable_if<data::HasSerialize<T>>::type* = 0)
27{
28 return false;
29}
30
35template<typename T>
37 const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0)
38{
39 return false;
40}
41
45template<typename T>
47 const typename boost::enable_if<data::HasSerialize<T>>::type* = 0,
48 const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0)
49{
50 return true;
51}
52
56template<typename T>
58 const void* /* input */,
59 void* output)
60{
61 *((bool*) output) = IsSerializable<typename std::remove_pointer<T>::type>();
62}
63
64} // namespace markdown
65} // namespace bindings
66} // namespace mlpack
67
68#endif
bool IsSerializable(const typename boost::disable_if< data::HasSerialize< T > >::type *=0)
Return false, because the type is not serializable.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:53