Revision 1921 trunk/src/linad99/d5arr.cpp

d5arr.cpp (revision 1921)
150 150
 */
151 151
    d4_array& d5_array::operator ( ) (int i)
152 152
    {
153
      #ifdef SAFE_ARRAYS
154 153
      if (i < indexmin() || i > indexmax())
155 154
      {
156 155
        ADMB_ARRAY_BOUNDS_ERROR("index out of bounds",
157 156
        "d4_array& d5_array::operator()(int i)", indexmin(), indexmax(), i);
158 157
      }
159
      #endif
160 158
      //return t[i];
161 159
      return elem(i);
162 160
    }
......
167 165
 */
168 166
    d4_array& d5_array::operator [] (int i)
169 167
    {
170
      #ifdef SAFE_ARRAYS
171 168
      if (i < indexmin() || i > indexmax())
172 169
      {
173 170
        ADMB_ARRAY_BOUNDS_ERROR("index out of bounds",
174 171
        "d4_array& d5_array::operator[](int i)", indexmin(), indexmax(), i);
175 172
      }
176
      #endif
177 173
      return t[i];
178 174
    }
179 175

  
......
183 179
 */
184 180
    d3_array& d5_array::operator ( ) (int i, int j)
185 181
    {
186
      #ifdef SAFE_ARRAYS
187 182
      if (i < indexmin() || i > indexmax())
188 183
      {
189 184
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
190 185
        "d3_array& d5_array::operator[](int i, int j)",
191 186
        indexmin(), indexmax(), i);
192 187
      }
193
      #endif
194 188
      return elem(i)(j);
195 189
    }
196 190

  
......
200 194
 */
201 195
    dmatrix& d5_array::operator ( ) (int i,int j,int k)
202 196
    {
203
      #ifdef SAFE_ARRAYS
204 197
      if (i < indexmin() || i > indexmax())
205 198
      {
206 199
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
207 200
        "dmatrix& d5_array::operator[](int i, int j, int k)",
208 201
        indexmin(), indexmax(), i);
209 202
      }
210
      #endif
211 203
      return elem(i)(j,k);
212 204
    }
213 205

  
......
217 209
 */
218 210
    dvector& d5_array::operator ( ) (int i,int j,int k,int l)
219 211
    {
220
      #ifdef SAFE_ARRAYS
221 212
      if (i < indexmin() || i > indexmax())
222 213
      {
223 214
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
224 215
        "dvector& d5_array::operator[](int i, int j, int k, int l)",
225 216
        indexmin(), indexmax(), i);
226 217
      }
227
      #endif
228 218
      return elem(i)(j,k,l);
229 219
    }
230 220

  
......
234 224
 */
235 225
    double& d5_array::operator ( ) (int i,int j,int k,int l,int m)
236 226
    {
237
      #ifdef SAFE_ARRAYS
238 227
      if (i < indexmin() || i > indexmax())
239 228
      {
240 229
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
241 230
        "double& d5_array::operator[](int i, int j, int k, int l, int m)",
242 231
        indexmin(), indexmax(), i);
243 232
      }
244
      #endif
245 233
      return elem(i)(j,k,l,m);
246 234
    }
247 235

  
......
251 239
 */
252 240
const d4_array& d5_array::operator()(int i) const
253 241
    {
254
      #ifdef SAFE_ARRAYS
255 242
        if (i<indexmin()||i>indexmax())
256 243
        { cerr << "Error  index out of bounds in\n"
257 244
            "d4_array& d5_array::operator ( )" << endl;
258 245
          ad_exit(1);
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff