AFF --- A container for numbers (array) by Friederich and Forbriger.

◆ Slice()

template<class C >
aff::util::Slice< C >::Slice ( const Tarray array)
inline

Constructor takes a reference to an array.

Definition at line 85 of file slice.h.

References aff::util::Slice< C >::array(), aff::util::Slice< C >::Mdim, aff::util::Slice< C >::Mrepresentation, and aff::util::Slice< C >::Mshape.

86  {
87  // notice: a const Array does not return its representation
88  // thus me create a local (non-const) copy
89  // that's truely inefficient (copying the shape twice)
90  Tarray copy=array;
91  Mshape=copy.shape();
92  Mrepresentation=copy.representation();
93  Mdim=0;
94  }
Trepresentation Mrepresentation
Representation to use.
Definition: slice.h:139
C Tarray
Type of array to be handled.
Definition: slice.h:71
Tarray array() const
return an array
Definition: slice.h:124
Tshape Mshape
Shape to process.
Definition: slice.h:137
Tdim Mdim
Next dimension to collapse.
Definition: slice.h:141
Here is the call graph for this function: