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 d3_array& z) 00041 { 00042 uostream & ostr = (uostream&) _ostr; 00043 for (int i=z.slicemin();i<=z.slicemax();i++) 00044 { 00045 ostr << z[i]; 00046 } 00047 return ostr; 00048 } 00049 00054 uistream& operator>>(const uistream& _istr, const d3_array& z) 00055 { 00056 uistream & istr = (uistream&) _istr; 00057 for (int i=z.slicemin();i<=z.slicemax();i++) 00058 { 00059 istr >> z[i]; 00060 } 00061 return istr; 00062 } 00063 00068 uostream& operator<<(const uostream& _ostr, const dvar3_array& z) 00069 { 00070 uostream & ostr = (uostream&) _ostr; 00071 for (int i=z.slicemin();i<=z.slicemax();i++) 00072 { 00073 ostr << z[i]; 00074 } 00075 return ostr; 00076 } 00077 00082 uistream& operator>>(const uistream& _istr, const dvar3_array& z) 00083 { 00084 uistream & istr = (uistream&) _istr; 00085 for (int i=z.slicemin();i<=z.slicemax();i++) 00086 { 00087 istr >> z[i]; 00088 } 00089 return istr; 00090 } 00091 00092 #endif
Generated on Tue Mar 8 2016 19:51:30 for ADMB Documentation by 1.8.0 |