ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
f3arr12.cpp
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Author: David Fournier
5  * Copyright (c) 2008-2012 Regents of the University of California
6  */
11 #include "fvar.hpp"
12 #ifndef OPT_LIB
13 
18 const prevariable dvar3_array::operator()(int k, int i, int j) const
19  {
20  if (k<slicemin())
21  {
22  cerr << "array bound exceeded -- slice index too"
23  " low in d3_array::operator(int,int,int)\n"
24  " mimumum bound is " << slicemin() << " you have "
25  << k << "\n";
26  ad_exit(1);
27  }
28  if (k>slicemax())
29  {
30  cerr << "array bound exceeded -- slice index too"
31  " high in d3_array::operator(int,int,int)\n"
32  " maximum bound is " << slicemax() << " you have "
33  << k << "\n";
34  ad_exit(1);
35  }
36  return ( ((t[k].m[i]).va)+j );
37  }
38 
43 const dvar_vector& dvar3_array::operator()(int k, int i) const
44  {
45  if (k<slicemin())
46  {
47  cerr << "array bound exceeded -- slice index too"
48  " low in d3_array::operator(int,int)\n"
49  " mimumum bound is " << slicemin() << " you have "
50  << k << "\n";
51  ad_exit(1);
52  }
53  if (k>slicemax())
54  {
55  cerr << "array bound exceeded -- slice index too"
56  " high in d3_array::operator(int,int)\n"
57  " maximum bound is " << slicemax() << " you have "
58  << k << "\n";
59  ad_exit(1);
60  }
61  return ( t[k].m[i]);
62  }
63 #endif
Base class for dvariable.
Definition: fvar.hpp:1315
int slicemin() const
Definition: fvar.hpp:4274
int slicemax() const
Definition: fvar.hpp:4275
exitptr ad_exit
Definition: gradstrc.cpp:53
ADMB variable vector.
Definition: fvar.hpp:2172
dvar_matrix * t
Definition: fvar.hpp:4199
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
const prevariable operator()(int k, int i, int j) const
Definition: fvar.hpp:4343