152 [[nodiscard]]
bool empty() const noexcept {
return size() == 0; }
249 using ConstTensor3View::operator();
369 ARTS_ASSERT(not(r1.get_extent() < 0),
"Must have size");
370 ARTS_ASSERT(not(r2.get_extent() < 0),
"Must have size");
388 template <std::
size_t dim0>
390 static_assert(dim0 < 3,
"Bad Dimension, Out-of-Bounds");
396 "Can only reduce size on same size input");
402 template <std::
size_t dim0, std::
size_t dim1>
404 static_assert(dim1 < 3,
"Bad Dimension, Out-of-Bounds");
405 static_assert(dim0 < dim1,
"Bad Dimensions, dim1 must be larger than dim0");
412 "Can only reduce size on same size input");
Const version of Iterator3D.
ConstMatrixView msv
Current position.
ConstIterator3D & operator++()
Prefix increment operator.
ConstIterator3D(const ConstMatrixView &x, Index stride)
Explicit constructor.
const ConstMatrixView * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
const ConstMatrixView & operator*() const
Dereferencing.
bool operator!=(const ConstIterator3D &other) const
Not equal operator, needed for algorithms like copy.
ConstIterator3D()=default
Default constructor.
Const version of Iterator4D.
A constant view of a Matrix.
Range mrr
The row range of mdata that is actually used.
Index size() const noexcept
Numeric * mdata
Pointer to the plain C array that holds the data.
Range mcr
The column range of mdata that is actually used.
A constant view of a Tensor3.
ConstTensor3View operator()(const Range &p, const Range &r, const Range &c) const
Const index operator for subrange.
Numeric get(Index p, Index r, Index c) const
Get element implementation without assertions.
bool empty() const noexcept
virtual ~ConstTensor3View()=default
Destructor.
Index npages() const
Returns the number of pages.
ConstIterator3D begin() const
Return const iterator to first page.
Numeric * mdata
Pointer to the plain C array that holds the data.
ConstTensor3View & operator=(const ConstTensor3View &)=default
ConstIterator3D end() const
Return const iterator behind last page.
ConstTensor3View()=default
Numeric operator()(Index p, Index r, Index c) const
Plain const index operator.
Range mrr
The row range of mdata that is actually used.
constexpr ConstTensor3View(ConstTensor3View &&)=default
Range mcr
The column range of mdata that is actually used.
Index size() const noexcept
Index nrows() const
Returns the number of rows.
Range mpr
The page range of mdata that is actually used.
Index ncols() const
Returns the number of columns.
ConstTensor3View & operator=(ConstTensor3View &&)=default
constexpr ConstTensor3View(const ConstTensor3View &)=default
A constant view of a Tensor4.
A constant view of a Tensor5.
A constant view of a Tensor6.
A constant view of a Tensor7.
A constant view of a Vector.
Index size() const noexcept
Implementation of Tensors of Rank 3.
Iterator3D & operator++()
Prefix increment operator.
Iterator3D(const MatrixView &x, Index stride)
Explicit constructor.
bool operator!=(const Iterator3D &other) const
Not equal operator, needed for algorithms like copy.
MatrixView & operator*()
Dereferencing.
MatrixView msv
Current position.
Iterator3D()=default
Default constructor.
MatrixView * operator->()
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
Implementation of Tensors of Rank 4.
Index mstart
The start index.
constexpr Index get_extent() const noexcept
Returns the extent of the range.
Index mextent
The number of elements.
Iterator3D begin()
Return iterator to first page.
constexpr Tensor3View(const Tensor3View &)=default
Tensor3View & operator=(const ConstTensor3View &v)
Assignment operator.
Numeric & operator()(Index p, Index r, Index c)
Plain non-const index operator.
const Numeric * get_c_array() const ARTS_NOEXCEPT
Conversion to plain C-array.
Tensor3View operator()(const Range &p, const Range &r, const Range &c)
Index operator for subrange.
Numeric & get(Index p, Index r, Index c)
Get element implementation without assertions.
Iterator3D end()
Return iterator behind last page.
Matrix reduce_rank() &&ARTS_NOEXCEPT
Tensor3(Tensor3 &&v) noexcept
Tensor3(Numeric *d, const Range &r0, const Range &r1, const Range &r2) ARTS_NOEXCEPT
void transform_elementwise(F &&func)
Vector reduce_rank() &&ARTS_NOEXCEPT
#define ARTS_ASSERT(condition,...)
void mult(Tensor3View A, const ConstVectorView B, const ConstMatrixView C)
mult Tensor3
Numeric debug_tensor3view_get_elem(Tensor3View &tv, Index p, Index r, Index c)
Helper function to access tensor elements.
Numeric min(const ConstTensor3View &x)
Min function, tensor version.
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...
void copy(ConstIterator3D origin, const ConstIterator3D &end, Iterator3D target)
Copy data between begin and end to target.
std::ostream & operator<<(std::ostream &os, const ConstTensor3View &v)
Output operator.
Numeric max(const ConstTensor3View &x)
Max function, tensor version.
Implementation of Matrix, Vector, and such stuff.
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.