152 Index nshelves()
const;
153 Index nbooks()
const;
154 Index npages()
const;
163 const Range& c)
const;
174 const Range& c)
const;
179 const Range& c)
const;
184 const Range& c)
const;
189 const Range& c)
const;
255 assert(s < msr.mextent);
256 assert(b < mbr.mextent);
257 assert(p < mpr.mextent);
258 assert(r < mrr.mextent);
259 assert(c < mcr.mextent);
261 return get(s, b, p,
r, c);
266 return *(mdata + msr.mstart + s * msr.mstride + mbr.mstart +
267 b * mbr.mstride + mpr.mstart + p * mpr.mstride + mrr.mstart +
268 r * mrr.mstride + mcr.mstart + c * mcr.
mstride);
338 using ConstTensor5View::operator();
421 assert(s < msr.mextent);
422 assert(b < mbr.mextent);
423 assert(p < mpr.mextent);
424 assert(r < mrr.mextent);
425 assert(c < mcr.mextent);
427 return get(s, b, p,
r, c);
432 return *(mdata + msr.mstart + s * msr.mstride + mbr.mstart +
433 b * mbr.mstride + mpr.mstart + p * mpr.mstride + mrr.mstart +
434 r * mrr.mstride + mcr.mstart + c * mcr.
mstride);
438 const Numeric* get_c_array()
const;
INDEX Index
The type to use for all integer numbers and indices.
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.
Iterator5D()=default
Default constructor.
ConstIterator5D end() const
Return const iterator behind last shelf.
std::ostream & operator<<(std::ostream &os, const ConstTensor5View &v)
Output operator.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
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.
void swap(ComplexVector &v1, ComplexVector &v2)
Swaps two objects.
Tensor4View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 4D iterators.
Tensor4View & operator*()
Dereferencing.
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.
Numeric min(const ConstTensor5View &x)
Min function, tensor version.
Range mrr
The row range of mdata that is actually used.
Numeric debug_tensor5view_get_elem(Tensor5View &tv, Index s, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
Range mcr
The column range of mdata that is actually used.
bool operator!=(const ConstIterator5D &other) const
Not equal operator, needed for algorithms like copy.
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.
ConstIterator5D begin() const
Return const iterator to first shelf.
Iterator5D(const Tensor4View &x, Index stride)
Explicit constructor.
Range mcr
The column range of mdata that is actually used.
Tensor5(Tensor5 &&v) noexcept
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.
Range msr
The shelf range of mdata that is actually used.
Numeric * mdata
Pointer to the plain C array that holds the data.
A constant view of a Tensor3.
const ConstTensor4View & operator*() const
Dereferencing.
A constant view of a Vector.
A constant view of a Matrix.
ConstIterator5D & operator++()
Prefix increment operator.
Numeric get(Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Range mpr
The page range of mdata that is actually used.
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
Range mbr
The book range of mdata that is actually used.
MatrixView & operator+=(MatrixView &A, const Block &B)
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...