Go to the documentation of this file.
33 #define CHECK(x) assert( 0 <= x ); assert( x < m ## x ## r.mextent )
34 #define OFFSET(x) m ## x ## r.mstart + x * m ## x ## r.mstride
382 return get(v, s, b, p, r, c);
879 return get(v, s, b, p, r, c);
990 double (&my_func)(
double),
1009 #endif // matpackVI_h
Const version of Iterator7D.
Iterator6D()
Default constructor.
Tensor6 & operator=(Tensor6 x)
Assignment operator from another tensor.
ConstIterator6D begin() const
Return const iterator to first sub-tensor.
Index nshelves() const
Returns the number of shelves.
const ConstTensor5View * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Range mvr
The vitrine range of mdata that is actually used.
Range mbr
The book range of mdata that is actually used.
Index npages() const
Returns the number of pages.
A constant view of a Tensor7.
Tensor5View msv
Current position.
bool operator!=(const Iterator6D &other) const
Not equal operator, needed for algorithms like copy.
Range mbr
The book range of mdata that is actually used.
Implementation of Tensors of Rank 7.
ConstIterator6D(const ConstTensor5View &x, Index stride)
Explicit constructor.
Index nrows() const
Returns the number of rows.
Tensor6View & operator/=(Numeric x)
Division by scalar.
ConstIterator6D & operator++()
Prefix increment operator.
Iterator6D & operator++()
Prefix increment operator.
Index mstart
The start index.
Range msr
The shelf range of mdata that is actually used.
Numeric min(const ConstTensor6View &x)
Min function, tensor version.
#define CHECK(x)
Implementation of Tensors of Rank 6.
Range mrr
The row range of mdata that is actually used.
Tensor6View & operator+=(Numeric x)
Addition of scalar.
A constant view of a Tensor4.
Tensor6View & operator*=(Numeric x)
Multiplication by scalar.
Numeric get(Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Numeric & get(Index v, Index s, Index b, Index p, Index r, Index c)
Get element implementation without assertions.
Numeric get(Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Tensor6View & operator-=(Numeric x)
Subtraction of scalar.
ConstTensor6View operator()(const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
Index nvitrines() const
Returns the number of vitrines.
Tensor5View & operator*()
Dereferencing.
Numeric * mdata
Pointer to the plain C array that holds the data.
Range mpr
The page range of mdata that is actually used.
Const version of Iterator6D.
ConstIterator6D end() const
Return const iterator behind last sub-tensor.
Tensor6View()
Default constructor.
ConstIterator6D end() const
Return const iterator behind last sub-tensor.
Range mrr
The row range of mdata that is actually used.
Range msr
The shelf range of mdata that is actually used.
Numeric debug_tensor6view_get_elem(Tensor6View &tv, Index v, Index s, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
A constant view of a Tensor6.
NUMERIC Numeric
The type to use for all floating point numbers.
const Numeric * get_c_array() const
Conversion to plain C-array.
ConstTensor6View operator()(const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
ConstTensor5View msv
Current position.
bool operator!=(const ConstIterator6D &other) const
Not equal operator, needed for algorithms like copy.
Range mcr
The column range of mdata that is actually used.
Tensor5View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
Tensor6View & operator=(const ConstTensor6View &v)
Assignment operator.
The outermost iterator class for rank 6 tensors.
Index nbooks() const
Returns the number of books.
A constant view of a Matrix.
virtual ~ConstTensor6View()
friend void swap(Tensor6 &t1, Tensor6 &t2)
Swaps two objects.
ConstTensor6View()
Default constructor.
Range mpr
The page range of mdata that is actually used.
Range mcr
The column range of mdata that is actually used.
A constant view of a Tensor3.
const ConstTensor5View & operator*() const
Dereferencing.
void transform(Tensor6View y, double(&my_func)(double), ConstTensor6View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
Numeric * mdata
Pointer to the plain C array that holds the data.
void copy(ConstIterator6D origin, const ConstIterator6D &end, Iterator6D target)
Copy data between begin and end to target.
INDEX Index
The type to use for all integer numbers and indices.
ConstIterator6D begin() const
Return const iterator to sub-tensor.
Numeric max(const ConstTensor6View &x)
Max function, tensor version.
virtual ~Tensor6()
Destructor for Tensor6.
A constant view of a Vector.
Iterator6D(const Tensor5View &x, Index stride)
Explicit constructor.
std::ostream & operator<<(std::ostream &os, const ConstTensor6View &v)
Output operator.
Index ncols() const
Returns the number of columns.
Tensor6()
Default constructor.
A constant view of a Tensor5.
ConstIterator6D()
Default constructor.