AFF --- A container for numbers (array) by Friederich and Forbriger.
aff::util::StridedStepper Class Reference

A stepper for all strided shapes. More...

#include <stridedstepper.h>

Collaboration diagram for aff::util::StridedStepper:

Public Types

typedef aff::Strided Tshape
 Type of Shape corresponding class. More...
 
typedef Tshape::TIndexVec TIndexVec
 type of stride array More...
 
typedef Tshape::TSizeVec TSizeVec
 type of limit arrays More...
 

Public Member Functions

 StridedStepper (const Strided &strided)
 only non-copy constructor More...
 
const Tsubscriptcurrent () const
 return current index value for Representation access More...
 
const TIndexVecindex () const
 return current index vector for array access More...
 
const Tsubscriptindex (const Tdim &i) const
 return current index vector for array access More...
 
StridedStepperincr ()
 increment offset - return reference to itself More...
 
StridedStepperdecr ()
 decrement offset - return reference to itself More...
 
bool more () const
 returns true if there are more elements in incr-direction More...
 
bool less () const
 returns true if there are more elements in decr-direction More...
 
const bool & valid () const
 valid if not passed end or beginning More...
 
StridedSteppertofirst ()
 set current element index to the first - return reference to itself More...
 
StridedSteppertolast ()
 set current element index to the last - return reference to itself More...
 

Private Attributes

const TshapeMshape
 hold reference to shape More...
 
Tsubscript Mcurrent
 hold current position offset to memory More...
 
TIndexVec Mindex
 hold current index vector More...
 
TSizeVec Mcarry
 hold carry values More...
 
bool Mvalid
 cycle check More...
 
Tsubscript Mfirst_offset
 store current bounds to reduce execution time More...
 
Tsubscript Mlast_offset
 

Detailed Description

A stepper for all strided shapes.

Note
The Stepper holds a reference to the shape. It is designed to be a temporary object.
Examples:
tests/shapetest.cc.

Definition at line 64 of file stridedstepper.h.


The documentation for this class was generated from the following files: