comparison liboctave/bsxfun.h @ 13006:61be447052c3

Implement automatic bsxfun almost everywhere now except sparse matrices. * bsxfun.h: Move the .cc include since it uses the declaration of the function * oct-binmap.h: Call bsxfun on Array-Array binmap, and pass functions by pointer instead of by reference so they can be passed to do_bsxfun_op. * xor.m: Trivially call bsxfun by default.
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Thu, 25 Aug 2011 04:07:11 -0500
parents 4061106b1c4b
children aa4a23337a0f
comparison
equal deleted inserted replaced
13005:4061106b1c4b 13006:61be447052c3
25 #include <algorithm> 25 #include <algorithm>
26 26
27 #include "Array.h" 27 #include "Array.h"
28 #include "dim-vector.h" 28 #include "dim-vector.h"
29 29
30 #include "bsxfun-defs.cc"
31
32 inline 30 inline
33 bool 31 bool
34 is_valid_bsxfun (const dim_vector& dx, const dim_vector& dy) 32 is_valid_bsxfun (const dim_vector& dx, const dim_vector& dy)
35 { 33 {
36 for (int i = 0; i < std::min (dx.length (), dy.length ()); i++) 34 for (int i = 0; i < std::min (dx.length (), dy.length ()); i++)
39 return false; 37 return false;
40 } 38 }
41 return true; 39 return true;
42 } 40 }
43 41
42 #include "bsxfun-defs.cc"
43
44 #endif 44 #endif