#ifndef BZ_ARRAYZIP_H #define BZ_ARRAYZIP_H #ifndef BZ_ARRAY_H #error must be included via #endif BZ_NAMESPACE(blitz) template struct Zip2 { typedef P_component T_numtype; static inline T_numtype apply(T1 a, T2 b) { return T_numtype(a,b); } template static inline void prettyPrint(string& str, prettyPrintFormat& format, const T_left& t1, const T_right& t2) { str += "zip("; t1.prettyPrint(str, format); str += ","; t2.prettyPrint(str, format); str += ")"; } }; template inline _bz_ArrayExpr<_bz_ArrayExprOp<_bz_typename asExpr::T_expr, _bz_typename asExpr::T_expr, Zip2::T_expr::T_numtype, _bz_typename asExpr::T_expr::T_numtype> > > zip(const T1& a, const T2& b, T_component) { return _bz_ArrayExpr<_bz_ArrayExprOp<_bz_typename asExpr::T_expr, _bz_typename asExpr::T_expr, Zip2::T_expr::T_numtype, _bz_typename asExpr::T_expr::T_numtype> > >(a,b); } BZ_NAMESPACE_END #endif // BZ_ARRAYZIP_H