24 for (
int i = min; i <=
max; ++i)
42 for (
int i=nrl; i<=nrh; i++)
99 myheapcheck(
"Entering dvar3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
103 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
107 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
113 for (
int i = sl; i <= sh; ++i)
136 myheapcheck(
"Entering dvar3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
140 cerr <<
" Error allocating memory in dvar3_array constructor" <<
endl;
144 cerr <<
" Error allocating memory in dvar3_array constructor" <<
endl;
150 for (
int i = sl; i <= sh; ++i)
170 myheapcheck(
"Entering dvar3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
174 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
178 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
183 for (
int i=sl; i<=sh; i++)
203 myheapcheck(
"Entering dvar3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
207 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
211 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
216 for (
int i = sl; i <= sh; ++i)
261 myheapcheck(
"Entering dvar3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
265 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
269 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
274 int* pncli = ncl.
get_v() + sl;
275 for (
int i = sl; i <= sh; ++i)
277 pti->
allocate(nrl, nrh, *pncli, nch);
303 myheapcheck(
"Entering dvar3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
308 cerr <<
"Incompatible array bounds in "
309 "dmatrix(int nrl,int nrh, const ivector& ncl, const ivector& nch)" <<
endl;
314 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
318 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
323 const int* pncli = ncl.
get_v() + sl;
324 const int* pnchi = nch.
get_v() + sl;
325 for (
int i = sl; i <= sh; ++i)
327 pti->
allocate(nrl, nrh, ncl(i), nch(i));
353 myheapcheck(
"Entering dvar3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
357 cerr <<
"Incompatible array bounds in "
358 "dmatrix(int nrl,int nrh,int ncl, const ivector& nch)" <<
endl;
363 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
367 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
372 const int* pnchi = nch.
get_v() + sl;
373 for (
int i = sl; i <= sh; ++i)
375 pti->
allocate(nrl, nrh, ncl, *pnchi);
391 const dmatrix* pm1i = &m1(min);
392 for (
int i = min; i <=
max; ++i)
407 myheapcheck(
"Entering dvar3_array matrix(const d3_array& m1)" );
411 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
415 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
422 const dmatrix* pm1i = &m1(min);
423 for (
int i = min; i <=
max; ++i)
436 myheapcheck(
"Entering dvar3_array matrix(const d3_array& m1)" );
440 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
444 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
452 for (
int i = min; i <=
max; ++i)
498 myheapcheck(
"Entering d3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
502 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
506 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
510 int* pnrli = nrl.
get_v() + sl;
511 int* pnrhi = nrh.
get_v() + sl;
512 int* pncli = ncl.
get_v() + sl;
513 int* pnchi = nch.
get_v() + sl;
515 for (
int i = sl; i <= sh; ++i)
517 pti->
allocate(*pnrli, *pnrhi, *pncli, *pnchi);
564 myheapcheck(
"Entering d3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
568 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
572 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
576 int* pnrhi = nrh.
get_v() + sl;
577 int* pnchi = nch.
get_v() + sl;
579 for (
int i = sl; i <= sh; ++i)
581 pti->
allocate(nrl, *pnrhi, ncl, *pnchi);
621 myheapcheck(
"Entering d3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
625 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
629 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
633 int* pnrhi = nrh.
get_v() + sl;
635 for (
int i = sl; i <= sh; ++i)
637 pti->
allocate(nrl, *pnrhi, ncl, nch);
664 cerr <<
"Warning -- Unable to shallow copy an unallocated dvar3_array.\n";
694 cerr <<
"Warning -- Unable to deallocate an unallocated dvar3_array.\n";
711 const ivector& nrh,
int ncl,
int nch)
716 cerr <<
"Incompatible array bounds in "
717 "dmatrix(int nrl,int nrh, const ivector& ncl, const ivector& nch)" <<
endl;
722 cerr <<
"Error allocating memory in dvar3_array contructor" <<
endl;
726 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
730 int* pnrli = nrl.
get_v() + sl;
731 int* pnrhi = nrh.
get_v() + sl;
733 for (
int i = sl; i <= sh; ++i)
735 pti->
allocate(*pnrli, *pnrhi, ncl, nch);
762 cerr <<
"Incompatible array bounds in "
763 "dmatrix(int nrl,int nrh, const ivector& ncl, const ivector& nch)" <<
endl;
768 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
772 cerr <<
" Error allocating memory in dvar3_array contructor" <<
endl;
776 int* pnrli = nrl.
get_v() + sl;
778 for (
int i = sl; i <= sh; ++i)
780 pti->
allocate(*pnrli, nrh, ncl, nch);
void myheapcheck(char *msg)
Does nothing.
Uses polymorphism to get index information from various data types to be used in constructing and all...
int allocated(const ivector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void initialize(void)
Zero initialize allocated dvar_matrix, then saves adjoint function and position data.
void initialize(void)
Description not yet available.
Description not yet available.
dvar3_array sub(int, int)
Description not yet available.
dvar3_array(void)
Default constructor.
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.
Description not yet available.
Description not yet available.
void allocate(void)
Does not allocte, but initialize class members.
void shallow_copy(const dvar3_array &)
Shallow copy other data structure pointers.
Class definition of matrix with derivitive information .
unsigned int slicesize() const
three_array_shape * shape
void allocate(int nrl, int nrh, int ncl, int nch)
Allocates AD variable matrix with dimensions nrl to nrh by ncl to nch.
Description not yet available.
~dvar3_array()
Destructor.
void deallocate()
Deallocate dvar3_array memory.