155 Index nshelves()
const;
156 Index nbooks()
const;
157 Index npages()
const;
206 assert( s < msr.mextent );
207 assert( b < mbr.mextent );
208 assert( p < mpr.mextent );
209 assert( r < mrr.mextent );
210 assert( c < mcr.mextent );
212 return get(s, b, p, r, c);
219 msr.mstart + s * msr.mstride +
220 mbr.mstart + b * mbr.mstride +
221 mpr.mstart + p * mpr.mstride +
222 mrr.mstart + r * mrr.mstride +
223 mcr.mstart + c * mcr.
mstride );
371 assert( s < msr.mextent );
372 assert( b < mbr.mextent );
373 assert( p < mpr.mextent );
374 assert( r < mrr.mextent );
375 assert( c < mcr.mextent );
377 return get(s, b, p, r, c);
384 msr.mstart + s * msr.mstride +
385 mbr.mstart + b * mbr.mstride +
386 mpr.mstart + p * mpr.mstride +
387 mrr.mstart + r * mrr.mstride +
388 mcr.mstart + c * mcr.
mstride );
392 const Numeric *get_c_array()
const;
487 double (&my_func)(
double),
Range mcr
The column range of mdata that is actually used.
INDEX Index
The type to use for all integer numbers and indices.
void swap(Vector &v1, Vector &v2)
Swaps two objects.
void copy(ConstIterator5D origin, const ConstIterator5D &end, Iterator5D target)
Copy data between begin and end to target.
The outermost iterator class for rank 6 tensors.
Numeric operator()(Index s, Index b, Index p, Index r, Index c) const
Plain const index operator.
A constant view of a Tensor7.
Index mstart
The start index.
Range mrr
The row range of mdata that is actually used.
A constant view of a Tensor6.
Const version of Iterator6D.
std::ostream & operator<<(std::ostream &os, const ConstTensor5View &v)
Output operator.
Numeric operator()(Index s, Index b, Index p, Index r, Index c) const
Plain const index operator.
Iterator5D & operator++()
Prefix increment operator.
A constant view of a Tensor4.
ConstIterator5D(const ConstTensor4View &x, Index stride)
Explicit constructor.
Numeric & operator()(Index s, Index b, Index p, Index r, Index c)
Plain const index operator.
Range mpr
The page range of mdata that is actually used.
virtual ~ConstTensor5View()
Destructor.
Tensor4View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 4D iterators.
Tensor4View & operator*()
Dereferencing.
Range mbr
The book range of mdata that is actually used.
Range mpr
The page range of mdata that is actually used.
bool operator!=(const Iterator5D &other) const
Not equal operator, needed for algorithms like copy.
Numeric * mdata
Pointer to the plain C array that holds the data.
Numeric max(const ConstTensor5View &x)
Max function, tensor version.
virtual ~Tensor5View()
Destructor.
Numeric min(const ConstTensor5View &x)
Min function, tensor version.
Numeric debug_tensor5view_get_elem(Tensor5View &tv, Index s, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
bool operator!=(const ConstIterator5D &other) const
Not equal operator, needed for algorithms like copy.
ConstTensor5View operator()(const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
Const index operator for subrange.
ConstTensor4View msv
Current position.
A constant view of a Tensor5.
Range mbr
The book range of mdata that is actually used.
NUMERIC Numeric
The type to use for all floating point numbers.
Iterator5D(const Tensor4View &x, Index stride)
Explicit constructor.
Range mcr
The column range of mdata that is actually used.
ConstIterator5D()
Default constructor.
Range msr
The shelf range of mdata that is actually used.
const ConstTensor4View * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 4D iterators.
Const version of Iterator5D.
Tensor4View msv
Current position.
Numeric * mdata
Pointer to the plain C array that holds the data.
Implementation of Tensors of Rank 5.
A constant view of a Tensor3.
const ConstTensor4View & operator*() const
Dereferencing.
Range mrr
The row range of mdata that is actually used.
A constant view of a Vector.
A constant view of a Matrix.
ConstIterator5D & operator++()
Prefix increment operator.
Iterator5D()
Default constructor.
Numeric get(Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
void transform(Tensor5View y, double(&my_func)(double), ConstTensor5View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...