Go to the documentation of this file.
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;
216 return get(b, p, r, c);
289 using ConstTensor4View::operator();
344 return get(b, p, r, c);
475 #endif // matpackIV_h
void resize(Index b, Index p, Index r, Index c)
Resize function.
Range mpr
The page range of mdata that is actually used.
ConstIterator4D end() const
Return const iterator behind last book.
ConstTensor4View & operator=(const ConstTensor4View &)=default
ConstIterator4D & operator++()
Prefix increment operator.
A constant view of a Tensor7.
ConstTensor4View()=default
Iterator4D & operator++()
Prefix increment operator.
Tensor4View & operator*=(Numeric x)
Multiplication by scalar.
Vector y(Workspace &ws) noexcept
Range mbr
The book range of mdata that is actually used.
Numeric get(Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
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.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
virtual ~Tensor4()
Destructor for Tensor4.
Numeric operator()(Index b, Index p, Index r, Index c) const
Plain const index operator.
friend void swap(Tensor4 &t1, Tensor4 &t2)
Swaps two objects.
Tensor4 & operator=(const Tensor4 &x)
Assignment operator from another tensor.
Index mstart
The start index.
Implementation of Tensors of Rank 5.
Numeric debug_tensor4view_get_elem(Tensor4View &tv, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
Iterator4D begin()
Return iterator to first book.
Tensor3View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 3D iterators.
Iterator4D(const Tensor3View &x, Index stride)
Explicit constructor.
Const version of Iterator4D.
ConstIterator4D()=default
Default constructor.
virtual ~Tensor4View()=default
Destructor.
A constant view of a Tensor4.
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...
Tensor4View & operator+=(Numeric x)
Addition of scalar.
const ConstTensor3View * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 3D iterators.
constexpr Tensor4View(const Tensor4View &)=default
Range mrr
The row range of mdata that is actually used.
bool empty() const
Check if variable is empty.
std::ostream & operator<<(std::ostream &os, const ConstTensor4View &v)
Output operator.
Range mcr
The column range of mdata that is actually used.
ConstIterator4D(const ConstTensor3View &x, Index stride)
Explicit constructor.
Numeric max(const ConstTensor4View &x)
Max function, tensor version.
virtual ~ConstTensor4View()=default
Destructor.
bool operator!=(const ConstIterator4D &other) const
Not equal operator, needed for algorithms like copy.
Index ncols() const
Returns the number of columns.
ConstIterator4D begin() const
Return const iterator to first book.
Range mpr
The page range of mdata that is actually used.
A constant view of a Tensor6.
NUMERIC Numeric
The type to use for all floating point numbers.
Numeric & operator()(Index b, Index p, Index r, Index c)
Plain non-const index operator.
Numeric * mdata
Pointer to the plain C array that holds the data.
Index npages() const
Returns the number of pages.
Index nbooks() const
Returns the number of books.
Tensor4View & operator=(const ConstTensor4View &v)
Assignment operator.
Numeric & get(Index b, Index p, Index r, Index c)
Get element implementation without assertions.
Tensor3View msv
Current position.
Numeric get(Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Tensor4View & operator/=(Numeric x)
Division by scalar.
Iterator4D end()
Return iterator behind last book.
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
A constant view of a Matrix.
void copy(ConstIterator4D origin, const ConstIterator4D &end, Iterator4D target)
Copy data between begin and end to target.
Index nrows() const
Returns the number of rows.
const ConstTensor3View & operator*() const
Dereferencing.
Numeric min(const ConstTensor4View &x)
Min function, tensor version.
Index mextent
The number of elements.
Iterator4D()=default
Default constructor.
Tensor3View & operator*()
Dereferencing.
Implementation of Tensors of Rank 4.
Range mrr
The row range of mdata that is actually used.
A constant view of a Tensor3.
ConstTensor3View msv
Current position.
Tensor4(Tensor4 &&v) noexcept
Tensor4View & operator-=(Numeric x)
Subtraction of scalar.
ConstTensor4View & operator=(ConstTensor4View &&)=default
Vector x(Workspace &ws) noexcept
INDEX Index
The type to use for all integer numbers and indices.
Tensor4View operator()(const Range &b, const Range &p, const Range &r, const Range &c)
Index operator for subrange.
Const version of Iterator5D.
constexpr ConstTensor4View(ConstTensor4View &&)=default
bool operator!=(const Iterator4D &other) const
Not equal operator, needed for algorithms like copy.
constexpr ConstTensor4View(const ConstTensor4View &)=default
A constant view of a Vector.
const Numeric * get_c_array() const
Conversion to plain C-array.
Numeric * mdata
Pointer to the plain C array that holds the data.
A constant view of a Tensor5.