MLPACK  1.0.10
arma_traits.hpp
Go to the documentation of this file.
1 
22 #ifndef __MLPACK_CORE_UTIL_ARMA_TRAITS_HPP
23 #define __MLPACK_CORE_UTIL_ARMA_TRAITS_HPP
24 
25 // Structs have public members by default (that's why they are chosen over
26 // classes).
27 
44 template<typename VecType>
45 struct IsVector
46 {
47  const static bool value = false;
48 };
49 
50 // Commenting out the first template per case, because
51 //Visual Studio doesn't like this instantiaion pattern (error C2910).
52 //template<>
53 template<typename eT>
54 struct IsVector<arma::Col<eT> >
55 {
56  const static bool value = true;
57 };
58 
59 //template<>
60 template<typename eT>
61 struct IsVector<arma::SpCol<eT> >
62 {
63  const static bool value = true;
64 };
65 
66 //template<>
67 template<typename eT>
68 struct IsVector<arma::Row<eT> >
69 {
70  const static bool value = true;
71 };
72 
73 //template<>
74 template<typename eT>
75 struct IsVector<arma::SpRow<eT> >
76 {
77  const static bool value = true;
78 };
79 
80 //template<>
81 template<typename eT>
82 struct IsVector<arma::subview_col<eT> >
83 {
84  const static bool value = true;
85 };
86 
87 //template<>
88 template<typename eT>
89 struct IsVector<arma::subview_row<eT> >
90 {
91  const static bool value = true;
92 };
93 
94 // I'm not so sure about this one. An SpSubview object can be a row or column,
95 // but it can also be a matrix subview.
96 
97 //template<>
98 template<typename eT>
99 struct IsVector<arma::SpSubview<eT> >
100 {
101  const static bool value = true;
102 };
103 
104 #endif