89 mdata + mcr.mstart + c * mcr.mstride, mbr, mpr, mrr, b, p, r);
103 mdata + mrr.mstart + r * mrr.mstride, mbr, mpr, mcr, b, p, c);
117 mdata + mpr.mstart + p * mpr.mstride, mbr, mrr, mcr, b, r, c);
131 mdata + mbr.mstart + b * mbr.mstride, mpr, mrr, mcr, p, r, c);
1205 INDEX Index
The type to use for all integer numbers and indices.
Numeric debug_tensor4view_get_elem(Tensor4View &tv, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
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.
Const version of Iterator4D.
Index mstart
The start index.
Range mrr
The row range of mdata that is actually used.
Implementation of Tensors of Rank 4.
ConstIterator4D begin() const
Return const iterator to first book.
Iterator4D begin()
Return iterator to first book.
virtual ~Tensor4()
Destructor for Tensor4.
Tensor4View & operator+=(Numeric x)
Addition of scalar.
Index npages() const
Returns the number of pages.
Tensor4View & operator*=(Numeric x)
Multiplication by scalar.
void swap(Tensor4 &t1, Tensor4 &t2)
Swaps two objects.
Iterator3D end()
Return iterator behind last page.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
Index nrows() const
Returns the number of rows.
A constant view of a Tensor4.
Tensor3View & operator*()
Dereferencing.
const ConstTensor3View & operator*() const
Dereferencing.
Range mpr
The page range of mdata that is actually used.
std::ostream & operator<<(std::ostream &os, const ConstTensor4View &v)
Output operator.
ConstIterator3D end() const
Return const iterator behind last page.
Tensor4View & operator=(const ConstTensor4View &v)
Assignment operator.
Iterator4D end()
Return iterator behind last book.
Iterator3D begin()
Return iterator to first page.
The declarations of all the exception classes.
Range mbr
The book range of mdata that is actually used.
Numeric max(const ConstTensor4View &x)
Max function, tensor version.
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.
Index mextent
The number of elements.
Tensor4View & operator/=(Numeric x)
Division by scalar.
Numeric * mdata
Pointer to the plain C array that holds the data.
ConstIterator4D end() const
Return const iterator behind last book.
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...
bool empty() const
Check if variable is empty.
friend void swap(Tensor4 &t1, Tensor4 &t2)
Swaps two objects.
ConstIterator3D begin() const
Return const iterator to first page.
A constant view of a Tensor3.
A constant view of a Vector.
Tensor4 & operator=(const Tensor4 &x)
Assignment operator from another tensor.
Tensor4View & operator-=(Numeric x)
Subtraction of scalar.
A constant view of a Matrix.
Tensor3View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 3D iterators.
Index nbooks() const
Returns the number of books.
const ConstTensor3View * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 3D iterators.
Index ncols() const
Returns the number of columns.
ConstTensor4View()=default
Tensor4View operator()(const Range &b, const Range &p, const Range &r, const Range &c)
Index operator for subrange.
void resize(Index b, Index p, Index r, Index c)
Resize function.
Tensor3View msv
Current position.
const Numeric * get_c_array() const
Conversion to plain C-array.