ADMB Documentation  11.1.1903
 All Classes Files Functions Variables Typedefs Friends Defines
f3arr18.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: f3arr18.cpp 1715 2014-03-03 19:38:48Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include "fvar.hpp"
00012 #ifndef OPT_LIB
00013 
00018 const dvar_matrix& dvar3_array::operator()(int i) const
00019  {
00020    #ifdef SAFE_ARRAYS
00021      if (i<slicemin())
00022      {
00023        cerr << "matrix bound exceeded -- row index too low in "
00024        "3d_array::operator[]"
00025              << "value was" << i;
00026        ad_exit(21);
00027      }
00028      if (i>slicemax())
00029      {
00030        cerr << "matrix bound exceeded -- row index too high in "
00031        "3d_array::operator[]"
00032              << "value was" << i;
00033        ad_exit(22);
00034      }
00035    #endif
00036    return( t[i]);
00037  }
00038 #endif