AFF --- A container for numbers (array) by Friederich and Forbriger.

◆ shift() [2/2]

Strided & aff::Strided::shift ( const TIndexVec index)

shift

Definition at line 264 of file strided.cc.

References calculate_base(), first_offset(), Mfirst, Mlast, Mmax_dimen, and offset().

265  {
267  for (Tdim i=0; i<Mmax_dimen; i++)
268  {
269  Mfirst[i]+=index[i];
270  Mlast[i]+=index[i];
271  }
272  this->calculate_base(offset);
273  return(*this);
274  }
TIndexVec Mlast
Definition: strided.h:288
static const Tdim Mmax_dimen
instantiate static member (otherwise the linker won&#39;t find it)
Definition: strided.h:123
void calculate_base(const Tsubscript &offset)
construct do given first and last index
Definition: strided.cc:128
Tsubscript first_offset() const
first mapped position
Definition: strided.h:188
unsigned short int Tdim
Type to hold an array dimensionality.
Definition: types.h:49
ptrdiff_t Tsubscript
Type to hold an array&#39;s subscript value.
Definition: types.h:53
TIndexVec Mfirst
Definition: strided.h:287
Tsubscript offset(const TIndexVec &index) const
full dimensionality access
Definition: strided.h:220
Here is the call graph for this function: