AFF --- A container for numbers (array) by Friederich and Forbriger.
aff::ConstSeries< T > Class Template Reference

base class More...

#include <series.h>

Inheritance diagram for aff::ConstSeries< T >:
Collaboration diagram for aff::ConstSeries< T >:

Public Types

Various types

In particular due to our concept of const-correctness we need several typedefs to declare types derived from the element type of the array.

See also
Notes on the const-correctness of arrays
typedef aff::ConstSharedHeap< T > Trepresentation
 Type of representation. More...
 
typedef aff::LinearShape Tshape
 Type of shape. More...
 
typedef Tshape::Tstepper Tstepper
 Type of stepper. More...
 
typedef T Tvalue
 Element type. More...
 
typedef T * Tpointer
 Type of pointer to element. More...
 
typedef T & Treference
 Type of reference to element. More...
 
typedef const T Tconst_value
 Element type. More...
 
typedef const T * Tconst_pointer
 Type of pointer to element. More...
 
typedef const T & Tconst_reference
 Type of reference to element. More...
 
typedef ConstSeries< T > Tcontainer
 Type of this array. More...
 
typedef Tcontainer Tcontainer_of_const
 Type of the array of const values. More...
 
typedef Tcontainer Tcoc
 short for Tcontainer_of_const More...
 

Public Member Functions

const T & operator() (const Tsubscript &i) const
 Data read access. More...
 
const T * pointer () const
 
Tcontainer copyout () const
 create an identical copy (deep copy) of this array More...
 
const Trepresentation & representation () const
 offer conversion only to constant version of representation More...
 
const Tshape & shape () const
 provide access to const shape More...
 
Constructors

There is no reason to construct an aff::ConstSeries from scratch, since you can only read from ist. The only three reasons might be:

  1. As an element in another container. In that case we will use the default constructor.
  2. Within a constructor of aff::Series. In that case we will pass a shape and a representation.
  3. To construct a series from an aff::SharedHeap just to read it with tools of aff::ConstSeries.
 ConstSeries ()
 construct from nothing (empty) More...
 
 ConstSeries (const Tshape &shape, const Trepresentation &representation)
 construct from shape and representation More...
 
 ConstSeries (const Trepresentation &representation)
 construct from representation More...
 
Shape access
const Tsubscript & f () const
 (short for) first valid index More...
 
const Tsubscript & l () const
 (short for) last valid index More...
 
access declarations
const Tsubscript & first () const
 access to base class function More...
 
const Tsubscript & last () const
 return last legal index More...
 
Tsize size () const
 by size we mean the size defined by the shape More...
 
void setfirstindex (const Tsubscript &first)
 set first index to first More...
 
void setlastindex (const Tsubscript &last)
 set last index to last More...
 
void setindexrange (const Tsubscript &first, const Tsubscript last)
 set index range [ first , last ] More...
 
void shift (const Tsubscript &i)
 shift effective index range by i More...
 

Protected Member Functions

Tsubscript offset (const Tsubscript &i) const
 provide offset function to derived class More...
 

Private Member Functions

void check_consistency () const
 check consistency between shape and representation More...
 
const Tsubscript & first () const
 return first legal index More...
 
const Tsubscript & last () const
 return last legal index More...
 
Tsubscript offset (const Tsubscript &i) const
 return offset in representation for indes i More...
 
const Tsize & base () const
 return base for access to representation More...
 
Tsize size () const
 by size we mean the size defined by the shape More...
 
Tsize memory_size () const
 return size of addressed memory More...
 
LinearShape & shrink (const Tdim &i, const Tsubscript &first, const Tsubscript &last)
 set index range [ first , last ] for dimension i (used by aff::util::Subarray) More...
 
LinearShape & shrink (const Tdim &i, const Tsubscript &last)
 set last index of dimension i to last (used by aff::util::Subarray) More...
 
void setindexrange (const Tsubscript &first, const Tsubscript last)
 set index range [ first , last ] More...
 
void setfirstindex (const Tsubscript &first)
 set first index to first More...
 
void setlastindex (const Tsubscript &last)
 set last index to last More...
 
void shift (const Tsubscript &i)
 shift effective index range by i More...
 

Private Attributes

Trepresentation Mrepresentation
 my memory representation More...
 

Static Private Attributes

static const Tdim Mmax_dimen =1
 the linear shape is used to address one-dimensional arrays More...
 

Detailed Description


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