#ifndef BZ_ARRAY_H #error must be included via #endif #ifndef BZ_ARRAYIO_CC #define BZ_ARRAYIO_CC BZ_NAMESPACE(blitz) template ostream& operator<<(ostream& os, const Array& x) { os << "[ "; for (int i=x.lbound(firstRank); i <= x.ubound(firstRank); ++i) { os << setw(10) << x(i); if (!((i+1)%7)) os << endl << " "; } os << " ]"; return os; } template ostream& operator<<(ostream& os, const Array& x) { os << x.rows() << " x " << x.columns() << endl; for (int i=x.lbound(firstRank); i <= x.ubound(firstRank); ++i) { for (int j=x.lbound(secondRank); j <= x.ubound(secondRank); ++j) { os << setw(10) << x(i,j); if (!((j+1)%7)) os << endl << " "; } os << endl; } return os; } BZ_NAMESPACE_END #endif // BZ_ARRAYIO_CC