ADMB Documentation  11.1.1920
 All Classes Files Functions Variables Typedefs Friends Defines
fvar_m48.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: fvar_m48.cpp 1919 2014-04-22 22:02:01Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 //#undef OPT_LIB
00012 #include "fvar.hpp"
00013 
00014 #if !defined(OPT_LIB)
00015 
00020 const dvar_vector& dvar_matrix::operator()(int i) const
00021  {
00022    #ifdef SAFE_ARRAYS
00023      if (i<rowmin())
00024      {
00025        cerr << "matrix bound exceeded -- row index too low in "
00026        "dvar_matrix::operator()"
00027              << "value was" << i << endl;
00028        ad_exit(21);
00029      }
00030      if (i>rowmax())
00031      {
00032        cerr << "matrix bound exceeded -- row index too high in "
00033        "dvar_matrix::operator()"
00034              << "value was" << i << endl;
00035        ad_exit(22);
00036      }
00037    #endif
00038    return (m[i]);
00039  }
00040 #endif