ADMB Documentation  11.1.1913
 All Classes Files Functions Variables Typedefs Friends Defines
dmat32.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: dmat32.cpp 1711 2014-02-28 22:46:44Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include "fvar.hpp"
00012 #if !defined(OPT_LIB)
00013 
00017 const dvector& dmatrix::operator()(int i) const
00018  {
00019 #    ifdef SAFE_ARRAYS
00020      if (i<rowmin())
00021      {
00022        cerr << "matrix bound exceeded -- row index too low in "
00023        "dmatrix::operator()" << "value was" << i;
00024        ad_exit(21);
00025      }
00026      if (i>rowmax())
00027      {
00028        cerr << "matrix bound exceeded -- row index too high in "
00029        "dmatrix::operator()" << "value was" << i;
00030        ad_exit(22);
00031      }
00032 #    endif
00033    return *(m+i);
00034  }
00035 #endif