ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vec_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  */
7 #include <admodel.h>
8 
10  dvar_vector()
11  {
13  int mmin=v.indexmin();
14  int mmax=v.indexmax();
15  dvar_vector::allocate(mmin,mmax);
16  for (int i=mmin;i<=mmax;i++)
17  {
18  (*this)(i)=v(i);
19  }
20  }
21 
23  dvar_vector()
24  {
26  int mmin=v.indexmin();
27  int mmax=v.indexmax();
28  dvar_vector::allocate(mmin,mmax);
29  for (int i=mmin;i<=mmax;i++)
30  {
31  (*this)(i)=v(i);
32  }
33  }
34 
36  dvar_matrix()
37  {
39  int mmin=v.indexmin();
40  int mmax=v.indexmax();
41  dvar_matrix::allocate(mmin,mmax);
42  for (int i=mmin;i<=mmax;i++)
43  {
44  (*this)(i).shallow_copy(v(i));
45  }
46  }
47 
49  dvar_matrix()
50  {
52  int mmin=v.indexmin();
53  int mmax=v.indexmax();
54  dvar_matrix::allocate(mmin,mmax);
55  for (int i=mmin;i<=mmax;i++)
56  {
57  (*this)(i).shallow_copy(v(i));
58  }
59  }
60 //
61 // ostream& operator << (const ostream& _s, const param_init_number_vector v)
62 // {
63 // ostream & s = (ostream &)(_s);
64 // int mmin=v.indexmin();
65 // int mmax=v.indexmax();
66 // for (int i=mmin;i<=mmax;i++)
67 // {
68 // s << v(i) << endl;
69 // }
70 // return s;
71 // }
72 //
73 // ostream& operator<<(const ostream& _s,
74 // const param_init_bounded_number_vector v)
75 // {
76 // ostream & s = (ostream &)(_s);
77 // int mmin=v.indexmin();
78 // int mmax=v.indexmax();
79 // for (int i=mmin;i<=mmax;i++)
80 // {
81 // s << v(i) << endl;
82 // }
83 // return s;
84 // }
85 //
86 // ostream& operator << (const ostream& _s, const param_init_vector_vector v)
87 // {
88 // ostream & s = (ostream &)(_s);
89 // int mmin=v.indexmin();
90 // int mmax=v.indexmax();
91 // for (int i=mmin;i<=mmax;i++)
92 // {
93 // s << v(i) << endl;
94 // }
95 // return s;
96 // }
97 //
98 // ostream& operator<<(const ostream& _s,
99 // const param_init_bounded_vector_vector v)
100 // {
101 // ostream & s = (ostream &)(_s);
102 // int mmin=v.indexmin();
103 // int mmax=v.indexmax();
104 // for (int i=mmin;i<=mmax;i++)
105 // {
106 // s << v(i) << endl;
107 // }
108 // return s;
109 // }
110 //
111 // ostream& operator << (const ostream& _s, const param_init_matrix_vector v)
112 // {
113 // ostream & s = (ostream &)(_s);
114 // int mmin=v.indexmin();
115 // int mmax=v.indexmax();
116 // for (int i=mmin;i<=mmax;i++)
117 // {
118 // s << v(i) << endl;
119 // }
120 // return s;
121 // }
122 //
123 // ostream& operator<<(const ostream& _s,
124 // const param_init_bounded_matrix_vector v)
125 // {
126 // ostream & s = (ostream &)(_s);
127 // int mmin=v.indexmin();
128 // int mmax=v.indexmax();
129 // for (int i=mmin;i<=mmax;i++)
130 // {
131 // s << v(i) << endl;
132 // }
133 // return s;
134 // }
matrix_kludge(const param_init_vector_vector &)
Definition: vec_io.cpp:35
int indexmin() const
Definition: admodel.h:2901
void allocate(void)
Does not allocate, but initializes dvar_vector to empty.
Definition: fvar_arr.cpp:216
ADMB variable vector.
Definition: fvar.hpp:2172
void shallow_copy(const dvar_matrix &)
Shallow copy other data structure pointers.
Definition: fvar_mat.cpp:459
Description not yet available.
Definition: admodel.h:2718
Description not yet available.
Definition: admodel.h:2675
void allocate(void)
Does not allocate, but initializes members.
Definition: fvar_mat.cpp:479
Description not yet available.
vector_kludge(const param_init_number_vector &)
Definition: vec_io.cpp:9
Class definition of matrix with derivitive information .
Definition: fvar.hpp:2480
Description not yet available.
Definition: admodel.h:2873
int indexmax() const
Definition: admodel.h:2902
Class object for init_bounded_number vector.
Definition: admodel.h:2915