ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
suballoc.cpp
Go to the documentation of this file.
1 
5 #include "fvar.hpp"
6 
14 {
15  return !allocated(v);
16 }
24 {
25  int isallocated = allocated(m);
26  if (isallocated)
27  {
28  int mmin = m.indexmin();
29  int mmax = m.indexmax();
30  for (int i = mmin; i <= mmax; ++i)
31  {
32  if (sub_unallocated(m(i)))
33  {
34  isallocated = false;
35  break;
36  }
37  }
38  }
39  return !isallocated;
40 }
47 int sub_unallocated(const dvar3_array& arr3)
48 {
49  int isallocated = allocated(arr3);
50  if (isallocated)
51  {
52  int mmin = arr3.indexmin();
53  int mmax = arr3.indexmax();
54  for (int i = mmin; i <= mmax; ++i)
55  {
56  if (sub_unallocated(arr3(i)))
57  {
58  isallocated = false;
59  break;
60  }
61  }
62  }
63  return !isallocated;
64 }
71 int sub_unallocated(const dvar4_array& arr4)
72 {
73  int isallocated = allocated(arr4);
74  if (isallocated)
75  {
76  int mmin = arr4.indexmin();
77  int mmax = arr4.indexmax();
78  for (int i = mmin; i <= mmax; ++i)
79  {
80  if (sub_unallocated(arr4(i)))
81  {
82  isallocated = false;
83  break;
84  }
85  }
86  }
87  return !isallocated;
88 }
95 int sub_unallocated(const dvar5_array& arr5)
96 {
97  int isallocated = allocated(arr5);
98  if (isallocated)
99  {
100  int mmin = arr5.indexmin();
101  int mmax = arr5.indexmax();
102  for (int i = mmin; i <= mmax; ++i)
103  {
104  if (sub_unallocated(arr5(i)))
105  {
106  isallocated = false;
107  break;
108  }
109  }
110  }
111  return !isallocated;
112 }
120 {
121  return !allocated(v);
122 }
130 {
131  int isallocated = allocated(m);
132  if (isallocated)
133  {
134  int mmin = m.indexmin();
135  int mmax = m.indexmax();
136  for (int i = mmin; i <= mmax; ++i)
137  {
138  if (sub_unallocated(m(i)))
139  {
140  isallocated = false;
141  break;
142  }
143  }
144  }
145  return !isallocated;
146 }
154 {
155  int isallocated = allocated(m);
156  if (isallocated)
157  {
158  int mmin = m.indexmin();
159  int mmax = m.indexmax();
160  for (int i = mmin; i <= mmax; ++i)
161  {
162  if (sub_unallocated(m(i)))
163  {
164  isallocated = false;
165  break;
166  }
167  }
168  }
169  return !isallocated;
170 }
177 int sub_unallocated(const d4_array& arr4)
178 {
179  int isallocated = allocated(arr4);
180  if (isallocated)
181  {
182  int mmin = arr4.indexmin();
183  int mmax = arr4.indexmax();
184  for (int i = mmin; i <= mmax; ++i)
185  {
186  if (sub_unallocated(arr4(i)))
187  {
188  isallocated = false;
189  break;
190  }
191  }
192  }
193  return !isallocated;
194 }
201 int sub_unallocated(const d5_array& arr5)
202 {
203  int isallocated = allocated(arr5);
204  if (isallocated)
205  {
206  int mmin = arr5.indexmin();
207  int mmax = arr5.indexmax();
208  for (int i = mmin; i <= mmax; ++i)
209  {
210  if (sub_unallocated(arr5(i)))
211  {
212  isallocated = false;
213  break;
214  }
215  }
216  }
217  return !isallocated;
218 }
226 {
227  return !allocated(v);
228 }
236 {
237  int isallocated = allocated(m);
238  if (isallocated)
239  {
240  int mmin = m.indexmin();
241  int mmax = m.indexmax();
242  for (int i = mmin; i <= mmax; ++i)
243  {
244  if (sub_unallocated(m(i)))
245  {
246  isallocated = false;
247  break;
248  }
249  }
250  }
251  return !isallocated;
252 }
259 int sub_unallocated(const i3_array& arr3)
260 {
261  int isallocated = allocated(arr3);
262  if (isallocated)
263  {
264  int mmin = arr3.indexmin();
265  int mmax = arr3.indexmax();
266  for (int i = mmin; i <= mmax; ++i)
267  {
268  if (sub_unallocated(arr3(i)))
269  {
270  isallocated = false;
271  break;
272  }
273  }
274  }
275  return !isallocated;
276 }
283 int sub_unallocated(const i4_array& arr4)
284 {
285  int isallocated = allocated(arr4);
286  if (isallocated)
287  {
288  int mmin = arr4.indexmin();
289  int mmax = arr4.indexmax();
290  for (int i = mmin; i <= mmax; ++i)
291  {
292  if (sub_unallocated(arr4(i)))
293  {
294  isallocated = false;
295  break;
296  }
297  }
298  }
299  return !isallocated;
300 }
307 int sub_unallocated(const i5_array& arr5)
308 {
309  int isallocated = allocated(arr5);
310  if (isallocated)
311  {
312  int mmin = arr5.indexmin();
313  int mmax = arr5.indexmax();
314  for (int i = mmin; i <= mmax; ++i)
315  {
316  if (sub_unallocated(arr5(i)))
317  {
318  isallocated = false;
319  break;
320  }
321  }
322  }
323  return !isallocated;
324 }
int indexmax() const
Definition: fvar.hpp:5622
int indexmax() const
Definition: imatrix.h:142
int indexmin() const
Definition: fvar.hpp:5893
int sub_unallocated(const dvar_vector &)
Author: David Fournier Copyright (c) 2008-2017 Regents of the University of California.
Definition: suballoc.cpp:13
Description not yet available.
Definition: imatrix.h:69
int indexmin() const
Definition: fvar.hpp:6190
int indexmin() const
Definition: imatrix.h:138
int indexmax() const
Definition: fvar.hpp:3822
Description not yet available.
Definition: fvar.hpp:5433
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
Definition: fvar.hpp:2917
ADMB variable vector.
Definition: fvar.hpp:2172
int indexmin() const
Definition: fvar.hpp:4021
int indexmax() const
Definition: fvar.hpp:4273
Description not yet available.
Definition: fvar.hpp:5769
Description not yet available.
Definition: fvar.hpp:5161
int indexmax() const
Definition: fvar.hpp:6650
int indexmax() const
Definition: fvar.hpp:6194
Array of integers(int) with indexes from index_min to indexmax.
Definition: ivector.h:50
int indexmax() const
Definition: fvar.hpp:5897
Description not yet available.
Definition: fvar.hpp:6498
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
int indexmin() const
Definition: fvar.hpp:6646
Description not yet available.
Definition: fvar.hpp:2819
Description not yet available.
Definition: fvar.hpp:4197
int indexmin() const
Definition: fvar.hpp:5305
int indexmax() const
Definition: fvar.hpp:2921
int indexmax(void) const
Definition: fvar.hpp:2572
int indexmin() const
Definition: fvar.hpp:6475
int indexmax() const
Definition: fvar.hpp:5309
int indexmax() const
Definition: fvar.hpp:6479
Class definition of matrix with derivitive information .
Definition: fvar.hpp:2480
Description not yet available.
Definition: fvar.hpp:6067
int indexmax() const
Definition: fvar.hpp:4025
Description not yet available.
Definition: fvar.hpp:6331
int indexmin() const
Definition: fvar.hpp:3818
Description not yet available.
Definition: fvar.hpp:3944
Description not yet available.
Definition: fvar.hpp:3727
int indexmin() const
Definition: fvar.hpp:5621
int indexmin(void) const
Definition: fvar.hpp:2568
int indexmin() const
Definition: fvar.hpp:4272