Mercurial > hg > octave-lyh
comparison liboctave/boolNDArray.cc @ 9607:1be3c73ed7b5
reuse temporary arrays in nested expressions
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 03 Sep 2009 08:48:51 +0200 |
parents | a9b37bae1802 |
children | 66970dd627f6 |
comparison
equal
deleted
inserted
replaced
9606:a04352386a6b | 9607:1be3c73ed7b5 |
---|---|
40 boolNDArray::operator ! (void) const | 40 boolNDArray::operator ! (void) const |
41 { | 41 { |
42 return do_mx_unary_op<boolNDArray> (*this, mx_inline_not); | 42 return do_mx_unary_op<boolNDArray> (*this, mx_inline_not); |
43 } | 43 } |
44 | 44 |
45 boolNDArray& | |
46 boolNDArray::invert (void) | |
47 { | |
48 if (is_shared ()) | |
49 *this = ! *this; | |
50 else | |
51 do_mx_inplace_op<boolNDArray> (*this, mx_inline_not2); | |
52 | |
53 return *this; | |
54 } | |
55 | |
45 // FIXME -- this is not quite the right thing. | 56 // FIXME -- this is not quite the right thing. |
46 | 57 |
47 boolNDArray | 58 boolNDArray |
48 boolNDArray::all (int dim) const | 59 boolNDArray::all (int dim) const |
49 { | 60 { |