37 #ifndef AFF_CONVERTERS_H_VERSION 39 #define AFF_CONVERTERS_H_VERSION \ 40 "AFF_CONVERTERS_H V1.0 " 57 typename Tarray::Tshape shape(array.
shape());
59 "ERROR: array is not suitable to be converted to series");
60 typename Tseries::Trepresentation representation=array.
representation();
61 typename Tseries::Tshape seriesshape(shape.first(0),
63 shape.first_offset());
64 Tseries retval(seriesshape, representation);
79 typename Tarray::Tshape shape(array.
shape());
81 "ERROR: array is not suitable to be converted to series");
82 typename Tseries::Trepresentation representation=array.
representation();
83 typename Tseries::Tshape seriesshape(shape.first(0),
85 shape.first_offset());
86 Tseries retval(seriesshape, representation);
130 const unsigned int size)
133 typename Tseries::Tshape shape(0, size-1, 0);
134 typename Tseries::Trepresentation representation(pointer, size);
135 Tseries retval(shape, representation);
242 #endif // AFF_CONVERTERS_H_VERSION (includeguard) Root namespace of library.
utility for compile-time checked cast
Tseries::Tconst_value Tconst_value
const element type
Tseries::Tconst_reference Tconst_reference
Type of reference to const element.
Tseries::Treference Treference
Type of reference to element.
const Trepresentation & representation() const
return full access representation
const Trepresentation & representation() const
provide restricted access representation
TT * castedpointer() const
return type-casted pointer to first element in Fortran layout
Tseries::Tshape Tshape
Type of shape.
T & Treference
Type of reference to element.
bool is_dense_1D_array(const aff::Strided &shape)
check whether array shape describes a 1D array with dense layout in the memory.
const T * Tconst_pointer
Type of pointer to const element.
Tseries::Tconst_pointer Tconst_pointer
Type of pointer to const element.
access Series contents through raw memory
CSeries(const Tseries &series)
construct from shape and representation
const T Tconst_value
Element const type.
aff::Tsize Moffset
offset of memory location of first element
A template class to share heap memory for different array projections.
const Tsize & size() const
size of dimension
aff::Series< T > series_from_raw_memory(T *pointer, const unsigned int size)
create a series class from raw memory.
T * Tpointer
Type of pointer to element.
full template array class headers (prototypes)
exceptions and error handling macros (prototypes)
linear series class (prototypes)
const T & Tconst_reference
Type of reference to const element.
const Tshape & shape() const
provide access to const shape
Tseries::Trepresentation Trepresentation
Type of representation.
#define AFF_abort(M)
Abort and give a message.
aff::Series< T > Tseries
Type of array to be interfaced.
#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
const Tsubscript & first() const
return first legal index
const Tshape & shape() const
provide access to const shape
Tsubscript offset(const Tsubscript &i) const
return offset in representation for indes i
Shape for class aff::Series.
aff::Series< T > series_from_array(const aff::Array< T > &array)
create a series container from an array container.
Tseries::Tvalue Tvalue
Element type.
Full multi-dimensional array functionality.This is the full array class template. It adds no addition...
aff::Tsize Msize
sizes of series
aff::Array< T > array_from_series(const aff::Series< T > &array)
create an array container from a series container.
Tseries::Tpointer Tpointer
Type of pointer to element.
A base class for time series and spectra.
Trepresentation Mrepresentation
representation member
const Tshape & shape() const
provide access to const shape
Array base classThis is a multidimensional (array) container that uses a strided memory layout (Fortr...
Tpointer pointer() const
return pointer to first element in Fortran layout
CSeries< T > Tcontainer
Type of this array.
size_t Tsize
Type to hold the size of an array dimension.