Hi Todd,
The interface to zip() currently requires a trailing parameter in the
function call which is used to indicate the type of the resulting
expression. For example, from the Blitz documentation:
int N = 16;
Array<complex<float>,1> A(N);
Array<float,1> theta(N);
A = zip(cos(theta), sin(theta), complex<float>());
However, with a little rework of the zip() interface, it is possible to omit
the trailing parameter in the function call and explicitly indicate the type
via a template parameter, as in:
A = zip< complex<float> >(cos(theta), sin(theta));
Which is closer in syntax to what this really means:
A = complex<float>(cos(theta), sin(theta));
Are there any good reasons why you have not defined zip() for use in this
way? (Maybe you have run into compiler bugs?)
cheers,
Greg
--------------------- blitz-dev list --------------------------------
* To subscribe/unsubscribe: mail to majordomo@oonumerics.org, with
"subscribe blitz-dev" or "unsubscribe blitz-dev" in the body of the message
* Blitz++ web page: http://oonumerics.org/blitz/
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 04:30:07 EST