ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
i5io.cpp
Go to the documentation of this file.
1 
5 #include "fvar.hpp"
6 
7 #ifdef __TURBOC__
8  #pragma hdrstop
9  #include <iostream.h>
10  #include <iomanip.h>
11  #include <fstream.h>
12 #endif
13 
14 #ifdef __ZTC__
15  #include <iostream.hpp>
16  #include <iomanip.hpp>
17  #include <fstream.hpp>
18 #endif
19 
26 ostream& operator<<(const ostream& output, const i5_array& iarray)
27 {
28  ostream& ostr = const_cast<ostream&>(output);
29  for (int i = iarray.indexmin(); i <= iarray.indexmax(); ++i)
30  {
31  if (allocated(iarray(i)))
32  {
33  ostr << iarray(i);
34  }
35  if (i < iarray.indexmax())
36  {
37  ostr << '\n';
38  }
39  }
40  return ostr;
41 }
48 istream& operator>>(const istream& input, const i5_array& iarray)
49 {
50  for (int i = iarray.indexmin(); i <= iarray.indexmax(); ++i)
51  {
52  if (allocated(iarray(i)))
53  {
54  input >> iarray(i);
55  }
56  }
57  return const_cast<istream&>(input);
58 }
int indexmin() const
Definition: fvar.hpp:6190
int allocated(const ivector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: fvar_a59.cpp:13
int indexmax() const
Definition: fvar.hpp:6194
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
const int output
Definition: fvar.hpp:9505
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
Description not yet available.
Definition: fvar.hpp:6067