Revision 1921 trunk/src/linad99/d3arr8.cpp

d3arr8.cpp (revision 1921)
17 17
 */
18 18
const double& d3_array::operator()(int k, int i, int j) const
19 19
    {
20
      #ifdef SAFE_ARRAYS
21 20
        if (k<slicemin())
22 21
        {
23 22
          cerr << "array bound exceeded -- slice index too low in "
......
30 29
          "d3_array::operator(int,int)";
31 30
          ad_exit(1);
32 31
        }
33
      #endif
34 32
      return ( (elem(k))(i,j) );
35 33
    }
36 34

  
......
40 38
 */
41 39
const dvector& d3_array::operator()(int k, int i) const
42 40
    {
43
      #ifdef SAFE_ARRAYS
44 41
        if (k<slicemin())
45 42
        {
46 43
          cerr << "array bound exceeded -- slice index too low in "
......
53 50
          "d3_array::operator(int,int)";
54 51
          ad_exit(1);
55 52
        }
56
      #endif
57 53
      return ( (elem(k))(i) );
58 54
    }
59 55

  
......
63 59
 */
64 60
const dmatrix& d3_array::operator[](int i) const
65 61
 {
66
   #ifdef SAFE_ARRAYS
67 62
     if (i<slicemin())
68 63
     {
69 64
       cerr << "matrix bound exceeded -- row index too low in "
......
76 71
       "3d_array::operator[]" << "value was" << i;
77 72
       ad_exit(22);
78 73
     }
79
   #endif
80 74
   return(t[i]);
81 75
 }
82 76
#endif

Also available in: Unified diff