155 const Range& c)
const;
172 assert(p < mpr.mextent);
173 assert(r < mrr.mextent);
174 assert(c < mcr.mextent);
181 return *(mdata + mpr.mstart + p * mpr.mstride + mrr.mstart +
182 r * mrr.mstride + mcr.mstart + c * mcr.mstride);
244 using ConstTensor3View::operator();
267 assert(p < mpr.mextent);
268 assert(r < mrr.mextent);
269 assert(c < mcr.mextent);
276 return *(mdata + mpr.mstart + p * mpr.mstride + mrr.mstart +
277 r * mrr.mstride + mcr.mstart + c * mcr.mstride);
281 const Numeric* get_c_array()
const;
394 #endif // matpackIII_h INDEX Index
The type to use for all integer numbers and indices.
const ConstMatrixView * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
ConstMatrixView msv
Current position.
Numeric & operator()(Index p, Index r, Index c)
Plain non-const index operator.
Const version of Iterator4D.
A constant view of a Tensor7.
Index mstart
The start index.
MatrixView & operator*()
Dereferencing.
Numeric * mdata
Pointer to the plain C array that holds the data.
Implementation of Tensors of Rank 4.
A constant view of a Tensor6.
Numeric min(const ConstTensor3View &x)
Min function, tensor version.
Iterator3D()=default
Default constructor.
Numeric debug_tensor3view_get_elem(Tensor3View &tv, Index p, Index r, Index c)
Helper function to access tensor elements.
MatrixView * operator->()
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
Numeric max(const ConstTensor3View &x)
Max function, tensor version.
Numeric operator()(Index p, Index r, Index c) const
Plain const index operator.
Index nrows() const
Returns the number of rows.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
A constant view of a Tensor4.
void copy(ConstIterator3D origin, const ConstIterator3D &end, Iterator3D target)
Copy data between begin and end to target.
Iterator3D & operator++()
Prefix increment operator.
void swap(ComplexVector &v1, ComplexVector &v2)
Swaps two objects.
ConstIterator3D end() const
Return const iterator behind last page.
Range mrr
The row range of mdata that is actually used.
Index ncols() const
Returns the number of columns.
MatrixView msv
Current position.
Range mrr
The row range of mdata that is actually used.
Range mcr
The column range of mdata that is actually used.
bool operator!=(const ConstIterator3D &other) const
Not equal operator, needed for algorithms like copy.
void transform(Tensor3View y, double(&my_func)(double), ConstTensor3View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
A constant view of a Tensor5.
const ConstMatrixView & operator*() const
Dereferencing.
NUMERIC Numeric
The type to use for all floating point numbers.
Range mcr
The column range of mdata that is actually used.
Implementation of Matrix, Vector, and such stuff.
Index npages() const
Returns the number of pages.
std::ostream & operator<<(std::ostream &os, const ConstTensor3View &v)
Output operator.
Numeric * mdata
Pointer to the plain C array that holds the data.
bool operator!=(const Iterator3D &other) const
Not equal operator, needed for algorithms like copy.
ConstIterator3D begin() const
Return const iterator to first page.
A constant view of a Tensor3.
A constant view of a Vector.
ConstIterator3D(const ConstMatrixView &x, Index stride)
Explicit constructor.
void mult(Tensor3View A, const ConstVectorView B, const ConstMatrixView C)
mult Tensor3
Iterator3D(const MatrixView &x, Index stride)
Explicit constructor.
Numeric * mdata
Pointer to the plain C array that holds the data.
A constant view of a Matrix.
Implementation of Tensors of Rank 3.
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.
ConstIterator3D & operator++()
Prefix increment operator.
Const version of Iterator3D.
MatrixView & operator+=(MatrixView &A, const Block &B)
Numeric get(Index p, Index r, Index c) const
Get element implementation without assertions.
Tensor3(Tensor3 &&v) noexcept