source: mmcs/armadillo_bits/unwrap_spmat.hpp @ 8ad4484

matrices
Last change on this file since 8ad4484 was 9dd61b1, checked in by rboet <rboet@…>, 9 years ago

Avance del proyecto 60%

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