Revision 1131 trunk/src/linad99/d3arr11.cpp

d3arr11.cpp (revision 1131)
9 9
 * Description not yet available.
10 10
 */
11 11
#include "fvar.hpp"
12
#ifdef USE_CONST
13
  #ifndef OPT_LIB
14

  
12
#ifndef OPT_LIB
15 13
/**
16 14
 * Description not yet available.
17 15
 * \param
18 16
 */
19 17
const dmatrix& d3_array::operator()(int i) const
20
 {
21
   #ifdef SAFE_ARRAYS
22
     if (i<slicemin())
23
     {
24
       cerr << "matrix bound exceeded -- row index too low in 3d_array::operator[]"
25
             << "value was" << i;
26
       ad_exit(21);
27
     }
28
     if (i>slicemax())
29
     {
30
       cerr << "matrix bound exceeded -- row index too high in 3d_array::operator[]"
31
             << "value was" << i;
32
       ad_exit(22);
33
     }
34
   #endif
35
   return(t[i]);
36
 }
37
  #endif
18
{
19
#ifdef SAFE_ARRAYS
20
  if (i<slicemin())
21
  {
22
    cerr << "matrix bound exceeded -- row index too low in 3d_array::operator[]"
23
         << "value was" << i;
24
    ad_exit(21);
25
  }
26
  if (i>slicemax())
27
  {
28
    cerr << "matrix bound exceeded -- row index too high in 3d_array::operator[]"
29
         << "value was" << i;
30
    ad_exit(22);
31
  }
38 32
#endif
33
  return t[i];
34
}
35
#endif

Also available in: Unified diff