Go to the documentation of this file.
35 assert(x < m##x##r.mextent)
36 #define OFFSET(x) m##x##r.mstart + x* m##x##r.mstride
174 const Range& c)
const;
190 const Range& c)
const;
197 const Range& c)
const;
204 const Range& c)
const;
211 const Range& c)
const;
218 const Range& c)
const;
262 const Range& c)
const;
269 const Range& c)
const;
276 const Range& c)
const;
283 const Range& c)
const;
290 const Range& c)
const;
297 const Range& c)
const;
304 const Range& c)
const;
311 const Range& c)
const;
318 const Range& c)
const;
325 const Range& c)
const;
404 const Range& c)
const;
411 const Range& c)
const;
418 const Range& c)
const;
425 const Range& c)
const;
432 const Range& c)
const;
439 const Range& c)
const;
446 const Range& c)
const;
453 const Range& c)
const;
460 const Range& c)
const;
467 const Range& c)
const;
546 return get(v, s, b, p, r, c);
626 using ConstTensor6View::operator();
1011 return get(v, s, b, p, r, c);
1142 #endif // matpackVI_h
ConstTensor6View()=default
Const version of Iterator7D.
Tensor6(Tensor6 &&v) noexcept
ConstIterator6D begin() const
Return const iterator to first sub-tensor.
Index nshelves() const
Returns the number of shelves.
const ConstTensor5View * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Iterator6D()=default
Default constructor.
Range mvr
The vitrine range of mdata that is actually used.
Range mbr
The book range of mdata that is actually used.
Index npages() const
Returns the number of pages.
A constant view of a Tensor7.
Tensor5View msv
Current position.
Iterator6D end()
Return iterator behind last sub-tensor.
bool operator!=(const Iterator6D &other) const
Not equal operator, needed for algorithms like copy.
Range mbr
The book range of mdata that is actually used.
Implementation of Tensors of Rank 7.
constexpr ConstTensor6View(const ConstTensor6View &)=default
ConstIterator6D(const ConstTensor5View &x, Index stride)
Explicit constructor.
Tensor6 & operator=(const Tensor6 &x)
Assignment operator from another tensor.
Index nrows() const
Returns the number of rows.
Vector y(Workspace &ws) noexcept
Tensor6View & operator/=(Numeric x)
Division by scalar.
virtual ~ConstTensor6View()=default
ConstIterator6D & operator++()
Prefix increment operator.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
Iterator6D & operator++()
Prefix increment operator.
Index mstart
The start index.
Range msr
The shelf range of mdata that is actually used.
Numeric min(const ConstTensor6View &x)
Min function, tensor version.
#define CHECK(x)
Implementation of Tensors of Rank 6.
Range mrr
The row range of mdata that is actually used.
Tensor6View & operator+=(Numeric x)
Addition of scalar.
A constant view of a Tensor4.
Tensor6View & operator*=(Numeric x)
Multiplication by scalar.
Numeric get(Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Numeric & get(Index v, Index s, Index b, Index p, Index r, Index c)
Get element implementation without assertions.
Tensor6View & operator-=(Numeric x)
Subtraction of scalar.
Index nvitrines() const
Returns the number of vitrines.
Tensor5View & operator*()
Dereferencing.
Numeric * mdata
Pointer to the plain C array that holds the data.
Range mpr
The page range of mdata that is actually used.
Const version of Iterator6D.
ConstIterator6D end() const
Return const iterator behind last sub-tensor.
Range mrr
The row range of mdata that is actually used.
Range msr
The shelf range of mdata that is actually used.
Numeric debug_tensor6view_get_elem(Tensor6View &tv, Index v, Index s, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
A constant view of a Tensor6.
NUMERIC Numeric
The type to use for all floating point numbers.
ConstIterator6D()=default
Default constructor.
ConstTensor6View & operator=(ConstTensor6View &&)=default
const Numeric * get_c_array() const
Conversion to plain C-array.
constexpr ConstTensor6View(ConstTensor6View &&)=default
ConstTensor6View operator()(const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
ConstTensor5View msv
Current position.
Iterator6D begin()
Return iterator to first sub-tensor.
bool operator!=(const ConstIterator6D &other) const
Not equal operator, needed for algorithms like copy.
Range mcr
The column 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.
Tensor5View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
Tensor6View & operator=(const ConstTensor6View &v)
Assignment operator.
The outermost iterator class for rank 6 tensors.
Index nbooks() const
Returns the number of books.
A constant view of a Matrix.
constexpr Tensor6View(const Tensor6View &)=default
friend void swap(Tensor6 &t1, Tensor6 &t2)
Swaps two objects.
Numeric & operator()(Index v, Index s, Index b, Index p, Index r, Index c)
Range mpr
The page range of mdata that is actually used.
Numeric get(Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
Range mcr
The column range of mdata that is actually used.
A constant view of a Tensor3.
const ConstTensor5View & operator*() const
Dereferencing.
void transform(Tensor6View y, double(&my_func)(double), ConstTensor6View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
Numeric * mdata
Pointer to the plain C array that holds the data.
Vector x(Workspace &ws) noexcept
void copy(ConstIterator6D origin, const ConstIterator6D &end, Iterator6D target)
Copy data between begin and end to target.
INDEX Index
The type to use for all integer numbers and indices.
Numeric max(const ConstTensor6View &x)
Max function, tensor version.
virtual ~Tensor6()
Destructor for Tensor6.
virtual ~Tensor6View()=default
A constant view of a Vector.
Iterator6D(const Tensor5View &x, Index stride)
Explicit constructor.
std::ostream & operator<<(std::ostream &os, const ConstTensor6View &v)
Output operator.
Index ncols() const
Returns the number of columns.
A constant view of a Tensor5.
Tensor6View operator()(const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c)
ConstTensor6View & operator=(const ConstTensor6View &)=default
Numeric operator()(Index v, Index s, Index b, Index p, Index r, Index c) const
bool empty() const
Check if variable is empty.