39 cerr <<
"Warning -- Unable to shallow copy an unallocated dvar4_array.\n";
54 for (
int i=nrl; i<=nrh; i++)
85 cerr <<
"Warning -- Unable to deallocate an unallocated dvar4_array.\n";
104 if (i < hslicemin() || i > hslicemax())
107 "dvar3_array& dvar4_array::operator() (int i)",
108 hslicemin(), hslicemax(), i);
122 "dvar3_array& dvar4_array::operator[] (int i)",
137 "dvar_matrix& dvar4_array::operator() (int i, int j)",
140 return (
t + i)->operator()(j);
152 "dvar_vector& dvar4_array::operator() (int i, int j, int k)",
155 return (
t + i)->operator()(j, k);
162 prevariable dvar4_array::operator ( ) (
int i,
int j,
int k,
int l)
164 if (i < hslicemin() || i > hslicemax())
167 "prevariable& dvar4_array::operator() (int i, int j, int k)",
168 hslicemin(), hslicemax(), i);
170 return ( ((*
this)(i,j,k))(l));
180 { cerr <<
"Error hslice index out of bounds in\n"
181 "dvar3_array& dvar4_array::operator ( )" <<
endl;
194 { cerr <<
"Error hslice index out of bounds in\n"
195 "dvar3_array& dvar4_array::operator ( )" <<
endl;
208 { cerr <<
"Error hslice index out of bounds in\n"
209 "dvarmatrix& dvar4_array::operator ( )" <<
endl;
212 return (
t + i)->operator()(j);
222 { cerr <<
"Error hslice index out of bounds in\n"
223 "dvarvector& dvar4_array::operator ( )" <<
endl;
226 return (
t + i)->operator()(j, k);
236 { cerr <<
"Error hslice index out of bounds in\n"
237 "double& dvar4_array::operator ( )" <<
endl;
240 return (
t + i)->operator()(j, k, l);
255 cerr <<
"Incompatible bounds in dvar4_array& dvar4_array::operator=(const d4_array&)\n";
261 for (
int i=mmin; i<=mmax; ++i)
281 cerr <<
"Incompatible bounds in dvar4_array& dvar4_array::operator=(const dvar4_array&)\n";
287 for (
int i=mmin; i<=mmax; ++i)
317 cerr <<
" Error: dvar4_array unable to allocate memory in "
318 << __FILE__ <<
':' << __LINE__ <<
'\n';
323 cerr <<
" Error: dvar4_array unable to allocate memory in "
324 << __FILE__ <<
':' << __LINE__ <<
'\n';
330 for (
int i = hsl; i <= hsu; ++i)
332 pti->
allocate(sl, sh, nrl, nrh, ncl, nch);
357 cerr <<
" Error: dvar4_array unable to allocate memory in "
358 << __FILE__ <<
':' << __LINE__ <<
'\n';
363 cerr <<
" Error: dvar4_array unable to allocate memory in "
364 << __FILE__ <<
':' << __LINE__ <<
'\n';
370 for (
int i=hsl; i<=hsu; ++i)
372 pti->
allocate(sl, sh, nrl, nrh, ncl, nch);
398 cerr <<
" Error: dvar4_array unable to allocate memory in "
399 << __FILE__ <<
':' << __LINE__ <<
'\n';
404 cerr <<
" Error: dvar4_array unable to allocate memory in "
405 << __FILE__ <<
':' << __LINE__ <<
'\n';
413 for (
int i = il; i <= iu; ++i)
415 pti->
allocate(sl(i), sh(i), nrl(i), nrh(i), ncl(i), nch(i));
430 cerr <<
" Error: dvar4_array unable to allocate memory in "
431 << __FILE__ <<
':' << __LINE__ <<
'\n';
436 cerr <<
" Error: dvar4_array unable to allocate memory in "
437 << __FILE__ <<
':' << __LINE__ <<
'\n';
445 for (
int i = il; i <= iu; ++i)
447 pti->
allocate(sl(i), sh(i), nrl(i), nrh(i));
461 cerr <<
" Error: dvar4_array unable to allocate memory in "
462 << __FILE__ <<
':' << __LINE__ <<
'\n';
467 cerr <<
" Error: dvar4_array unable to allocate memory in "
468 << __FILE__ <<
':' << __LINE__ <<
'\n';
476 for (
int i = il; i <= iu; ++i)
491 cerr <<
" Error: dvar4_array unable to allocate memory in "
492 << __FILE__ <<
':' << __LINE__ <<
'\n';
497 cerr <<
" Error: dvar4_array unable to allocate memory in "
498 << __FILE__ <<
':' << __LINE__ <<
'\n';
506 for (
int i = il; i <= iu; ++i)
533 cerr <<
" Error: dvar4_array unable to allocate memory in "
534 << __FILE__ <<
':' << __LINE__ <<
'\n';
539 cerr <<
" Error: dvar4_array unable to allocate memory in "
540 << __FILE__ <<
':' << __LINE__ <<
'\n';
545 for (
int i = hsl; i <= hsu; ++i)
547 pti->
allocate(sl, sh, nrl(i), nrh(i), ncl(i), nch(i));
556 int nrh,
int ncl,
int nch)
558 allocate(hsl,hsu,sl,sh,nrl,nrh,ncl,nch);
569 allocate(hsl,hsu,sl,sh,nrl,nrh,ncl,nch);
579 allocate(hsl,hsu,sl,sh,nrl,nrh,ncl,nch);
593 for (
int i = min; i <=
max; ++i)
606 int nrl,
const imatrix& nrh,
int ncl,
int nch)
608 allocate(hsl,hsu,sl,sh,nrl,nrh,ncl,nch);
623 cerr <<
" Error: dvar4_array unable to allocate memory in "
624 << __FILE__ <<
':' << __LINE__ <<
'\n';
629 cerr <<
" Error: dvar4_array unable to allocate memory in "
630 << __FILE__ <<
':' << __LINE__ <<
'\n';
636 for (
int i = hsl; i <= hsu; ++i)
638 pti->
allocate(sl,sh(i),nrl,nrh(i),ncl,nch);
655 for (
int i = min; i <=
max; ++i)
673 cerr <<
" Error: dvar4_array unable to allocate memory in "
674 << __FILE__ <<
':' << __LINE__ <<
'\n';
679 cerr <<
" Error: dvar4_array unable to allocate memory in "
680 << __FILE__ <<
':' << __LINE__ <<
'\n';
687 for (
int i = min; i <=
max; ++i)
703 cerr <<
" Error: dvar4_array unable to allocate memory in "
704 << __FILE__ <<
':' << __LINE__ <<
'\n';
709 cerr <<
" Error: dvar4_array unable to allocate memory in "
710 << __FILE__ <<
':' << __LINE__ <<
'\n';
717 for (
int i = min; i <=
max; ++i)
Base class for dvariable.
dvar4_array & operator=(const d4_array &)
Description not yet available.
Uses polymorphism to get index information from various data types to be used in constructing and all...
Description not yet available.
void allocate(int sl, int sh, int nrl, int nrh, int ncl, int nch)
Allocate variable vector of matrices with dimensions [sl to sh] x ([nrl to nrh] x [ncl to nch]) where...
friend class four_array_shape
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.
void initialize(void)
Description not yet available.
dvar3_array & operator()(int i)
void allocate(void)
Initializes to NULL.
Description not yet available.
prnstream & endl(prnstream &)
Array of integers(int) with indexes from index_min to indexmax.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void deallocate(void)
Deallocate dvar4_array memory.
dvar4_array sub(int, int)
Description not yet available.
unsigned int hslicesize() const
Description not yet available.
#define ADMB_ARRAY_BOUNDS_ERROR(message, function, lower_bounds, upper_bounds, index)
Class definition of matrix with derivitive information .
~dvar4_array()
Destructor.
dvar4_array()
Default Constructor.
Description not yet available.
dvar3_array & operator[](int i)