Mercurial > hg > octave-avbm
comparison liboctave/bsxfun.h @ 13005:4061106b1c4b
Enable automatic bsxfun for power operators
* bsxfun.h: Put #include guards
* int8NDArray.cc: Define bsxfun power operator for integral types.
* int16NDArray.cc: Ditto.
* int32NDArray.cc: Ditto.
* int64NDArray.cc: fDitto.
* uint8ADArray.cc: Ditto.
* uint16NDArray.cc: Ditto.
* uint32NDArray.cc: Ditto.
* uint64NDArray.cc: Ditto.
* mx-inlines.cc: Let the compiler decide to use Octave's own integral pow.
* op-int.h: Call bsxfun for integral operators.
* xpow.cc: Call bsxfun for float operators.
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Wed, 24 Aug 2011 23:12:28 -0500 |
parents | d9d65c3017c3 |
children | 61be447052c3 |
comparison
equal
deleted
inserted
replaced
13004:d9d65c3017c3 | 13005:4061106b1c4b |
---|---|
17 You should have received a copy of the GNU General Public License | 17 You should have received a copy of the GNU General Public License |
18 along with Octave; see the file COPYING. If not, see | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | 19 <http://www.gnu.org/licenses/>. |
20 | 20 |
21 */ | 21 */ |
22 #if !defined (bsxfun_h) | |
23 #define bsxfun_h 1 | |
22 | 24 |
23 #include <algorithm> | 25 #include <algorithm> |
24 | 26 |
25 #include "Array.h" | 27 #include "Array.h" |
26 #include "dim-vector.h" | 28 #include "dim-vector.h" |
36 if ( dx(i) > 1 && dy(i) > 1 && dx(i) != dy(i)) | 38 if ( dx(i) > 1 && dy(i) > 1 && dx(i) != dy(i)) |
37 return false; | 39 return false; |
38 } | 40 } |
39 return true; | 41 return true; |
40 } | 42 } |
43 | |
44 #endif |