82 #ifndef AFF_SERIES_H_VERSION 84 #define AFF_SERIES_H_VERSION \ 198 {
return(this->
first()); }
201 {
return(this->
last()); }
353 using Tbase::operator();
404 AFF_assert((this->Tshape::offset(this->first())>=0),
405 "ERROR (ConstSeries): invalid shape");
406 AFF_assert((this->Tshape::offset(this->last())<
408 "ERROR (ConstSeries): shape and representation are inconsistent");
417 for (
Tsubscript i=this->first(); i<=this->last(); i++)
418 { Mrepresentation[this->Tbase::offset(i)]=value; }
440 Series<T> copy(this->first(),this->last());
446 #endif // AFF_SERIES_H_VERSION (includeguard) Series< T > Tcontainer
Type of this array.
const T * Tconst_pointer
Type of pointer to element.
Root namespace of library.
Tsize memory_size() const
return size of addressed memory
T * Tpointer
Type of pointer to element.
void deepcopy(const S &source, T &target)
deep copy
const Tshape & shape() const
provide access to const shape
T & Treference
Type of reference to element.
const T * Tconst_pointer
Type of pointer to const element.
ConstSeries< T > Tcontainer
Type of this array.
void check_consistency() const
check consistency between shape and representation
const Tsubscript & l() const
(short for) last valid index
aff::LinearShape Tshape
Type of shape.
const Trepresentation & representation() const
offer conversion only to constant version of representation
Tcontainer & copyin(const C &a)
copy in is allowed here
const T Tconst_value
Element const type.
void setlastindex(const Tsubscript &last)
set last index to last
A template class to share heap memory for different array projections.
Series()
construct from nothing (empty)
Shape for Series class (prototypes)
T * Tpointer
Type of pointer to element.
exceptions and error handling macros (prototypes)
aff::SharedHeap< T > Trepresentation
Type of representation.
const T & Tconst_reference
Type of reference to const element.
T & operator()(const Tsubscript &i) const
Data modification access.
void setfirstindex(const Tsubscript &first)
set first index to first
aff::LinearShape Tshape
Type of shape.
#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
T & Treference
Type of reference to element.
const Trepresentation & representation() const
expose representation
Tbase Tcoc
short for Tcontainer_of_const
ConstSeries(const Tshape &shape, const Trepresentation &representation)
construct from shape and representation
void shift(const Tsubscript &i)
shift effective index range by i
Trepresentation Mrepresentation
my memory representation
const Tsubscript & first() const
return first legal index
const T * pointer() const
Tcontainer copyout() const
create an identical copy (deep copy) of this array
ConstSeries< T > Tbase
base is container of const (see specialization below)
const T & operator()(const Tsubscript &i) const
Data read access.
shared heap representation (prototypes)
aff::ConstSharedHeap< T > Trepresentation
Type of representation.
Tsubscript offset(const Tsubscript &i) const
return offset in representation for indes i
a stepper class for aff::Series (prototypes)
external deep copy function (prototypes)
This is the base class for const elements.
Shape for class aff::Series.
Series(const Tsize &size)
construct for a given size
Series(const Tsubscript &first, const Tsubscript &last)
construct from index range limits
A stepper for aff::Series.
Tcontainer copyout() const
create a (deep) copy of this
const T & Tconst_reference
Type of reference to element.
Trepresentation Mrepresentation
my (mutable) memory representation
Tcontainer & operator=(const T &value)
set whole series to value
ConstSeries()
construct from nothing (empty)
Tshape::Tstepper Tstepper
Type of stepper.
void setindexrange(const Tsubscript &first, const Tsubscript last)
set index range [ first , last ]
Series(const Tshape &shape, const Trepresentation &representation)
construct from shape and representation
const T Tconst_value
Element type.
A base class for time series and spectra.
ptrdiff_t Tsubscript
Type to hold an array's subscript value.
const Tsize & size() const
access to base class function
Series(const Trepresentation &representation, const Tsubscript &shift=0)
construct from representation
const Tsubscript & f() const
(short for) first valid index
Tbase Tcontainer_of_const
Type of the array of const values.
Series(const Tshape &shape)
construct from shape
Tcontainer Tcoc
short for Tcontainer_of_const
ConstSeries(const Trepresentation &representation)
construct from representation
const Tsubscript & last() const
return last legal index
size_t Tsize
Type to hold the size of an array dimension.
Tcontainer Tcontainer_of_const
Type of the array of const values.