Mercurial > octave-nkf
comparison liboctave/boolNDArray.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 | aa4a23337a0f |
comparison
equal
deleted
inserted
replaced
11585:1473d0cf86d2 | 11586:12df7854fa7c |
---|---|
66 boolNDArray::any (int dim) const | 66 boolNDArray::any (int dim) const |
67 { | 67 { |
68 return do_mx_red_op<bool, bool> (*this, dim, mx_inline_any); | 68 return do_mx_red_op<bool, bool> (*this, dim, mx_inline_any); |
69 } | 69 } |
70 | 70 |
71 NDArray | 71 NDArray |
72 boolNDArray::sum (int dim) const | 72 boolNDArray::sum (int dim) const |
73 { | 73 { |
74 // NOTE: going via octave_idx_type is typically faster even though it | 74 // NOTE: going via octave_idx_type is typically faster even though it |
75 // requires a conversion. | 75 // requires a conversion. |
76 return do_mx_red_op<octave_idx_type, bool> (*this, dim, mx_inline_count); | 76 return do_mx_red_op<octave_idx_type, bool> (*this, dim, mx_inline_count); |
77 } | 77 } |
78 | 78 |
79 NDArray | 79 NDArray |
80 boolNDArray::cumsum (int dim) const | 80 boolNDArray::cumsum (int dim) const |
81 { | 81 { |
82 // In this case, it's better to sum directly to doubles. | 82 // In this case, it's better to sum directly to doubles. |
83 return do_mx_cum_op<double , bool> (*this, dim, mx_inline_cumcount); | 83 return do_mx_cum_op<double , bool> (*this, dim, mx_inline_cumcount); |
84 } | 84 } |
141 NDS_CMP_OPS (boolNDArray, bool) | 141 NDS_CMP_OPS (boolNDArray, bool) |
142 | 142 |
143 SND_BOOL_OPS (bool, boolNDArray) | 143 SND_BOOL_OPS (bool, boolNDArray) |
144 SND_CMP_OPS (bool, boolNDArray) | 144 SND_CMP_OPS (bool, boolNDArray) |
145 | 145 |
146 boolNDArray& | 146 boolNDArray& |
147 mx_el_and_assign (boolNDArray& a, const boolNDArray& b) | 147 mx_el_and_assign (boolNDArray& a, const boolNDArray& b) |
148 { | 148 { |
149 if (a.is_shared ()) | 149 if (a.is_shared ()) |
150 a = mx_el_and (a, b); | 150 a = mx_el_and (a, b); |
151 else | 151 else |
152 do_mm_inplace_op<bool, bool> (a, b, mx_inline_and2, "operator &="); | 152 do_mm_inplace_op<bool, bool> (a, b, mx_inline_and2, "operator &="); |
153 | 153 |
154 return a; | 154 return a; |
155 } | 155 } |
156 | 156 |
157 boolNDArray& | 157 boolNDArray& |
158 mx_el_or_assign (boolNDArray& a, const boolNDArray& b) | 158 mx_el_or_assign (boolNDArray& a, const boolNDArray& b) |
159 { | 159 { |
160 if (a.is_shared ()) | 160 if (a.is_shared ()) |
161 a = mx_el_or (a, b); | 161 a = mx_el_or (a, b); |
162 else | 162 else |