45 #ifndef AFF_LINEARSHAPE_H_VERSION 47 #define AFF_LINEARSHAPE_H_VERSION \ 48 "AFF_LINEARSHAPE_H V1.4" 102 "ERROR (LinearShape): inconsistent constructor arguments");
122 AFF_assert((i==0),
"ERROR (LinearShape::shrink): illegal dimension!");
131 AFF_assert((i==0),
"ERROR (LinearShape::shrink): illegal dimension!");
140 "ERROR (LinearShape::setindexrange): inconsistent arguments");
148 "ERROR (LinearShape::setfirstindex): index value out of range");
155 "ERROR (LinearShape::setlastindex): index value out of range");
173 #endif // AFF_LINEARSHAPE_H_VERSION (includeguard) aff::util::SeriesStepper Tstepper
stepper class for LinearShape (useid through Series by Iterator e.g.)
Root namespace of library.
Tsize memory_size() const
return size of addressed memory
LinearShape(const Tsubscript &first, const Tsubscript &last, const Tsubscript &firstinrepr)
constructor to use for full definition
void setlastindex(const Tsubscript &last)
set last index to last
void setfirstindex(const Tsubscript &first)
set first index to first
#define AFF_assert(C, M)
Check an assertion and report by throwing an exception.
Tsize size() const
by size we mean the size defined by the shape
void shift(const Tsubscript &i)
shift effective index range by i
const Tsubscript & first() const
return first legal index
static const Tdim Mmax_dimen
the linear shape is used to address one-dimensional arrays
Tsubscript offset(const Tsubscript &i) const
return offset in representation for indes i
LinearShape()
default constructor defines range of size 1
Shape for class aff::Series.
LinearShape & shrink(const Tdim &i, const Tsubscript &first, const Tsubscript &last)
set index range [ first , last ] for dimension i (used by aff::util::Subarray)
A stepper for aff::Series.
void setindexrange(const Tsubscript &first, const Tsubscript last)
set index range [ first , last ]
LinearShape & shrink(const Tdim &i, const Tsubscript &last)
set last index of dimension i to last (used by aff::util::Subarray)
unsigned short int Tdim
Type to hold an array dimensionality.
ptrdiff_t Tsubscript
Type to hold an array's subscript value.
Tsize Mbase
base for access to representation
Tsubscript Mlast
last valid index
const Tsize & base() const
return base for access to representation
Tsubscript Mfirst
first valid index
const Tsubscript & last() const
return last legal index
size_t Tsize
Type to hold the size of an array dimension.