166 [[nodiscard]]
bool empty() const noexcept {
return size() == 0; }
1222 return get(
l,
v, s,
b, p, r,
c);
1306 using ConstTensor7View::operator();
2319 return get(
l,
v, s,
b, p, r,
c);
2431 template <std::
size_t dim0>
2433 static_assert(dim0 < 7,
"Bad Dimension, Out-of-Bounds");
2441 : dim0 == 5 ?
nrows()
2446 "Can only reduce size on same size input");
2452 template <std::
size_t dim0, std::
size_t dim1>
2454 static_assert(dim1 < 7,
"Bad Dimension, Out-of-Bounds");
2455 static_assert(dim0 < dim1,
"Bad Dimensions, dim1 must be larger than dim0");
2462 : dim1 == 5 ?
nrows()
2475 "Can only reduce size on same size input");
2481 template <std::
size_t dim0, std::
size_t dim1, std::
size_t dim2>
2483 static_assert(dim2 < 7,
"Bad Dimension, Out-of-Bounds");
2484 static_assert(dim0 < dim1,
"Bad Dimensions, dim1 must be larger than dim0");
2485 static_assert(dim1 < dim2,
"Bad Dimensions, dim2 must be larger than dim1");
2491 : dim2 == 5 ?
nrows()
2510 "Can only reduce size on same size input");
2516 template <std::size_t dim0,
2521 static_assert(dim3 < 7,
"Bad Dimension, Out-of-Bounds");
2522 static_assert(dim0 < dim1,
"Bad Dimensions, dim1 must be larger than dim0");
2523 static_assert(dim1 < dim2,
"Bad Dimensions, dim2 must be larger than dim1");
2524 static_assert(dim2 < dim3,
"Bad Dimensions, dim3 must be larger than dim2");
2529 : dim3 == 5 ?
nrows()
2552 "Can only reduce size on same size input");
2558 template <std::size_t dim0,
2564 static_assert(dim4 < 7,
"Bad Dimension, Out-of-Bounds");
2565 static_assert(dim0 < dim1,
"Bad Dimensions, dim1 must be larger than dim0");
2566 static_assert(dim1 < dim2,
"Bad Dimensions, dim2 must be larger than dim1");
2567 static_assert(dim2 < dim3,
"Bad Dimensions, dim3 must be larger than dim2");
2568 static_assert(dim3 < dim4,
"Bad Dimensions, dim4 must be larger than dim3");
2595 "Can only reduce size on same size input");
2601 template <std::size_t dim0,
2608 static_assert(dim5 < 7,
"Bad Dimension, Out-of-Bounds");
2609 static_assert(dim0 < dim1,
"Bad Dimensions, dim1 must be larger than dim0");
2610 static_assert(dim1 < dim2,
"Bad Dimensions, dim2 must be larger than dim1");
2611 static_assert(dim2 < dim3,
"Bad Dimensions, dim3 must be larger than dim2");
2612 static_assert(dim3 < dim4,
"Bad Dimensions, dim4 must be larger than dim3");
2613 static_assert(dim4 < dim5,
"Bad Dimensions, dim5 must be larger than dim4");
2633 "Can only reduce size on same size input");
Const version of Iterator7D.
const ConstTensor6View * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
ConstTensor6View msv
Current position.
ConstIterator7D & operator++()
Prefix increment operator.
ConstIterator7D()=default
Default constructor.
const ConstTensor6View & operator*() const
Dereferencing.
ConstIterator7D(const ConstTensor6View &x, Index stride)
Explicit constructor.
bool operator!=(const ConstIterator7D &other) const
Not equal operator, needed for algorithms like copy.
A constant view of a Matrix.
Index size() const noexcept
A constant view of a Tensor3.
Index size() const noexcept
A constant view of a Tensor4.
Index size() const noexcept
A constant view of a Tensor5.
Index size() const noexcept
A constant view of a Tensor6.
Range mvr
The vitrine range of mdata that is actually used.
Range mcr
The column range of mdata that is actually used.
Range mbr
The book range of mdata that is actually used.
Numeric * mdata
Pointer to the plain C array that holds the data.
Range mrr
The row range of mdata that is actually used.
Index size() const noexcept
Range mpr
The page range of mdata that is actually used.
Range msr
The shelf range of mdata that is actually used.
A constant view of a Tensor7.
Index ncols() const noexcept
Range mrr
The row range of mdata that is actually used.
Range mcr
The column range of mdata that is actually used.
Index npages() const noexcept
ConstTensor7View & operator=(const ConstTensor7View &)=default
ConstIterator7D end() const
Return const iterator behind last sub-tensor.
Numeric operator()(Index l, Index v, Index s, Index b, Index p, Index r, Index c) const
Range mbr
The book range of mdata that is actually used.
Range mvr
The vitrine range of mdata that is actually used.
Index nrows() const noexcept
ConstIterator7D begin() const
Return const iterator to first sub-tensor.
Range mpr
The page range of mdata that is actually used.
Index nlibraries() const noexcept
ConstTensor7View()=default
Index nvitrines() const noexcept
Range mlr
The library range of mdata that is actually used.
constexpr ConstTensor7View(ConstTensor7View &&)=default
constexpr ConstTensor7View(const ConstTensor7View &)=default
Index nshelves() const noexcept
Index size() const noexcept
Numeric * mdata
Pointer to the plain C array that holds the data.
ConstTensor7View & operator=(ConstTensor7View &&)=default
bool empty() const noexcept
ConstTensor7View operator()(const Range &l, const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
virtual ~ConstTensor7View()=default
Destructor.
Range msr
The shelf range of mdata that is actually used.
Index nbooks() const noexcept
Numeric get(Index l, Index v, Index s, Index b, Index p, Index r, Index c) const
Get element implementation without assertions.
A constant view of a Vector.
Index size() const noexcept
Implementation of Tensors of Rank 7.
Iterator7D()=default
Default constructor.
Tensor6View & operator*()
Dereferencing.
Iterator7D & operator++()
Prefix increment operator.
bool operator!=(const Iterator7D &other) const
Not equal operator, needed for algorithms like copy.
Tensor6View msv
Current position.
Tensor6View * operator->()
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
Iterator7D(const Tensor6View &x, Index stride)
Explicit constructor.
Index mstart
The start index.
constexpr Index get_extent() const noexcept
Returns the extent of the range.
Index mextent
The number of elements.
const Numeric * get_c_array() const ARTS_NOEXCEPT
Conversion to plain C-array.
Tensor7View operator()(const Range &l, const Range &v, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c)
Iterator7D end()
Return iterator behind last sub-tensor.
Numeric & get(Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Get element implementation without assertions.
Tensor7View & operator=(const ConstTensor7View &v)
Assignment operator.
Numeric & operator()(Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Iterator7D begin()
Return iterator to first sub-tensor.
constexpr Tensor7View(const Tensor7View &)=default
Tensor3 reduce_rank() &&ARTS_NOEXCEPT
Tensor4 reduce_rank() &&ARTS_NOEXCEPT
Matrix reduce_rank() &&ARTS_NOEXCEPT
Tensor6 reduce_rank() &&ARTS_NOEXCEPT
void transform_elementwise(F &&func)
Tensor7(Tensor7 &&v) noexcept
Vector reduce_rank() &&ARTS_NOEXCEPT
Tensor5 reduce_rank() &&ARTS_NOEXCEPT
#define ARTS_ASSERT(condition,...)
Numeric max(const ConstTensor7View &x)
Max function, tensor version.
void copy(ConstIterator7D origin, const ConstIterator7D &end, Iterator7D target)
Copy data between begin and end to target.
Numeric debug_tensor7view_get_elem(Tensor7View &tv, Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
Numeric min(const ConstTensor7View &x)
Min function, tensor version.
std::ostream & operator<<(std::ostream &os, const ConstTensor7View &v)
Output operator.
void transform(Tensor7View y, double(&my_func)(double), ConstTensor7View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
#define CHECK(x)
Implementation of Tensors of Rank 6.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
void swap(ComplexVector &v1, ComplexVector &v2)
Swaps two objects.
constexpr Numeric r0
The reference radius in IGRF13.
constexpr Numeric l(const Index p0, const Index n, const Numeric x, const SortedVectorType &xi, const Index j, const std::pair< Numeric, Numeric > cycle={ -180, 180}) noexcept