ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
f4_io1.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 // file: dmat_io.cpp
00012 
00013 // i/o operations for class dmatrix
00014 
00015 #include "fvar.hpp"
00016 
00017 #ifdef __TURBOC__
00018   #pragma hdrstop
00019   #include <iostream.h>
00020   #include <iomanip.h>
00021   #include <fstream.h>
00022   #define __USE_IOSTREAM__
00023 #endif
00024 
00025 #ifdef __ZTC__
00026   #include <iostream.hpp>
00027   #include <iomanip.hpp>
00028   #include <fstream.hpp>
00029   #define __USE_IOSTREAM__
00030 #endif
00031 
00032 #include <string.h>
00033 
00034 #ifdef __USE_IOSTREAM__
00035 
00040 uostream& operator<<(const uostream& ostr, const dvar4_array &z)
00041 {
00042   for (int i=z.hslicemin();i<=z.hslicemax();i++)
00043   {
00044     ostr << z[i];
00045   }
00046   return (uostream&) ostr;
00047 }
00048 
00053 uistream& operator>>(const uistream& istr,const dvar4_array &z)
00054 {
00055   for (int i=z.hslicemin();i<=z.hslicemax();i++)
00056   {
00057     istr >> z[i];
00058   }
00059   return (uistream&) istr;
00060 }
00061 #endif