Revision 1921 trunk/src/linad99/dmat8.cpp

dmat8.cpp (revision 1921)
19 19
 */
20 20
 dvector& dmatrix::operator() (int i)
21 21
 {
22
#  ifdef SAFE_ARRAYS
23 22
     if (i<rowmin())
24 23
     {
25 24
       ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too low",
......
30 29
       ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too high",
31 30
       "dvector& dmatrix::operator() (int i)", rowmin(), rowmax(), i);
32 31
     }
33
#  endif
34 32
   return *(m+i);
35 33
 }
36 34
#endif
......
42 40
 */
43 41
 double& dmatrix::operator() (int i, int j)
44 42
 {
45
#  ifdef SAFE_ARRAYS
46 43
     if (i<rowmin())
47 44
     {
48 45
       cerr << "matrix bound exceeded -- row index too low in "
......
75 72
             << "value was" << j;
76 73
       ad_exit(22);
77 74
     }
78
#  endif
79 75
   return( *((m[i]).v+j) );
80 76
 }
81 77

  
......
85 81
 */
86 82
const double& dmatrix::operator()(int i, int j) const
87 83
 {
88
#    ifdef SAFE_ARRAYS
89 84
     if (i<rowmin())
90 85
     {
91 86
       cerr << "matrix bound exceeded -- row index too low in "
......
118 113
             << "value was" << j;
119 114
       ad_exit(22);
120 115
     }
121
#    endif
122 116
   return( *((m[i]).v+j) );
123 117
 }
124 118
#endif

Also available in: Unified diff