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

◆ shift() [1/2]

Strided & aff::Strided::shift ( const Tdim i,
const Tsubscript index 
)

shift

Definition at line 250 of file strided.cc.

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

Referenced by setfirst(), setup_from_size(), and Strided().

251  {
253  "ERROR (Strided::shift): illegal dimension");
255  Mfirst[i]+=index;
256  Mlast[i]+=index;
257  this->calculate_base(offset);
258  return(*this);
259  }
TIndexVec Mlast
Definition: strided.h:288
static const Tdim Mmax_dimen
instantiate static member (otherwise the linker won't find it)
Definition: strided.h:123
#define AFF_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:162
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
ptrdiff_t Tsubscript
Type to hold an array'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:
Here is the caller graph for this function: