144 Index nbooks()
const;
145 Index npages()
const;
176 assert( b < mbr.mextent );
177 assert( p < mpr.mextent );
178 assert( r < mrr.mextent );
179 assert( c < mcr.mextent );
181 return get(b, p, r, c);
188 mbr.mstart + b * mbr.mstride +
189 mpr.mstart + p * mpr.mstride +
190 mrr.mstart + r * mrr.mstride +
191 mcr.mstart + c * mcr.
mstride );
303 assert( b < mbr.mextent );
304 assert( p < mpr.mextent );
305 assert( r < mrr.mextent );
306 assert( c < mcr.mextent );
308 return get(b, p, r, c);
315 mbr.mstart + b * mbr.mstride +
316 mpr.mstart + p * mpr.mstride +
317 mrr.mstart + r * mrr.mstride +
318 mcr.mstart + c * mcr.
mstride );
322 const Numeric *get_c_array()
const;
419 double (&my_func)(
double),
438 #endif // matpackIV_h INDEX Index
The type to use for all integer numbers and indices.
Iterator4D(const Tensor3View &x, Index stride)
Explicit constructor.
void swap(Vector &v1, Vector &v2)
Swaps two objects.
std::ostream & operator<<(std::ostream &os, const ConstTensor4View &v)
Output operator.
Const version of Iterator4D.
A constant view of a Tensor7.
Index mstart
The start index.
void transform(Tensor4View y, double(&my_func)(double), ConstTensor4View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
Range mrr
The row range of mdata that is actually used.
ConstIterator4D(const ConstTensor3View &x, Index stride)
Explicit constructor.
Range mcr
The column range of mdata that is actually used.
Implementation of Tensors of Rank 4.
A constant view of a Tensor6.
ConstIterator4D & operator++()
Prefix increment operator.
Range mpr
The page range of mdata that is actually used.
Numeric min(const ConstTensor4View &x)
Min function, tensor version.
void copy(ConstIterator4D origin, const ConstIterator4D &end, Iterator4D target)
Copy data between begin and end to target.
A constant view of a Tensor4.
Tensor3View & operator*()
Dereferencing.
Range mpr
The page range of mdata that is actually used.
Numeric & operator()(Index b, Index p, Index r, Index c)
Plain non-const index operator.
virtual ~Tensor4View()
Destructor.
virtual ~ConstTensor4View()
Destructor.
Iterator4D()
Default constructor.
Numeric operator()(Index b, Index p, Index r, Index c) const
Plain const index operator.
A constant view of a Tensor5.
Range mbr
The book range of mdata that is actually used.
bool operator!=(const ConstIterator4D &other) const
Not equal operator, needed for algorithms like copy.
NUMERIC Numeric
The type to use for all floating point numbers.
ConstTensor4View operator()(const Range &b, const Range &p, const Range &r, const Range &c) const
Const index operator for subrange.
Range mcr
The column range of mdata that is actually used.
Numeric operator()(Index b, Index p, Index r, Index c) const
Plain const index operator.
Const version of Iterator5D.
ConstTensor3View msv
Current position.
bool operator!=(const Iterator4D &other) const
Not equal operator, needed for algorithms like copy.
Numeric * mdata
Pointer to the plain C array that holds the data.
ConstIterator4D()
Default constructor.
Implementation of Tensors of Rank 5.
A constant view of a Tensor3.
A constant view of a Vector.
Numeric * mdata
Pointer to the plain C array that holds the data.
A constant view of a Matrix.
Tensor3View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 3D iterators.
Range mrr
The row range of mdata that is actually used.
Numeric max(const ConstTensor4View &x)
Max function, tensor version.
Iterator4D & operator++()
Prefix increment operator.
Numeric debug_tensor4view_get_elem(Tensor4View &tv, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
Tensor3View msv
Current position.
Numeric get(Index b, Index p, Index r, Index c) const
Get element implementation without assertions.