Changeset 3386 in Sophya for trunk/SophyaLib
- Timestamp:
- Nov 21, 2007, 7:00:39 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tarray.h
r3332 r3386 96 96 97 97 // Data Access: operator overloaded inline acces methods 98 inline T const& operator()(sa_size_t ix, sa_size_t iy=0) const ; 99 inline T& operator()(sa_size_t ix, sa_size_t iy=0); 98 100 inline T const& operator()(sa_size_t ix, sa_size_t iy, sa_size_t iz) const ; 99 101 inline T& operator()(sa_size_t ix, sa_size_t iy, sa_size_t iz); … … 371 373 } 372 374 373 //! Return element (ix,iy,iz) value 375 //=======> a(ix,iy) OR a(ix) accees operators 376 //! Return the value of the element (ix,iy) 377 template <class T> 378 inline T const& TArray<T>::operator()(sa_size_t ix, sa_size_t iy) const 379 { 380 #ifdef SO_BOUNDCHECKING 381 CheckBound(ix, iy, 0, 0, 0, 4); 382 #endif 383 return ( *( mNDBlock.Begin()+ offset_+ 384 ix*step_[0] + iy*step_[1] ) ); 385 } 386 387 //! Return a reference to the element (ix,iy) 388 template <class T> 389 inline T & TArray<T>::operator()(sa_size_t ix, sa_size_t iy) 390 { 391 #ifdef SO_BOUNDCHECKING 392 CheckBound(ix, iy, 0, 0, 0, 4); 393 #endif 394 return ( *( mNDBlock.Begin()+ offset_+ 395 ix*step_[0] + iy*step_[1] ) ); 396 } 397 398 //=======> a(ix,iy,iz) accees operators 399 //! Return the value of the element (ix,iy,iz) 374 400 template <class T> 375 401 inline T const& TArray<T>::operator()(sa_size_t ix, sa_size_t iy, sa_size_t iz) const … … 382 408 } 383 409 384 //! Return element (ix,iy,iz) value410 //! Return a reference to the element (ix,iy,iz) 385 411 template <class T> 386 412 inline T & TArray<T>::operator()(sa_size_t ix, sa_size_t iy, sa_size_t iz) … … 393 419 } 394 420 395 //! Operator () : return element (ix,iy,iz,it,iu) value 421 //=======> a(ix,iy,iz,it,iu) or a(ix,iy,iz,it) accees operators 422 //! Return the value of the element (ix,iy,iz,it,iu) 396 423 template <class T> 397 424 inline T const& TArray<T>::operator()(sa_size_t ix, sa_size_t iy, sa_size_t iz, sa_size_t it, sa_size_t iu) const … … 405 432 } 406 433 407 //! Operator () : return element (ix,iy,iz,it,iu) value434 //! Return a reference to the element (ix,iy,iz,it,iu) 408 435 template <class T> 409 436 inline T & TArray<T>::operator()(sa_size_t ix, sa_size_t iy, sa_size_t iz, sa_size_t it, sa_size_t iu)
Note:
See TracChangeset
for help on using the changeset viewer.