17 for (
int i = mmin; i <= mmax; ++i)
37 for (
int i=nrl; i<=nrh; i++)
70 cerr <<
"Warning -- Unable to shallow copy an unallocated dvar5_array.\n";
105 cerr <<
"Warning -- Unable to deallocate an unallocated dvar5_array.\n";
126 cerr <<
"Incompatible bounds in dvar5_array& dvar5_array::operator=(const dvar5_array&)\n";
132 for (
int i = mmin; i <= mmax; ++i)
153 cerr <<
"Incompatible bounds in dvar5_array& dvar5_array::operator=(const dvar5_array&)\n";
159 for (
int i = mmin; i <= mmax; ++i)
179 cerr <<
" Error: dvar5_array unable to allocate memory in "
180 << __FILE__ <<
':' << __LINE__ <<
'\n';
185 cerr <<
" Error: dvar5_array unable to allocate memory in "
186 << __FILE__ <<
':' << __LINE__ <<
'\n';
193 for (
int i = mmin; i <= mmax; ++i)
210 cerr <<
" Error: dvar5_array unable to allocate memory in "
211 << __FILE__ <<
':' << __LINE__ <<
'\n';
216 cerr <<
" Error: dvar5_array unable to allocate memory in "
217 << __FILE__ <<
':' << __LINE__ <<
'\n';
223 for (
int i = mmin; i <= mmax; ++i)
240 if (i < indexmin() || i > indexmax())
243 "dvar3_array& dvar5_array::operator () (int i)",
244 indexmin(), indexmax(), i);
258 "dvar3_array& dvar5_array::operator [] (int i)",
268 dvar3_array& dvar5_array::operator ( ) (
int i ,
int j)
270 if (i < indexmin() || i > indexmax())
273 "dvar3_array& dvar5_array::operator ( ) (int i,int j)",
274 indexmin(), indexmax(), i);
276 return (t + i)->operator()(j);
283 dvar_matrix& dvar5_array::operator ( ) (
int i,
int j,
int k)
285 if (i < indexmin() || i > indexmax())
288 "dvar_matrix& dvar5_array::operator ( ) (int i,int j,int k)",
289 indexmin(), indexmax(), i);
291 return (t + i)->operator()(j,k);
298 dvar_vector& dvar5_array::operator ( ) (
int i,
int j,
int k,
int l)
300 if (i < indexmin() || i > indexmax())
303 "dvar_vector& dvar5_array::operator ( ) (int i,int j,int k,int l)",
304 indexmin(), indexmax(), i);
306 return (t + i)->operator()(j,k,l);
313 prevariable dvar5_array::operator ( ) (
int i,
int j,
int k,
int l,
int m)
315 if (i < indexmin() || i > indexmax())
318 "prevariable dvar5_array::operator ( ) (int i,int j,int k,int l,int m)",
319 indexmin(), indexmax(), i);
321 return (t + i)->operator()(j,k,l,m);
331 { cerr <<
"Error index out of bounds in\n"
332 "dvar4_array& dvar5_array::operator ( )" <<
endl;
345 { cerr <<
"Error index out of bounds in\n"
346 "dvar4_array& dvar5_array::operator []" <<
endl;
359 { cerr <<
"Error index out of bounds in\n"
360 "dvar3_array& dvar5_array::operator ( )" <<
endl;
363 return (
t + i)->operator()(j);
373 { cerr <<
"Error index out of bounds in\n"
374 "dvar3_array& dvar5_array::operator ( )" <<
endl;
377 return (
t + i)->operator()(j,k);
387 { cerr <<
"Error hslice index out of bounds in\n"
388 "dvar_vector& dvar5_array::operator ( )" <<
endl;
391 return (
t + i)->operator()(j,k,l);
401 { cerr <<
"Error hslice index out of bounds in\n"
402 "dvar_vector& dvar5_array::operator ( )" <<
endl;
405 return (
t + i)->operator()(j,k,l,m);
414 int nrh,
int ncl,
int nch,
int l5,
int u5)
416 allocate(hsl,hsu,sl,sh,nrl,nrh,ncl,nch,l5,u5);
428 allocate(hsl,hsu,sl,sh,nrl,nrh,ncl,nch,l5,u5);
444 cerr <<
" Error: dvar5_array unable to allocate memory in "
445 << __FILE__ <<
':' << __LINE__ <<
'\n';
450 cerr <<
" Error: dvar5_array unable to allocate memory in "
451 << __FILE__ <<
':' << __LINE__ <<
'\n';
457 for (
int i = hsl; i <= hsu; ++i)
459 pti->
allocate(sl, sh, nrl, nrh, ncl, nch, l5, u5);
485 cerr <<
" Error: dvar5_array unable to allocate memory in "
486 << __FILE__ <<
':' << __LINE__ <<
'\n';
491 cerr <<
" Error: dvar5_array unable to allocate memory in "
492 << __FILE__ <<
':' << __LINE__ <<
'\n';
497 for (
int i = hsl; i <= hsu; ++i)
527 cerr <<
" Error: dvar5_array unable to allocate memory in "
528 << __FILE__ <<
':' << __LINE__ <<
'\n';
533 cerr <<
" Error: dvar5_array unable to allocate memory in "
534 << __FILE__ <<
':' << __LINE__ <<
'\n';
543 for (
int i = il; i <= iu; ++i)
~dvar5_array()
Destructor.
Base class for dvariable.
Uses polymorphism to get index information from various data types to be used in constructing and all...
Description not yet available.
Description not yet available.
int allocated(const ivector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void shallow_copy(const dvar4_array &)
Shallow copy other data structure pointers.
void initialize(void)
Description not yet available.
dvar5_array()
Description not yet available.
dvar4_array & operator[](int i)
void deallocate(void)
Deallocate dvar5_array memory.
dvar5_array sub(int hhsl, int hhsu)
Description not yet available.
dvar4_array & operator()(int i)
Description not yet available.
dvar5_array & operator=(const d5_array &)
Description not yet available.
prnstream & endl(prnstream &)
Description not yet available.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void allocate(int hsl, int hsu, int sl, int sh, int nrl, int nrh, int ncl, int nch)
Allocate variable array with dimensions [hsl to hsu] x [sl to sh] x [nrl to nrh] x [ncl to nch]...
void allocate(void)
Description not yet available.
Description not yet available.
#define ADMB_ARRAY_BOUNDS_ERROR(message, function, lower_bounds, upper_bounds, index)
void initialize()
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Class definition of matrix with derivitive information .
Description not yet available.
void shallow_copy(const dvar5_array &)
Shallow copy other data structure pointers.
unsigned int size() const