mlpack 3.4.2
parameter_type.hpp
Go to the documentation of this file.
1
13#ifndef MLPACK_BINDINGS_CLI_PARAMETER_TYPE_HPP
14#define MLPACK_BINDINGS_CLI_PARAMETER_TYPE_HPP
15
16#include <mlpack/prereqs.hpp>
17
18namespace mlpack {
19namespace bindings {
20namespace cli {
21
22// Default: HasSerialize = false.
23template<bool HasSerialize, typename T>
25{
26 typedef T type;
27};
28
29// If we have a serialize() function, then the type is a string.
30template<typename T>
31struct ParameterTypeDeducer<true, T>
32{
33 typedef std::string type;
34};
35
41template<typename T>
43{
46};
47
53template<typename eT>
54struct ParameterType<arma::Col<eT>>
55{
56 typedef std::string type;
57};
58
65template<typename eT>
66struct ParameterType<arma::Row<eT>>
67{
68 typedef std::string type;
69};
70
76template<typename eT>
77struct ParameterType<arma::Mat<eT>>
78{
79 typedef std::string type;
80};
81
85template<typename eT, typename PolicyType>
86struct ParameterType<std::tuple<mlpack::data::DatasetMapper<PolicyType,
87 std::string>, arma::Mat<eT>>>
88{
89 typedef std::string type;
90};
91
92} // namespace cli
93} // namespace bindings
94} // namespace mlpack
95
96#endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
Definition: prereqs.hpp:67
The core includes that mlpack expects; standard C++ includes and Armadillo.
Utility struct to return the type that CLI11 should accept for a given input type.
ParameterTypeDeducer< data::HasSerialize< T >::value, T >::type type