ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ad_cif.cpp
Go to the documentation of this file.
1 
9 #include <fvar.hpp>
10 #include "cifstrem.h"
11 
12 //VECTOR_OPERATOR_DEFINE(dvector)
13 //VECTOR_OPERATOR_DEFINE(ivector)
14 //VECTOR_OPERATOR_DEFINE(lvector)
15 
16 //MATRIX_OPERATOR_DEFINE(dmatrix)
17 //MATRIX_OPERATOR_DEFINE(imatrix)
18 //MATRIX_OPERATOR_DEFINE(lmatrix)
19 
20 
28 {
29  istr >> value(var);
30  return istr;
31 }
38 {
39  if (allocated(lvec))
40  {
41  for (int i = lvec.indexmin(); i <= lvec.indexmax(); ++i)
42  {
43  *this >> lvec[i];
44  }
45  }
46  return *this;
47 }
54 {
55  if (allocated(dvec))
56  {
57  for (int i = dvec.indexmin(); i <= dvec.indexmax(); ++i)
58  {
59  *this >> dvec[i];
60  }
61  }
62  return *this;
63 }
70 cifstream& operator>>(cifstream& istr, const dmatrix& dmat)
71 {
72  if (allocated(dmat))
73  {
74  for (int i = dmat.indexmin(); i <= dmat.indexmax(); ++i)
75  {
76  istr >> dmat[i];
77  }
78  }
79  return istr;
80 }
87 cifstream& operator>>(cifstream& istr, const d3_array& darr)
88 {
89  if (allocated(darr))
90  {
91  for (int i = darr.indexmin(); i <= darr.indexmax(); ++i)
92  {
93  istr >> darr[i];
94  }
95  }
96  return istr;
97 }
105 {
106  if (allocated(darr))
107  {
108  for (int i = darr.indexmin(); i <= darr.indexmax(); ++i)
109  {
110  istr >> darr[i];
111  }
112  }
113  return istr;
114 }
122 {
123  if (allocated(darr))
124  {
125  for (int i = darr.indexmin(); i <= darr.indexmax(); ++i)
126  {
127  istr >> darr[i];
128  }
129  }
130  return istr;
131 }
139 {
140  if (allocated(darr))
141  {
142  for (int i = darr.indexmin(); i <= darr.indexmax(); ++i)
143  {
144  istr >> darr[i];
145  }
146  }
147  return istr;
148 }
156 {
157  if (allocated(darr))
158  {
159  for (int i = darr.indexmin(); i <= darr.indexmax(); ++i)
160  {
161  istr >> darr[i];
162  }
163  }
164  return istr;
165 }
173 {
174  if (allocated(ivec))
175  {
176  for (int i = ivec.indexmin(); i <= ivec.indexmax(); ++i)
177  {
178  *this >> ivec[i];
179  }
180  }
181  return *this;
182 }
189 cifstream& operator>>(cifstream& istr, const imatrix& imat)
190 {
191  if (allocated(imat))
192  {
193  for (int i = imat.indexmin(); i <= imat.indexmax(); ++i)
194  {
195  istr >> imat[i];
196  }
197  }
198  return istr;
199 }
207 {
208  if (allocated(iarr))
209  {
210  for (int i = iarr.indexmin(); i <= iarr.indexmax(); ++i)
211  {
212  istr >> iarr[i];
213  }
214  }
215  return istr;
216 }
224 {
225  if (allocated(iarr))
226  {
227  for (int i = iarr.indexmin(); i <= iarr.indexmax(); ++i)
228  {
229  istr >> iarr[i];
230  }
231  }
232  return istr;
233 }
241 {
242  if (allocated(iarr))
243  {
244  for (int i = iarr.indexmin(); i <= iarr.indexmax(); ++i)
245  {
246  istr >> iarr[i];
247  }
248  }
249  return istr;
250 }
Base class for dvariable.
Definition: fvar.hpp:1315
Description not yet available.
Definition: fvar.hpp:7054
int indexmax() const
Definition: imatrix.h:142
int indexmin() const
Definition: fvar.hpp:5893
Description not yet available.
Definition: imatrix.h:69
int indexmin() const
Definition: fvar.hpp:6190
int indexmin() const
Definition: fvar.hpp:6812
int indexmin() const
Definition: imatrix.h:138
int indexmax() const
Definition: fvar.hpp:3822
int allocated(const ivector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: fvar_a59.cpp:13
Vector of double precision numbers.
Definition: dvector.h:50
int indexmin() const
Get minimum valid index.
Definition: dvector.h:199
int indexmin() const
Definition: fvar.hpp:2917
int indexmin() const
Definition: fvar.hpp:676
Description not yet available.
Definition: fvar.hpp:656
Description not yet available.
Definition: fvar.hpp:6673
int indexmin() const
Definition: fvar.hpp:4021
cifstream & operator>>(const dvariable &z)
Reads input into var from comment formatted input file.
Definition: dfadcif.cpp:25
int indexmax() const
Definition: fvar.hpp:681
int indexmax() const
Definition: fvar.hpp:7218
Description not yet available.
Definition: fvar.hpp:5769
Description not yet available.
Definition: fvar.hpp:5161
int indexmax() const
Definition: fvar.hpp:6194
Array of integers(int) with indexes from index_min to indexmax.
Definition: ivector.h:50
double var(const dvector &vec)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: cranfill.cpp:23
int indexmax() const
Definition: fvar.hpp:5897
int indexmax() const
Get maximum valid index.
Definition: dvector.h:204
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
int indexmin() const
Definition: ivector.h:99
int indexmax() const
Definition: fvar.hpp:6816
int indexmax() const
Definition: ivector.h:104
Description not yet available.
Definition: fvar.hpp:2819
int indexmin() const
Definition: fvar.hpp:5305
int indexmax() const
Definition: fvar.hpp:2921
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
int indexmax() const
Definition: fvar.hpp:5309
int indexmax() const
Definition: fvar.hpp:6479
Description not yet available.
Definition: fvar.hpp:6067
Definition of the cifstream class.
int indexmax() const
Definition: fvar.hpp:4025
Description not yet available.
Definition: fvar.hpp:6331
int indexmin() const
Definition: fvar.hpp:3818
int indexmin() const
Definition: fvar.hpp:7214
dvector value(const df1_one_vector &v)
Definition: df11fun.cpp:69
Description not yet available.
Definition: fvar.hpp:3944
Description not yet available.
Definition: fvar.hpp:3727