Mercurial > hg > octave-lyh
comparison liboctave/Array.h @ 344:a7fd0923e4e4
[project @ 1994-02-08 05:52:11 by jwe]
author | jwe |
---|---|
date | Tue, 08 Feb 1994 05:56:08 +0000 |
parents | 42fe4794ded9 |
children | ff237c5f5002 |
comparison
equal
deleted
inserted
replaced
343:ecb6f1e11842 | 344:a7fd0923e4e4 |
---|---|
225 */ | 225 */ |
226 | 226 |
227 template <class T> | 227 template <class T> |
228 class DiagArray : public Array<T> | 228 class DiagArray : public Array<T> |
229 { | 229 { |
230 #if ! defined (_AIX) | |
230 private: | 231 private: |
231 | 232 |
232 class Proxy | 233 class Proxy |
233 { | 234 { |
234 public: | 235 public: |
274 DiagArray<T> *object; | 275 DiagArray<T> *object; |
275 | 276 |
276 }; | 277 }; |
277 | 278 |
278 friend class Proxy; | 279 friend class Proxy; |
280 #endif | |
279 | 281 |
280 protected: | 282 protected: |
281 | 283 |
282 int nr; | 284 int nr; |
283 int nc; | 285 int nc; |
301 | 303 |
302 int rows (void) const; | 304 int rows (void) const; |
303 int cols (void) const; | 305 int cols (void) const; |
304 int columns (void) const; | 306 int columns (void) const; |
305 | 307 |
308 #if defined (_AIX) | |
309 T& elem (int r, int c); | |
310 T& checkelem (int r, int c); | |
311 T& operator () (int r, int c); | |
312 #else | |
306 Proxy elem (int r, int c) | 313 Proxy elem (int r, int c) |
307 { | 314 { |
308 return Proxy (this, r, c); | 315 return Proxy (this, r, c); |
309 } | 316 } |
310 | 317 |
327 return Proxy (0, r, c); | 334 return Proxy (0, r, c); |
328 } | 335 } |
329 else | 336 else |
330 return Proxy (this, r, c); | 337 return Proxy (this, r, c); |
331 } | 338 } |
339 #endif | |
332 | 340 |
333 // No checking. | 341 // No checking. |
334 T& xelem (int r, int c); | 342 T& xelem (int r, int c); |
335 | 343 |
336 T elem (int r, int c) const; | 344 T elem (int r, int c) const; |