ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lmat_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  */
12 // file: dmat_io.cpp
13 
14 // i/o operations for class dmatrix
15 #include "fvar.hpp"
16 
17 #ifdef __TURBOC__
18  #pragma hdrstop
19  #include <iostream.h>
20  #include <iomanip.h>
21  #include <fstream.h>
22  #define __USE_IOSTREAM__
23 #endif
24 
25 #ifdef __ZTC__
26  #include <iostream.hpp>
27  #include <iomanip.hpp>
28  #include <fstream.hpp>
29  #define __USE_IOSTREAM__
30 #endif
31 
32 #include <string.h>
33 
38 ostream& operator<<(const ostream& ostr, const lmatrix& z)
39 {
40  int min=z.rowmin();
41  int max=z.rowmax();
42  int i;
43  for (i=min;i<=max-1;i++)
44  {
45  ostr << z[i] << endl;
46  }
47  ostr << z[i];
48  return (ostream&)ostr;
49 }
50 
55 istream& operator>>(const istream& istr, const lmatrix& z)
56 {
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 (istream&)istr;
64 }
65 
int rowmax(void) const
Definition: fvar.hpp:7596
Description not yet available.
Definition: fvar.hpp:7500
int rowmin(void) const
Definition: fvar.hpp:7592
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