| 
            Last change
 on this file since 1676 was             221, checked in by ansari, 27 years ago           | 
        
        
          | 
             
Creation module DPC/Blitz (blitz 0.4) Reza 09/04/99 
 
           | 
        
        
          | 
            File size:
            1.2 KB
           | 
        
      
      
| Line |   | 
|---|
| 1 | /*
 | 
|---|
| 2 |  * $Id: vecio.cc,v 1.1.1.1 1999-04-09 17:58:58 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.5  1998/03/14 00:04:47  tveldhui
 | 
|---|
| 10 |  * 0.2-alpha-05
 | 
|---|
| 11 |  *
 | 
|---|
| 12 |  * Revision 1.4  1997/07/16 14:51:20  tveldhui
 | 
|---|
| 13 |  * Update: Alpha release 0.2 (Arrays)
 | 
|---|
| 14 |  *
 | 
|---|
| 15 |  * Revision 1.3  1997/01/24 14:42:00  tveldhui
 | 
|---|
| 16 |  * Periodic RCS update
 | 
|---|
| 17 |  *
 | 
|---|
| 18 |  */
 | 
|---|
| 19 | 
 | 
|---|
| 20 | #ifndef BZ_VECIO_CC
 | 
|---|
| 21 | #define BZ_VECIO_CC
 | 
|---|
| 22 | 
 | 
|---|
| 23 | #ifndef BZ_VECTOR_H
 | 
|---|
| 24 |  #include <blitz/vector.h>
 | 
|---|
| 25 | #endif
 | 
|---|
| 26 | 
 | 
|---|
| 27 | BZ_NAMESPACE(blitz)
 | 
|---|
| 28 | 
 | 
|---|
| 29 | // This version of operator<< is provided as a temporary measure
 | 
|---|
| 30 | // only.  It will be revised in a future release.
 | 
|---|
| 31 | // NEEDS_WORK
 | 
|---|
| 32 | 
 | 
|---|
| 33 | template<class P_numtype>
 | 
|---|
| 34 | ostream& operator<<(ostream& os, const Vector<P_numtype>& x)
 | 
|---|
| 35 | {
 | 
|---|
| 36 |     os << "[ ";
 | 
|---|
| 37 |     for (int i=0; i < x.length(); ++i)
 | 
|---|
| 38 |     {
 | 
|---|
| 39 |         os << setw(10) << x[i];
 | 
|---|
| 40 |         if (!((i+1)%7))
 | 
|---|
| 41 |             os << endl << "  ";
 | 
|---|
| 42 |     }
 | 
|---|
| 43 |     os << " ]";
 | 
|---|
| 44 |     return os;
 | 
|---|
| 45 | }
 | 
|---|
| 46 | 
 | 
|---|
| 47 | template<class P_expr>
 | 
|---|
| 48 | ostream& operator<<(ostream& os, _bz_VecExpr<P_expr> expr)
 | 
|---|
| 49 | {
 | 
|---|
| 50 |     Vector<_bz_typename P_expr::T_numtype> result(expr);
 | 
|---|
| 51 |     os << result;
 | 
|---|
| 52 |     return os;
 | 
|---|
| 53 | }
 | 
|---|
| 54 | 
 | 
|---|
| 55 | BZ_NAMESPACE_END
 | 
|---|
| 56 | 
 | 
|---|
| 57 | #endif // BZ_VECIO_CC
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.