6 #if (__cplusplus > 199711L)
24 #if (__cplusplus <= 199711L)
45 for (
int i=nrl; i<=nrh; i++)
62 #if defined(__INTEL_COMPILER) || defined(__OPENCC__)
132 myheapcheck(
"Entering d3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
137 cerr <<
"Incompatible d3_array bounds in "
138 << __FILE__ <<
':' << __LINE__ <<
'\n';
145 int* pncli = ncl.
get_v() + sl;
146 for (
int i = sl; i <= sh; ++i)
148 pti->
allocate(nrl, nrh, *pncli, nch);
170 myheapcheck(
"Entering d3_array matrix(sl,sh,nrl,nrh,ncl,nch)" );
175 cerr <<
"Incompatible d3_array bounds in "
176 << __FILE__ <<
':' << __LINE__ <<
'\n';
182 int* pnchi = nch.
get_v() + sl;
183 for (
int i = sl; i <= sh; ++i)
185 pti->
allocate(nrl, nrh, ncl, *pnchi);
204 for (
int i = sl; i <= sh; ++i)
223 for (
int i = sl; i <= sh; ++i)
244 for (
int i = sl; i <= sh; ++i)
265 cerr <<
" Error: d3_array unable to allocate memory in "
266 << __FILE__ <<
':' << __LINE__ <<
'\n';
271 cerr <<
" Error: d3_array unable to allocate memory in "
272 << __FILE__ <<
':' << __LINE__ <<
'\n';
277 for (
int i = sl; i <= sh; ++i)
294 const dmatrix* potheri = &other(min);
295 for (
int i = min; i <=
max; ++i)
312 cerr <<
"Incompatible d3_array bounds in "
313 << __FILE__ <<
':' << __LINE__ <<
'\n';
318 cerr <<
" Error: d3_array unable to allocate memory in "
319 << __FILE__ <<
':' << __LINE__ <<
'\n';
324 cerr <<
" Error: d3_array unable to allocate memory in "
325 << __FILE__ <<
':' << __LINE__ <<
'\n';
330 const int* pnrhi = nrh.
get_v() + sl;
331 const int* pnrli = nrl.
get_v() + sl;
332 const ivector* pnchi = &nch(sl);
333 const ivector* pncli = &ncl(sl);
334 for (
int i = sl; i <= sh; ++i)
336 pti->
allocate(*pnrli, *pnrhi, *pncli, *pnchi);
363 cerr <<
"Incompatible d3_array bounds in "
364 << __FILE__ <<
':' << __LINE__ <<
'\n';
369 const int* pnrli = nrl.
get_v() + sl;
370 const int* pnrhi = nrh.
get_v() + sl;
371 for (
int i = sl; i <= sh; ++i)
373 pti->
allocate(*pnrli, *pnrhi, ncl, nch);
397 const int* pnrli = nrl.
get_v() + sl;
398 for (
int i = sl; i <= sh; ++i)
400 pti->
allocate(*pnrli, nrh, ncl, nch);
423 const int* pnrhi = nrh.
get_v() + sl;
424 for (
int i = sl; i <= sh; ++i)
426 pti->
allocate(nrl, *pnrhi, ncl, nch);
441 cerr <<
"Incompatible d3_array bounds in "
442 << __FILE__ <<
':' << __LINE__ <<
'\n';
447 cerr <<
" Error: d3_array unable to allocate memory in "
448 << __FILE__ <<
':' << __LINE__ <<
'\n';
453 cerr <<
" Error: d3_array unable to allocate memory in "
454 << __FILE__ <<
':' << __LINE__ <<
'\n';
459 const int* pnrhi = nrh.
get_v() + sl;
460 const int* pnrli = nrl.
get_v() + sl;
461 const ivector* pnchi = &nch(sl);
462 for (
int i = sl; i <= sh; ++i)
464 pti->
allocate(*pnrli, *pnrhi, ncl, *pnchi);
489 cerr <<
"Incompatible d3_array bounds in "
490 << __FILE__ <<
':' << __LINE__ <<
'\n';
495 cerr <<
" Error: d3_array unable to allocate memory in "
496 << __FILE__ <<
':' << __LINE__ <<
'\n';
501 cerr <<
" Error: d3_array unable to allocate memory in "
502 << __FILE__ <<
':' << __LINE__ <<
'\n';
507 const int* pnrhi = nrh.
get_v() + sl;
508 const ivector* pnchi = &nch(sl);
509 for (
int i = sl; i <= sh; ++i)
511 pti->
allocate(nrl, *pnrhi, ncl, *pnchi);
535 cerr <<
"Incompatible d3_array bounds in "
536 << __FILE__ <<
':' << __LINE__ <<
'\n';
541 const int* pnrhi = nrh.
get_v() + sl;
542 const int* pnrli = nrl.
get_v() + sl;
543 const int* pnchi = nch.
get_v() + sl;
544 const int* pncli = ncl.
get_v() + sl;
545 for (
int i = sl; i <= sh; ++i)
547 pti->
allocate(*pnrli, *pnrhi, *pncli, *pnchi);
575 cerr <<
"Incompatible d3_array bounds in "
576 << __FILE__ <<
':' << __LINE__ <<
'\n';
581 const int* pnchi = nch.
get_v() + sl;
582 const int* pncli = ncl.
get_v() + sl;
585 pti->
allocate(nrl, nrh, *pncli, *pnchi);
609 cerr <<
"Incompatible d3_array bounds in "
610 << __FILE__ <<
':' << __LINE__ <<
'\n';
615 int* pnrhi = nrh.
get_v() + sl;
616 int* pnchi = nch.
get_v() + sl;
617 for (
int i = sl; i <= sh; ++i)
619 pti->
allocate(nrl, *pnrhi, ncl, *pnchi);
699 cerr <<
"Warning -- Unable to shallow copy an unallocated d3_array.\n";
710 #if (__cplusplus <= 199711L)
742 cerr <<
"Warning -- Unable to deallocate an unallocated d3_array.\n";
759 : ncopies(0), slice_min(sl), slice_max(su)
void allocate(void)
Does NOT allocate, but initializes empty d3_array.
void myheapcheck(char *msg)
Does nothing.
Uses polymorphism to get index information from various data types to be used in constructing and all...
Description not yet available.
void allocate(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
int allocated(const ivector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
three_array_shape * shape
double sum(const d3_array &darray)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
d3_array(void)
Default constructor.
void shallow_copy(const d3_array &)
Shallow copy other data structure pointers.
Array of integers(int) with indexes from index_min to indexmax.
Description not yet available.
d3_array sub(int, int)
Description not yet available.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
void initialize(void)
Initializes all elements of d3_array to zero.
unsigned int slicesize() const
Description not yet available.
void initialize(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
three_array_shape(int sl, int sh)
Stores dimensions for dvar3_array.
void deallocate(void)
Deallocates d3_array memory.