ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
fvar3_io.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include "fvar.hpp"
00012 
00013 #ifdef __TURBOC__
00014   #pragma hdrstop
00015   #include <iostream.h>
00016   #include <iomanip.h>
00017   #include <fstream.h>
00018   #define __USE_IOSTREAM__
00019 #endif
00020 
00021 #ifdef __ZTC__
00022   #include <iostream.hpp>
00023   #include <iomanip.hpp>
00024   #include <fstream.hpp>
00025   #define __USE_IOSTREAM__
00026 #endif
00027 
00028 #include <string.h>
00029 
00034 ostream& operator<<(const ostream& _ostr, const dvar3_array& z)
00035 {
00036   ostream& ostr= (ostream&) _ostr;
00037   for (int i=z.slicemin();i<=z.slicemax();i++)
00038   {
00039     ostr << z[i];
00040     if (i<z.slicemax())
00041     {
00042       ostr << endl;
00043     }
00044   }
00045   return ostr;
00046 }
00047 
00052 istream& operator>>(const istream& _istr,const dvar3_array& z)
00053 {
00054   istream& istr= (istream&) _istr;
00055   for (int i=z.slicemin();i<=z.slicemax();i++)
00056   {
00057     istr >> z[i];
00058   }
00059   return istr;
00060 }