Revision 1921 trunk/src/linad99/f5arr.cpp

f5arr.cpp (revision 1921)
215 215
 */
216 216
    dvar4_array& dvar5_array::operator ( ) (int i)
217 217
    {
218
      #ifdef SAFE_ARRAYS
219 218
      if (i < indexmin() || i > indexmax())
220 219
      {
221 220
       ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
222 221
       "dvar3_array& dvar5_array::operator () (int i)",
223 222
       indexmin(), indexmax(), i);
224 223
      }
225
      #endif
226 224
      return t[i];
227 225
    }
228 226

  
......
232 230
 */
233 231
    dvar4_array& dvar5_array::operator [] (int i)
234 232
    {
235
      #ifdef SAFE_ARRAYS
236 233
      if (i < indexmin() || i > indexmax())
237 234
      {
238 235
       ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
239 236
       "dvar3_array& dvar5_array::operator [] (int i)",
240 237
       indexmin(), indexmax(), i);
241 238
      }
242
      #endif
243 239
      return t[i];
244 240
    }
245 241

  
......
249 245
 */
250 246
    dvar3_array& dvar5_array::operator ( ) (int i ,int j)
251 247
    {
252
      #ifdef SAFE_ARRAYS
253 248
      if (i < indexmin() || i > indexmax())
254 249
      {
255 250
       ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
256 251
       "dvar3_array& dvar5_array::operator ( ) (int i,int j)",
257 252
       indexmin(), indexmax(), i);
258 253
      }
259
      #endif
260 254
      return elem(i)(j);
261 255
    }
262 256

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

  
......
283 275
 */
284 276
    dvar_vector& dvar5_array::operator ( ) (int i,int j,int k,int l)
285 277
    {
286
      #ifdef SAFE_ARRAYS
287 278
      if (i < indexmin() || i > indexmax())
288 279
      {
289 280
       ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
290 281
       "dvar_vector& dvar5_array::operator ( ) (int i,int j,int k,int l)",
291 282
       indexmin(), indexmax(), i);
292 283
      }
293
      #endif
294 284
      return elem(i)(j,k,l);
295 285
    }
296 286

  
......
300 290
 */
301 291
    prevariable dvar5_array::operator ( ) (int i,int j,int k,int l,int m)
302 292
    {
303
      #ifdef SAFE_ARRAYS
304 293
      if (i < indexmin() || i > indexmax())
305 294
      {
306 295
       ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
307 296
       "prevariable dvar5_array::operator ( ) (int i,int j,int k,int l,int m)",
308 297
       indexmin(), indexmax(), i);
309 298
      }
310
      #endif
311 299
      return elem(i)(j,k,l,m);
312 300
    }
313 301

  
......
317 305
 */
318 306
const dvar4_array& dvar5_array::operator()(int i) const
319 307
    {
320
      #ifdef SAFE_ARRAYS
321 308
        if (i<indexmin()||i>indexmax())
322 309
        { cerr << "Error  index out of bounds in\n"
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff