ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dvect23.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 #include <fvar.hpp>
12 
17 ostream& operator<<(const ostream& _ofs, const pre_column_print& p)
18 {
19  ostream& ofs= (ostream&) _ofs;
20  int mmin=p.ptr->indexmin();
21  int mmax=p.ptr->indexmax();
22  for (int i=mmin;i<=mmax;i++)
23  {
24  ofs << double((*(p.ptr))[i]) << endl;
25  }
26  return ofs;
27 }
28 
34 {
35  return pre_column_print(v);
36 }
37 
42 ostream& operator << (const ostream& _ofs, const pre_zero_print& p)
43 {
44  ostream& ofs= (ostream&) _ofs;
45  int mmin=p.ptr->indexmin();
46  int mmax=p.ptr->indexmax();
47  for (int i=mmin;i<=mmax;i++)
48  {
49  double tmp= double((*(p.ptr))[i]);
50  if (tmp ==0)
51  ofs << "0 ";
52  else
53  ofs << tmp << " ";
54  }
55  return ofs;
56 }
57 
63 {
64  return pre_zero_print(v);
65 }
pre_column_print column_print(const dvector &v)
Description not yet available.
Definition: dvect23.cpp:33
Description not yet available.
Definition: fvar.hpp:8369
dvector * ptr
Definition: fvar.hpp:8371
Vector of double precision numbers.
Definition: dvector.h:50
int indexmin() const
Get minimum valid index.
Definition: dvector.h:199
dvector * ptr
Definition: fvar.hpp:8356
Description not yet available.
Definition: fvar.hpp:8354
prnstream & endl(prnstream &)
int indexmax() const
Get maximum valid index.
Definition: dvector.h:204
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
ostream & operator<<(const ostream &_s, preshowpoint p)
Description not yet available.
Definition: admanip.cpp:48
pre_zero_print zero_print(const dvector &v)
Description not yet available.
Definition: dvect23.cpp:62