Revision 1921 trunk/src/linad99/d4arr.cpp

d4arr.cpp (revision 1921)
201 201
 */
202 202
    d3_array& d4_array::operator () (int i)
203 203
    {
204
      #ifdef SAFE_ARRAYS
205 204
      if (i < hslicemin() || i > hslicemax())
206 205
      {
207 206
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
208 207
        "d3_array& d4_array::operator() (int i)", hslicemin(), hslicemax(), i);
209 208
      }
210
      #endif
211 209
      return t[i];
212 210
    }
213 211

  
......
217 215
 */
218 216
    d3_array& d4_array::operator [] (int i)
219 217
    {
220
      #ifdef SAFE_ARRAYS
221 218
      if (i < hslicemin() || i > hslicemax())
222 219
      {
223 220
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
224 221
        "d3_array& d4_array::operator[] (int i)",
225 222
        hslicemin(), hslicemax(), i);
226 223
      }
227
      #endif
228 224
      return t[i];
229 225
    }
230 226

  
......
234 230
 */
235 231
    dmatrix& d4_array::operator ( ) (int i ,int j)
236 232
    {
237
      #ifdef SAFE_ARRAYS
238 233
      if (i < hslicemin() || i > hslicemax())
239 234
      {
240 235
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
241 236
        "dmatrix& d4_array::operator() (int i, int j)",
242 237
        hslicemin(), hslicemax(), i);
243 238
      }
244
      #endif
245 239
      return ((*this)(i))(j);
246 240
    }
247 241

  
......
251 245
 */
252 246
    dvector& d4_array::operator ( ) (int i,int j,int k)
253 247
    {
254
      #ifdef SAFE_ARRAYS
255 248
      if (i < hslicemin() || i > hslicemax())
256 249
      {
257 250
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
258 251
        "dvector& d4_array::operator() (int i, int j, int k)",
259 252
        hslicemin(), hslicemax(), i);
260 253
      }
261
      #endif
262 254
      return (((*this)(i,j))(k));
263 255
    }
264 256

  
......
268 260
 */
269 261
    double& d4_array::operator ( ) (int i,int j,int k,int l)
270 262
    {
271
      #ifdef SAFE_ARRAYS
272 263
      if (i < hslicemin() || i > hslicemax())
273 264
      {
274 265
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
275 266
        "double& d4_array::operator() (int i, int j, int k, int l)",
276 267
        hslicemin(), hslicemax(), i);
277 268
      }
278
      #endif
279 269
      return ( ((*this)(i,j,k))(l));
280 270
    }
281 271

  
......
285 275
 */
286 276
const d3_array& d4_array::operator()(int i) const
287 277
    {
288
      #ifdef SAFE_ARRAYS
289 278
        if (i<hslicemin()||i>hslicemax())
290 279
        { cerr << "Error hslice index out of bounds in\n"
291 280
            "d3_array& d4_array::operator ( )" << endl;
292 281
          ad_exit(1);
293 282
        }
294
      #endif
295 283
      return t[i];
296 284
    }
297 285

  
......
301 289
 */
302 290
const d3_array& d4_array::operator[](int i) const
303 291
    {
304
      #ifdef SAFE_ARRAYS
305 292
        if (i<hslicemin()||i>hslicemax())
306 293
        { cerr << "Error hslice index out of bounds in\n"
307 294
            "d3_array& d4_array::operator ( )" << endl;
308 295
          ad_exit(1);
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff