Mercurial > hg > octave-nkf
comparison liboctave/intNDArray.cc @ 4932:43f4ebd2704c
[project @ 2004-08-05 13:26:10 by jwe]
author | jwe |
---|---|
date | Thu, 05 Aug 2004 13:26:15 +0000 |
parents | c638c144d4da |
children | e71be9c548f2 |
comparison
equal
deleted
inserted
replaced
4931:1ed883f251e8 | 4932:43f4ebd2704c |
---|---|
37 | 37 |
38 template <class T> | 38 template <class T> |
39 boolNDArray | 39 boolNDArray |
40 intNDArray<T>::operator ! (void) const | 40 intNDArray<T>::operator ! (void) const |
41 { | 41 { |
42 boolNDArray b (dims ()); | 42 boolNDArray b (this->dims ()); |
43 | 43 |
44 for (int i = 0; i < length (); i++) | 44 for (int i = 0; i < this->length (); i++) |
45 b.elem (i) = ! elem (i); | 45 b.elem (i) = ! this->elem (i); |
46 | 46 |
47 return b; | 47 return b; |
48 } | 48 } |
49 | 49 |
50 // XXX FIXME XXX -- this is not quite the right thing. | 50 // XXX FIXME XXX -- this is not quite the right thing. |
51 | 51 |
52 template <class T> | 52 template <class T> |
53 boolNDArray | 53 boolNDArray |
54 intNDArray<T>::all (int dim) const | 54 intNDArray<T>::all (int dim) const |
55 { | 55 { |
56 MX_ND_ANY_ALL_REDUCTION (MX_ND_ALL_EVAL (elem (iter_idx) == T (0)), true); | 56 MX_ND_ANY_ALL_REDUCTION (MX_ND_ALL_EVAL (this->elem (iter_idx) == T (0)), true); |
57 } | 57 } |
58 | 58 |
59 template <class T> | 59 template <class T> |
60 boolNDArray | 60 boolNDArray |
61 intNDArray<T>::any (int dim) const | 61 intNDArray<T>::any (int dim) const |
62 { | 62 { |
63 MX_ND_ANY_ALL_REDUCTION (MX_ND_ALL_EVAL (elem (iter_idx) == T (0)), false); | 63 MX_ND_ANY_ALL_REDUCTION (MX_ND_ALL_EVAL (this->elem (iter_idx) == T (0)), false); |
64 } | 64 } |
65 | 65 |
66 template <class T> | 66 template <class T> |
67 void | 67 void |
68 intNDArray<T>::increment_index (Array<int>& ra_idx, | 68 intNDArray<T>::increment_index (Array<int>& ra_idx, |