145 : mpr(0, 1,
a.mrr.mextent *
a.mcr.mextent),
160 : mpr(pr), mrr(rr), mcr(cr), mdata(data) {
178 : mpr(pp, np), mrr(pr, nr), mcr(pc, nc), mdata(data) {
190 if (ip != end_page) {
195 for (; ip != end_page; ++ip) {
438 for (; p != ep; ++p, ++xp) {
452 for (; p != ep; ++p, ++xp) {
466 for (; p != ep; ++p, ++xp) {
480 for (; p != ep; ++p, ++xp) {
489 a.mdata,
Range(0, 1,
a.mrr.mextent *
a.mcr.mextent),
a.mrr,
a.mcr) {
538 for (; origin != end; ++origin, ++target) {
547 for (; target != end; ++target) {
575 std::fill_n(
mdata, p * r *
c, fill);
582 Range(0, m.npages(), m.nrows() * m.ncols()),
583 Range(0, m.nrows(), m.ncols()),
584 Range(0, m.ncols())) {
592 Range(0, m.npages(), m.nrows() * m.ncols()),
593 Range(0, m.nrows(), m.ncols()),
594 Range(0, m.ncols())) {
687 swap(t1.mpr, t2.mpr);
688 swap(t1.mrr, t2.mrr);
689 swap(t1.mcr, t2.mcr);
690 swap(t1.mdata, t2.mdata);
725 for (; xi != xe; ++xi, ++yi) {
741 for (; xi != xe; ++xi) {
745 if (maxi > themax) themax = maxi;
760 for (; xi != xe; ++xi) {
764 if (mini < themin) themin = mini;
base max(const Array< base > &x)
Max function.
base min(const Array< base > &x)
Min function.
Const version of Iterator3D.
A constant view of a Matrix.
ConstIterator2D begin() const ARTS_NOEXCEPT
Return const iterator to first row.
Index nrows() const noexcept
ConstIterator2D end() const ARTS_NOEXCEPT
Return const iterator behind last row.
Index ncols() const noexcept
A constant view of a Tensor3.
ConstTensor3View operator()(const Range &p, const Range &r, const Range &c) const
Const index operator for subrange.
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.
ConstIterator3D end() const
Return const iterator behind last page.
ConstTensor3View()=default
Range mrr
The row range of mdata that is actually used.
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.
A constant view of a Vector.
Index nelem() const noexcept
Returns the number of elements.
Implementation of Tensors of Rank 3.
Iterator2D end() ARTS_NOEXCEPT
Return iterator behind last row.
Iterator2D begin() ARTS_NOEXCEPT
** Return const iterator to first row. Has to be redefined here, since it is
Index mstart
The start index.
Index mextent
The number of elements.
Iterator3D begin()
Return iterator to first page.
Tensor3View & operator/=(Numeric x)
Division by scalar.
Tensor3View & operator-=(Numeric x)
Subtraction of scalar.
Tensor3View & operator=(const ConstTensor3View &v)
Assignment operator.
Tensor3View & operator*=(Numeric x)
Multiplication by scalar.
Tensor3View & operator+=(Numeric x)
Addition of scalar.
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.
Iterator3D end()
Return iterator behind last page.
void resize(Index p, Index r, Index c)
Resize function.
~Tensor3() noexcept override
Destructor for Tensor3.
Tensor3 & operator=(const matpack::tensor3_like_not_tensor3 auto &init)
Set from a tensor type.
Helper macros for debugging.
#define ARTS_ASSERT(condition,...)
The declarations of all the exception classes.
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 add(Numeric x, Numeric y)
void swap(Tensor3 &t1, Tensor3 &t2) noexcept
Swaps two objects.
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.
void copy(ConstIterator3D origin, const ConstIterator3D &end, Iterator3D target)
Copy data between begin and end to target.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.