Revision 1921 trunk/src/linad99/d3arr1.cpp
d3arr1.cpp (revision 1921)  

18  18 
*/ 
19  19 
double& d3_array::operator () (int k, int i, int j) 
20  20 
{ 
21 
#ifdef SAFE_ARRAYS 

22  21 
if (k<slicemin()) 
23  22 
{ 
24  23 
ADMB_ARRAY_BOUNDS_ERROR("array bound exceeded  slice index too low", 
...  ...  
31  30 
"dmatrix& d3_array::operator() (int k, int i, int j)", 
32  31 
slicemin(), slicemax(), k); 
33  32 
} 
34 
#endif 

35  33 
return ( (elem(k))(i,j) ); 
36  34 
} 
37  35  
...  ...  
41  39 
*/ 
42  40 
dvector& d3_array::operator () (int k, int i) 
43  41 
{ 
44 
#ifdef SAFE_ARRAYS 

45  42 
if (k<slicemin()) 
46  43 
{ 
47  44 
ADMB_ARRAY_BOUNDS_ERROR("array bound exceeded  slice index too low", 
...  ...  
54  51 
"dmatrix& d3_array::operator() (int k, int i)", 
55  52 
slicemin(), slicemax(), k); 
56  53 
} 
57 
#endif 

58  54 
return ( (elem(k))(i) ); 
59  55 
} 
60  56  
...  ...  
64  60 
*/ 
65  61 
dmatrix& d3_array::operator[] (int i) 
66  62 
{ 
67 
#ifdef SAFE_ARRAYS 

68  63 
if (i<slicemin()) 
69  64 
{ 
70  65 
ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded  row index too low", 
...  ...  
75  70 
ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded  row index too high", 
76  71 
"dmatrix& d3_array::operator[] (int i)", indexmin(), indexmax(), i); 
77  72 
} 
78 
#endif 

79  73 
return(t[i]); 
80  74 
} 
81  75  
...  ...  
85  79 
*/ 
86  80 
dmatrix& d3_array::operator() (int i) 
87  81 
{ 
88 
#ifdef SAFE_ARRAYS 

89  82 
if (i<slicemin()) 
90  83 
{ 
91  84 
ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded  row index too low", 
...  ...  
96  89 
ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded  row index too high", 
97  90 
"dmatrix& d3_array::operator() (int i)", indexmin(), indexmax(), i); 
98  91 
} 
99 
#endif 

100  92 
return(t[i]); 
101  93 
} 
102  94 
#endif 
Also available in: Unified diff