From: William C. <wch...@ja...> - 2000-08-22 17:17:21
|
I can do arithmetic on indices; I can do indexing with indices; but I can't do both at once: #include <blitz/array.h> using namespace blitz; int main(int argc, char *argv) { Array<int, 1> s(4); Array<int, 1> t(4); t = 10, 20, 30, 40; firstIndex i; // I can do arithmetic on indices s = 3 - i; // I can do indexing with indices s = t(i); // But I can't do both at once! s = t(3 - i); // "no match for call" cout << s << "\n"; } How much would it take to get expressions like arrayexp(index arithmetic exp) turned into array(integer)? I know that wouldn't be as efficient in the example above as using reverse(); but it can be a nice notation, especially for transcribing written definitions of structured vectors/matrices. Regards, William P.S. I tried Blitz a few years ago, but now's the first time I've had a reason to play with it on a machine with enough memory ;). Very, very nice! --------------------- blitz-dev list -------------------------------- * To subscribe/unsubscribe: use the handy web form at http://oonumerics.org/blitz/lists.html |