ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fvar_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: fvar_io.cpp
12 
13 // i/o operations for class prevariable
14 
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 
36 ostream& operator<<(const ostream& _ostr, const prevariable& f)
37 {
38  ostream& ostr=(ostream&) _ostr;
39  ostr << value(f);
40  return ostr;
41 }
42 
47 istream& operator>>(const istream& _istr, const prevariable& _f)
48 {
49  prevariable& f = (prevariable&)_f;
50  istream& istr=(istream&) _istr;
51  double tmp = 0;
52  istr >> tmp;
53  f=tmp;
54  return istr;
55 }
56 
57 
58 #ifdef __USE_IOSTREAM__
59 
63 uostream& operator<<(const uostream& _ostr, const prevariable& f)
64 {
65  uostream& ostr=(uostream&) _ostr;
66  ostr << value(f);
67  return ostr;
68 }
69 
74 uistream& operator>>(const uistream& _istr, const prevariable& _f)
75 {
76  prevariable& f = (prevariable&)_f;
77  uistream& istr=(uistream&) _istr;
78  double tmp = 0;
79  istr >> tmp;
80  f=tmp;
81  return istr;
82 }
83 #endif
Base class for dvariable.
Definition: fvar.hpp:1315
Description not yet available.
Definition: fvar.hpp:3398
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
Description not yet available.
Definition: fvar.hpp:3516
dvector value(const df1_one_vector &v)
Definition: df11fun.cpp:69