ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fvar3_io.cpp
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Author: David Fournier
5  * Copyright (c) 2008-2012 Regents of the University of California
6  */
11 #include "fvar.hpp"
12 
13 #ifdef __TURBOC__
14  #pragma hdrstop
15  #include <iostream.h>
16  #include <iomanip.h>
17  #include <fstream.h>
18  #define __USE_IOSTREAM__
19 #endif
20 
21 #ifdef __ZTC__
22  #include <iostream.hpp>
23  #include <iomanip.hpp>
24  #include <fstream.hpp>
25  #define __USE_IOSTREAM__
26 #endif
27 
28 #include <string.h>
29 
34 ostream& operator<<(const ostream& _ostr, const dvar3_array& z)
35 {
36  ostream& ostr= (ostream&) _ostr;
37  for (int i=z.slicemin();i<=z.slicemax();i++)
38  {
39  ostr << z[i];
40  if (i<z.slicemax())
41  {
42  ostr << endl;
43  }
44  }
45  return ostr;
46 }
47 
52 istream& operator>>(const istream& _istr,const dvar3_array& z)
53 {
54  istream& istr= (istream&) _istr;
55  for (int i=z.slicemin();i<=z.slicemax();i++)
56  {
57  istr >> z[i];
58  }
59  return istr;
60 }
int slicemin() const
Definition: fvar.hpp:4274
int slicemax() const
Definition: fvar.hpp:4275
prnstream & endl(prnstream &)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
Definition: fvar.hpp:4197
istream & operator>>(const istream &input, const d3_array &arr3)
Read values from input stream into arr3.
Definition: d3_io.cpp:60
ostream & operator<<(const ostream &_s, preshowpoint p)
Description not yet available.
Definition: admanip.cpp:48