ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
d4_io.cpp
Go to the documentation of this file.
1 
6 #include "fvar.hpp"
7 
8 #ifdef __TURBOC__
9  #pragma hdrstop
10  #include <iostream.h>
11  #include <iomanip.h>
12  #include <fstream.h>
13 #endif
14 
15 #ifdef __ZTC__
16  #include <iostream.hpp>
17  #include <iomanip.hpp>
18  #include <fstream.hpp>
19 #endif
20 
27 ostream& operator<<(const ostream& output, const d4_array& values)
28 {
29  ostream& ostr = const_cast<ostream&>(output);
30  for (int i = values.hslicemin(); i <= values.hslicemax(); ++i)
31  {
32  ostr << values[i] << endl;
33  }
34  return ostr;
35 }
42 istream& operator>>(const istream& input, const d4_array& values)
43 {
44  istream& istr = const_cast<istream&>(input);
45  for (int i = values.hslicemin(); i <= values.hslicemax(); ++i)
46  {
47  istr >> values[i];
48  }
49  return istr;
50 }
57 ostream& operator<<(const ostream& output, const d5_array& values)
58 {
59  ostream& ostr = const_cast<ostream&>(output);
60  for (int i = values.indexmin(); i <= values.indexmax(); ++i)
61  {
62  ostr << values[i] << endl;
63  }
64  return ostr;
65 }
72 istream& operator>>(const istream& input, const d5_array& values)
73 {
74  istream& istr = const_cast<istream&>(input);
75  for (int i = values.indexmin(); i <= values.indexmax(); ++i)
76  {
77  istr >> values[i];
78  }
79  return istr;
80 }
87 ostream& operator<<(const ostream& output, const d6_array& values)
88 {
89  ostream& ostr = const_cast<ostream&>(output);
90  for (int i = values.indexmin(); i <= values.indexmax(); ++i)
91  {
92  ostr << values[i] << endl;
93  }
94  return ostr;
95 }
102 istream& operator>>(const istream& input, const d6_array& values)
103 {
104  istream& istr = const_cast<istream&>(input);
105  for (int i = values.indexmin(); i <= values.indexmax(); ++i)
106  {
107  istr >> values[i];
108  }
109  return istr;
110 }
int indexmin() const
Definition: fvar.hpp:6812
int hslicemax() const
Definition: fvar.hpp:5317
Description not yet available.
Definition: fvar.hpp:6673
Description not yet available.
Definition: fvar.hpp:5161
prnstream & endl(prnstream &)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
int indexmax() const
Definition: fvar.hpp:6816
values
Definition: adjson.h:22
const int output
Definition: fvar.hpp:9505
int indexmin() const
Definition: fvar.hpp:6475
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
int indexmax() const
Definition: fvar.hpp:6479
Description not yet available.
Definition: fvar.hpp:6331
int hslicemin() const
Definition: fvar.hpp:5313