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

◆ ConstCArray()

template<class T >
aff::ConstCArray< T >::ConstCArray ( const Tarray array)
inline

construct from shape and representation

Definition at line 143 of file Carray.h.

144  : Mrepresentation(array.representation())
145  {
146  Tshape shape=array.shape();
147  // index range is zero based
148  shape.setfirst(typename Tshape::TIndexVec(0));
149  // offset to first element in represented memory
150  Moffset=shape.first_offset();
151  // strides
152  Mstride=shape.stride();
153  // sizes
154  Msize=shape.last();
155  for (unsigned i=0; i<Msize.size(); ++i)
156  {
157  ++Msize[i];
158  }
159  }
Strided & setfirst(const Tdim &i, const Tsubscript &index)
setfirst
Definition: strided.cc:279
Tsize size() const
size of array
Definition: simplearray.h:164
Trepresentation Mrepresentation
representation member
Definition: Carray.h:210
TSizeVec::Tvalue Moffset
offset to first index
Definition: Carray.h:216
TSizeVec Msize
sizes of dimensions
Definition: Carray.h:212
Tarray::Tshape Tshape
Type of shape.
Definition: Carray.h:111
TSizeVec Mstride
strides of dimensions
Definition: Carray.h:214
SimpleRigidArray< Tsubscript, Mmax_dimen > TIndexVec
type of limit arrays (any sign)
Definition: strided.h:128