Mercurial > octave-nkf
comparison src/OPERATORS/op-sm-cm.cc @ 11586:12df7854fa7c
strip trailing whitespace from source files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:24:59 -0500 |
parents | fd0a3ac60b0e |
children | 72c96de7a403 |
comparison
equal
deleted
inserted
replaced
11585:1473d0cf86d2 | 11586:12df7854fa7c |
---|---|
46 | 46 |
47 DEFBINOP_OP (mul, sparse_matrix, complex_matrix, *) | 47 DEFBINOP_OP (mul, sparse_matrix, complex_matrix, *) |
48 | 48 |
49 DEFBINOP (div, sparse_matrix, complex_matrix) | 49 DEFBINOP (div, sparse_matrix, complex_matrix) |
50 { | 50 { |
51 CAST_BINOP_ARGS (const octave_sparse_matrix&, | 51 CAST_BINOP_ARGS (const octave_sparse_matrix&, |
52 const octave_complex_matrix&); | 52 const octave_complex_matrix&); |
53 MatrixType typ = v2.matrix_type (); | 53 MatrixType typ = v2.matrix_type (); |
54 | 54 |
55 ComplexMatrix ret = xdiv (v1.matrix_value (), | 55 ComplexMatrix ret = xdiv (v1.matrix_value (), |
56 v2.complex_matrix_value (), typ); | 56 v2.complex_matrix_value (), typ); |
57 | 57 |
58 v2.matrix_type (typ); | 58 v2.matrix_type (typ); |
59 return ret; | 59 return ret; |
60 } | 60 } |
80 } | 80 } |
81 else | 81 else |
82 { | 82 { |
83 MatrixType typ = v1.matrix_type (); | 83 MatrixType typ = v1.matrix_type (); |
84 | 84 |
85 ComplexMatrix ret = xleftdiv (v1.sparse_matrix_value (), | 85 ComplexMatrix ret = xleftdiv (v1.sparse_matrix_value (), |
86 v2.complex_matrix_value (), typ); | 86 v2.complex_matrix_value (), typ); |
87 | 87 |
88 v1.matrix_type (typ); | 88 v1.matrix_type (typ); |
89 return ret; | 89 return ret; |
90 } | 90 } |
100 DEFBINOP_FN (el_mul, sparse_matrix, complex_matrix, product) | 100 DEFBINOP_FN (el_mul, sparse_matrix, complex_matrix, product) |
101 DEFBINOP_FN (el_div, sparse_matrix, complex_matrix, quotient) | 101 DEFBINOP_FN (el_div, sparse_matrix, complex_matrix, quotient) |
102 | 102 |
103 DEFBINOP (el_pow, sparse_matrix, complex_matrix) | 103 DEFBINOP (el_pow, sparse_matrix, complex_matrix) |
104 { | 104 { |
105 CAST_BINOP_ARGS (const octave_sparse_matrix&, | 105 CAST_BINOP_ARGS (const octave_sparse_matrix&, |
106 const octave_complex_matrix&); | 106 const octave_complex_matrix&); |
107 | 107 |
108 return octave_value | 108 return octave_value |
109 (elem_xpow (v1.sparse_matrix_value (), SparseComplexMatrix | 109 (elem_xpow (v1.sparse_matrix_value (), SparseComplexMatrix |
110 (v2.complex_matrix_value ()))); | 110 (v2.complex_matrix_value ()))); |
111 } | 111 } |
112 | 112 |
113 DEFBINOP (el_ldiv, sparse_matrix, complex_matrix) | 113 DEFBINOP (el_ldiv, sparse_matrix, complex_matrix) |
114 { | 114 { |
115 CAST_BINOP_ARGS (const octave_sparse_matrix&, | 115 CAST_BINOP_ARGS (const octave_sparse_matrix&, |
116 const octave_complex_matrix&); | 116 const octave_complex_matrix&); |
117 | 117 |
118 return octave_value | 118 return octave_value |
119 (quotient (v2.complex_matrix_value (), v1.sparse_matrix_value ())); | 119 (quotient (v2.complex_matrix_value (), v1.sparse_matrix_value ())); |
120 } | 120 } |
121 | 121 |
122 DEFBINOP_FN (el_and, sparse_matrix, complex_matrix, mx_el_and) | 122 DEFBINOP_FN (el_and, sparse_matrix, complex_matrix, mx_el_and) |
123 DEFBINOP_FN (el_or, sparse_matrix, complex_matrix, mx_el_or) | 123 DEFBINOP_FN (el_or, sparse_matrix, complex_matrix, mx_el_or) |
148 INSTALL_BINOP (op_le, octave_sparse_matrix, octave_complex_matrix, le); | 148 INSTALL_BINOP (op_le, octave_sparse_matrix, octave_complex_matrix, le); |
149 INSTALL_BINOP (op_eq, octave_sparse_matrix, octave_complex_matrix, eq); | 149 INSTALL_BINOP (op_eq, octave_sparse_matrix, octave_complex_matrix, eq); |
150 INSTALL_BINOP (op_ge, octave_sparse_matrix, octave_complex_matrix, ge); | 150 INSTALL_BINOP (op_ge, octave_sparse_matrix, octave_complex_matrix, ge); |
151 INSTALL_BINOP (op_gt, octave_sparse_matrix, octave_complex_matrix, gt); | 151 INSTALL_BINOP (op_gt, octave_sparse_matrix, octave_complex_matrix, gt); |
152 INSTALL_BINOP (op_ne, octave_sparse_matrix, octave_complex_matrix, ne); | 152 INSTALL_BINOP (op_ne, octave_sparse_matrix, octave_complex_matrix, ne); |
153 INSTALL_BINOP (op_el_mul, octave_sparse_matrix, octave_complex_matrix, | 153 INSTALL_BINOP (op_el_mul, octave_sparse_matrix, octave_complex_matrix, |
154 el_mul); | 154 el_mul); |
155 INSTALL_BINOP (op_el_div, octave_sparse_matrix, octave_complex_matrix, | 155 INSTALL_BINOP (op_el_div, octave_sparse_matrix, octave_complex_matrix, |
156 el_div); | 156 el_div); |
157 INSTALL_BINOP (op_el_pow, octave_sparse_matrix, octave_complex_matrix, | 157 INSTALL_BINOP (op_el_pow, octave_sparse_matrix, octave_complex_matrix, |
158 el_pow); | 158 el_pow); |
159 INSTALL_BINOP (op_el_ldiv, octave_sparse_matrix, octave_complex_matrix, | 159 INSTALL_BINOP (op_el_ldiv, octave_sparse_matrix, octave_complex_matrix, |
160 el_ldiv); | 160 el_ldiv); |
161 INSTALL_BINOP (op_el_and, octave_sparse_matrix, octave_complex_matrix, | 161 INSTALL_BINOP (op_el_and, octave_sparse_matrix, octave_complex_matrix, |
162 el_and); | 162 el_and); |
163 INSTALL_BINOP (op_el_or, octave_sparse_matrix, octave_complex_matrix, | 163 INSTALL_BINOP (op_el_or, octave_sparse_matrix, octave_complex_matrix, |
164 el_or); | 164 el_or); |
165 | 165 |
166 INSTALL_CATOP (octave_sparse_matrix, octave_complex_matrix, sm_cm); | 166 INSTALL_CATOP (octave_sparse_matrix, octave_complex_matrix, sm_cm); |
167 | 167 |
168 INSTALL_ASSIGNCONV (octave_sparse_matrix, octave_complex_matrix, | 168 INSTALL_ASSIGNCONV (octave_sparse_matrix, octave_complex_matrix, |
169 octave_sparse_complex_matrix); | 169 octave_sparse_complex_matrix); |
170 | 170 |
171 INSTALL_WIDENOP (octave_sparse_matrix, octave_complex_matrix, | 171 INSTALL_WIDENOP (octave_sparse_matrix, octave_complex_matrix, |
172 sparse_complex_matrix_conv); | 172 sparse_complex_matrix_conv); |
173 } | 173 } |