144 Index nbooks()
const;
145 Index npages()
const;
153 const Range& c)
const;
162 const Range& c)
const;
166 const Range& c)
const;
170 const Range& c)
const;
183 const Range& c)
const;
187 const Range& c)
const;
195 const Range& c)
const;
211 assert(b < mbr.mextent);
212 assert(p < mpr.mextent);
213 assert(r < mrr.mextent);
214 assert(c < mcr.mextent);
216 return get(b, p,
r, c);
221 return *(mdata + mbr.mstart + b * mbr.mstride + mpr.mstart +
222 p * mpr.mstride + mrr.mstart + r * mrr.mstride + mcr.mstart +
289 using ConstTensor4View::operator();
339 assert(b < mbr.mextent);
340 assert(p < mpr.mextent);
341 assert(r < mrr.mextent);
342 assert(c < mcr.mextent);
344 return get(b, p,
r, c);
349 return *(mdata + mbr.mstart + b * mbr.mstride + mpr.mstart +
350 p * mpr.mstride + mrr.mstart + r * mrr.mstride + mcr.mstart +
355 const Numeric* get_c_array()
const;
475 #endif // matpackIV_h INDEX Index
The type to use for all integer numbers and indices.
Iterator4D(const Tensor3View &x, Index stride)
Explicit constructor.
std::ostream & operator<<(std::ostream &os, const ConstTensor4View &v)
Output operator.
Iterator4D()=default
Default constructor.
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...
Tensor4(Tensor4 &&v) noexcept
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 begin() const
Return const iterator to first book.
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.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
A constant view of a Tensor4.
Tensor3View & operator*()
Dereferencing.
Numeric & operator()(Index b, Index p, Index r, Index c)
Plain non-const index operator.
void swap(ComplexVector &v1, ComplexVector &v2)
Swaps two objects.
Range mrr
The row range of mdata that is actually used.
Range mcr
The column range of mdata that is actually used.
A constant view of a Tensor5.
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.
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.
Implementation of Tensors of Rank 5.
ConstIterator4D end() const
Return const iterator behind last book.
Numeric * mdata
Pointer to the plain C array that holds the data.
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.
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.
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.
Range mbr
The book range of mdata that is actually used.
MatrixView & operator+=(MatrixView &A, const Block &B)
Tensor3View msv
Current position.
Numeric get(Index b, Index p, Index r, Index c) const
Get element implementation without assertions.