ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
imat_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 // file: dmat_io.cpp
12 
13 // i/o operations for class dmatrix
14 #include "fvar.hpp"
15 
16 #ifdef __TURBOC__
17  #pragma hdrstop
18  #include <iostream.h>
19  #include <iomanip.h>
20  #include <fstream.h>
21  #define __USE_IOSTREAM__
22 #endif
23 
24 #ifdef __ZTC__
25  #include <iostream.hpp>
26  #include <iomanip.hpp>
27  #include <fstream.hpp>
28  #define __USE_IOSTREAM__
29 #endif
30 
31 #include <string.h>
32 
37 ostream& operator<<(const ostream& _ostr, const imatrix& z)
38 {
39  ostream& ostr= (ostream&) _ostr;
40  int min=z.rowmin();
41  int max=z.rowmax();
42  for (int i=min;i<=max-1;i++)
43  {
44  ostr << z[i] << endl;
45  }
46  ostr << z[max];
47  return ostr;
48 }
49 
54 istream& operator>>(const istream& _istr,const imatrix& z)
55 {
56  istream& istr= (istream&) _istr;
57  int min=z.rowmin();
58  int max=z.rowmax();
59  for (int i=min;i<=max;i++)
60  {
61  istr >> z[i];
62  }
63  return istr;
64 }
Description not yet available.
Definition: imatrix.h:69
int rowmin() const
Definition: imatrix.h:146
prnstream & endl(prnstream &)
#define min(a, b)
Definition: cbivnorm.cpp:188
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
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
#define max(a, b)
Definition: cbivnorm.cpp:189
int rowmax() const
Definition: imatrix.h:150