operator_minus.hpp
Go to the documentation of this file.
1 // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
2 // Copyright (C) 2008-2010 Conrad Sanderson
3 //
4 // This file is part of the Armadillo C++ library.
5 // It is provided without any warranty of fitness
6 // for any purpose. You can redistribute this file
7 // and/or modify it under the terms of the GNU
8 // Lesser General Public License (LGPL) as published
9 // by the Free Software Foundation, either version 3
10 // of the License or (at your option) any later version.
11 // (see http://www.opensource.org/licenses for more info)
12 
13 
16 
17 
18 
20 template<typename T1>
22 const eOp<T1, eop_neg>
23 operator-
25  {
27 
28  return eOp<T1,eop_neg>(X.get_ref());
29  }
30 
31 
32 
34 template<typename T1>
36 const T1&
37 operator-
38 (const eOp<T1, eop_neg>& X)
39  {
41 
42  return X.m;
43  }
44 
45 
46 
48 template<typename T1>
51 operator-
52  (
54  const typename T1::elem_type k
55  )
56  {
58 
60  }
61 
62 
63 
65 template<typename T1>
68 operator-
69  (
70  const typename T1::elem_type k,
72  )
73  {
75 
77  }
78 
79 
80 
82 template<typename T1>
85 operator-
86  (
87  const std::complex<typename T1::pod_type>& k,
89  )
90  {
92 
93  return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_pre>('j', X.get_ref(), k);
94  }
95 
96 
97 
99 template<typename T1>
101 const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_post>
102 operator-
103  (
105  const std::complex<typename T1::pod_type>& k
106  )
107  {
109 
110  return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_post>('j', X.get_ref(), k);
111  }
112 
113 
114 
116 template<typename T1, typename T2>
119 operator-
120  (
123  )
124  {
126 
127  return eGlue<T1, T2, eglue_minus>(X.get_ref(), Y.get_ref());
128  }
129 
130 
131 
133 template<typename T1, typename T2>
134 inline
136 operator-
137  (
140  )
141  {
143 
144  typedef typename T1::elem_type eT1;
145  typedef typename T2::elem_type eT2;
146 
147  typedef typename promote_type<eT1,eT2>::result out_eT;
148 
150 
151  return mtGlue<out_eT, T1, T2, glue_mixed_minus>( X.get_ref(), Y.get_ref() );
152  }
153 
154 
155 
is_promotable< T1, T2 >::result result
static void check()
arma_inline const derived & get_ref() const
Definition: Base_meat.hpp:22
#define arma_extra_debug_sigprint
Definition: debug.hpp:1116
#define arma_inline


armadillo_matrix
Author(s):
autogenerated on Fri Apr 16 2021 02:31:58