ADMB Documentation  11.1.1913
 All Classes Files Functions Variables Typedefs Friends Defines
d3arr11.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: d3arr11.cpp 1698 2014-02-27 23:39:17Z 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 
00017 const dmatrix& d3_array::operator()(int i) const
00018 {
00019 #ifdef SAFE_ARRAYS
00020   if (i<slicemin())
00021   {
00022     cerr << "matrix bound exceeded"
00023          << " -- row index too low in 3d_array::operator[]"
00024          << "value was" << i;
00025     ad_exit(21);
00026   }
00027   if (i>slicemax())
00028   {
00029     cerr << "matrix bound exceeded"
00030          << " -- row index too high in 3d_array::operator[]"
00031          << "value was" << i;
00032     ad_exit(22);
00033   }
00034 #endif
00035   return t[i];
00036 }
00037 #endif