Chris@49
|
1 // Copyright (C) 2012 NICTA (www.nicta.com.au)
|
Chris@49
|
2 // Copyright (C) 2012 Conrad Sanderson
|
Chris@49
|
3 //
|
Chris@49
|
4 // This Source Code Form is subject to the terms of the Mozilla Public
|
Chris@49
|
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
|
Chris@49
|
6 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
Chris@49
|
7
|
Chris@49
|
8
|
Chris@49
|
9 //! \addtogroup unwrap_spmat
|
Chris@49
|
10 //! @{
|
Chris@49
|
11
|
Chris@49
|
12
|
Chris@49
|
13
|
Chris@49
|
14 template<typename T1>
|
Chris@49
|
15 struct unwrap_spmat
|
Chris@49
|
16 {
|
Chris@49
|
17 typedef typename T1::elem_type eT;
|
Chris@49
|
18
|
Chris@49
|
19 inline
|
Chris@49
|
20 unwrap_spmat(const T1& A)
|
Chris@49
|
21 : M(A)
|
Chris@49
|
22 {
|
Chris@49
|
23 arma_extra_debug_sigprint();
|
Chris@49
|
24 }
|
Chris@49
|
25
|
Chris@49
|
26 const SpMat<eT> M;
|
Chris@49
|
27 };
|
Chris@49
|
28
|
Chris@49
|
29
|
Chris@49
|
30
|
Chris@49
|
31 template<typename eT>
|
Chris@49
|
32 struct unwrap_spmat< SpMat<eT> >
|
Chris@49
|
33 {
|
Chris@49
|
34 inline
|
Chris@49
|
35 unwrap_spmat(const SpMat<eT>& A)
|
Chris@49
|
36 : M(A)
|
Chris@49
|
37 {
|
Chris@49
|
38 arma_extra_debug_sigprint();
|
Chris@49
|
39 }
|
Chris@49
|
40
|
Chris@49
|
41 const SpMat<eT>& M;
|
Chris@49
|
42 };
|
Chris@49
|
43
|
Chris@49
|
44
|
Chris@49
|
45
|
Chris@49
|
46 template<typename eT>
|
Chris@49
|
47 struct unwrap_spmat< SpRow<eT> >
|
Chris@49
|
48 {
|
Chris@49
|
49 inline
|
Chris@49
|
50 unwrap_spmat(const SpRow<eT>& A)
|
Chris@49
|
51 : M(A)
|
Chris@49
|
52 {
|
Chris@49
|
53 arma_extra_debug_sigprint();
|
Chris@49
|
54 }
|
Chris@49
|
55
|
Chris@49
|
56 const SpRow<eT>& M;
|
Chris@49
|
57 };
|
Chris@49
|
58
|
Chris@49
|
59
|
Chris@49
|
60
|
Chris@49
|
61 template<typename eT>
|
Chris@49
|
62 struct unwrap_spmat< SpCol<eT> >
|
Chris@49
|
63 {
|
Chris@49
|
64 inline
|
Chris@49
|
65 unwrap_spmat(const SpCol<eT>& A)
|
Chris@49
|
66 : M(A)
|
Chris@49
|
67 {
|
Chris@49
|
68 arma_extra_debug_sigprint();
|
Chris@49
|
69 }
|
Chris@49
|
70
|
Chris@49
|
71 const SpCol<eT>& M;
|
Chris@49
|
72 };
|
Chris@49
|
73
|
Chris@49
|
74
|
Chris@49
|
75
|
Chris@49
|
76 template<typename T1, typename spop_type>
|
Chris@49
|
77 struct unwrap_spmat< SpOp<T1, spop_type> >
|
Chris@49
|
78 {
|
Chris@49
|
79 typedef typename T1::elem_type eT;
|
Chris@49
|
80
|
Chris@49
|
81 inline
|
Chris@49
|
82 unwrap_spmat(const SpOp<T1, spop_type>& A)
|
Chris@49
|
83 : M(A)
|
Chris@49
|
84 {
|
Chris@49
|
85 arma_extra_debug_sigprint();
|
Chris@49
|
86 }
|
Chris@49
|
87
|
Chris@49
|
88 const SpMat<eT> M;
|
Chris@49
|
89 };
|
Chris@49
|
90
|
Chris@49
|
91
|
Chris@49
|
92
|
Chris@49
|
93 template<typename T1, typename T2, typename spglue_type>
|
Chris@49
|
94 struct unwrap_spmat< SpGlue<T1, T2, spglue_type> >
|
Chris@49
|
95 {
|
Chris@49
|
96 typedef typename T1::elem_type eT;
|
Chris@49
|
97
|
Chris@49
|
98 inline
|
Chris@49
|
99 unwrap_spmat(const SpGlue<T1, T2, spglue_type>& A)
|
Chris@49
|
100 : M(A)
|
Chris@49
|
101 {
|
Chris@49
|
102 arma_extra_debug_sigprint();
|
Chris@49
|
103 }
|
Chris@49
|
104
|
Chris@49
|
105 const SpMat<eT> M;
|
Chris@49
|
106 };
|
Chris@49
|
107
|
Chris@49
|
108
|
Chris@49
|
109
|
Chris@49
|
110 template<typename out_eT, typename T1, typename spop_type>
|
Chris@49
|
111 struct unwrap_spmat< mtSpOp<out_eT, T1, spop_type> >
|
Chris@49
|
112 {
|
Chris@49
|
113 inline
|
Chris@49
|
114 unwrap_spmat(const mtSpOp<out_eT, T1, spop_type>& A)
|
Chris@49
|
115 : M(A)
|
Chris@49
|
116 {
|
Chris@49
|
117 arma_extra_debug_sigprint();
|
Chris@49
|
118 }
|
Chris@49
|
119
|
Chris@49
|
120 const SpMat<out_eT> M;
|
Chris@49
|
121 };
|
Chris@49
|
122
|
Chris@49
|
123
|
Chris@49
|
124
|
Chris@49
|
125 //! @}
|