| Rev | Line |  | 
|---|
| [658] | 1 | /* | 
|---|
|  | 2 | * $Id: vecio.cc,v 1.1.1.1 1999-11-26 16:37:05 ansari Exp $ | 
|---|
|  | 3 | * | 
|---|
|  | 4 | * Copyright (C) 1997 Todd Veldhuizen <tveldhui@seurat.uwaterloo.ca> | 
|---|
|  | 5 | * All rights reserved.  Please see <blitz/blitz.h> for terms and | 
|---|
|  | 6 | * conditions of use. | 
|---|
|  | 7 | * | 
|---|
|  | 8 | * $Log: not supported by cvs2svn $ | 
|---|
|  | 9 | // Revision 1.1.1.1  1999/04/09  17:58:58  ansari | 
|---|
|  | 10 | // Creation module DPC/Blitz (blitz 0.4) Reza 09/04/99 | 
|---|
|  | 11 | // | 
|---|
|  | 12 | * Revision 1.5  1998/03/14 00:04:47  tveldhui | 
|---|
|  | 13 | * 0.2-alpha-05 | 
|---|
|  | 14 | * | 
|---|
|  | 15 | * Revision 1.4  1997/07/16 14:51:20  tveldhui | 
|---|
|  | 16 | * Update: Alpha release 0.2 (Arrays) | 
|---|
|  | 17 | * | 
|---|
|  | 18 | * Revision 1.3  1997/01/24 14:42:00  tveldhui | 
|---|
|  | 19 | * Periodic RCS update | 
|---|
|  | 20 | * | 
|---|
|  | 21 | */ | 
|---|
|  | 22 |  | 
|---|
|  | 23 | #ifndef BZ_VECIO_CC | 
|---|
|  | 24 | #define BZ_VECIO_CC | 
|---|
|  | 25 |  | 
|---|
|  | 26 | #ifndef BZ_VECTOR_H | 
|---|
|  | 27 | #include <blitz/vector.h> | 
|---|
|  | 28 | #endif | 
|---|
|  | 29 |  | 
|---|
|  | 30 | BZ_NAMESPACE(blitz) | 
|---|
|  | 31 |  | 
|---|
|  | 32 | // This version of operator<< is provided as a temporary measure | 
|---|
|  | 33 | // only.  It will be revised in a future release. | 
|---|
|  | 34 | // NEEDS_WORK | 
|---|
|  | 35 |  | 
|---|
|  | 36 | template<class P_numtype> | 
|---|
|  | 37 | ostream& operator<<(ostream& os, const Vector<P_numtype>& x) | 
|---|
|  | 38 | { | 
|---|
|  | 39 | os << "[ "; | 
|---|
|  | 40 | for (int i=0; i < x.length(); ++i) | 
|---|
|  | 41 | { | 
|---|
|  | 42 | os << setw(10) << x[i]; | 
|---|
|  | 43 | if (!((i+1)%7)) | 
|---|
|  | 44 | os << endl << "  "; | 
|---|
|  | 45 | } | 
|---|
|  | 46 | os << " ]"; | 
|---|
|  | 47 | return os; | 
|---|
|  | 48 | } | 
|---|
|  | 49 |  | 
|---|
|  | 50 | template<class P_expr> | 
|---|
|  | 51 | ostream& operator<<(ostream& os, _bz_VecExpr<P_expr> expr) | 
|---|
|  | 52 | { | 
|---|
|  | 53 | Vector<_bz_typename P_expr::T_numtype> result(expr); | 
|---|
|  | 54 | os << result; | 
|---|
|  | 55 | return os; | 
|---|
|  | 56 | } | 
|---|
|  | 57 |  | 
|---|
|  | 58 | BZ_NAMESPACE_END | 
|---|
|  | 59 |  | 
|---|
|  | 60 | #endif // BZ_VECIO_CC | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.