ARTS 2.5.10 (git: 2f1c442c)
|
Go to the source code of this file.
Classes | |
class | Iterator3D |
Implementation of Tensors of Rank 3. More... | |
class | ConstIterator3D |
Const version of Iterator3D. More... | |
class | ConstTensor3View |
A constant view of a Tensor3. More... | |
class | Tensor3View |
The Tensor3View class. More... | |
class | Tensor3 |
The Tensor3 class. More... | |
Macros | |
#define | GETFUN(p, r, c) |
Typedefs | |
using | ArrayOfTensor3 = Array< Tensor3 > |
An array of Tensor3. | |
using | ArrayOfArrayOfTensor3 = Array< ArrayOfTensor3 > |
Functions | |
void | copy (ConstIterator3D origin, const ConstIterator3D &end, Iterator3D target) |
Copy data between begin and end to target. | |
void | copy (Numeric x, Iterator3D target, const Iterator3D &end) |
Copy a scalar to all elements. | |
void | transform (Tensor3View y, double(&my_func)(double), ConstTensor3View x) |
A generic transform function for tensors, which can be used to implement mathematical functions operating on all elements. | |
Numeric | max (const ConstTensor3View &x) |
Max function, tensor version. | |
Numeric | min (const ConstTensor3View &x) |
Min function, tensor version. | |
Numeric | debug_tensor3view_get_elem (Tensor3View &tv, Index p, Index r, Index c) |
Helper function to access tensor elements. | |
void | mult (Tensor3View A, const ConstVectorView B, const ConstMatrixView C) |
mult Tensor3 | |
#define GETFUN | ( | p, | |
r, | |||
c | |||
) |
Definition at line 273 of file matpackIII.h.
using ArrayOfArrayOfTensor3 = Array<ArrayOfTensor3> |
Definition at line 481 of file matpackIII.h.
using ArrayOfTensor3 = Array<Tensor3> |
An array of Tensor3.
Definition at line 479 of file matpackIII.h.
void copy | ( | ConstIterator3D | origin, |
const ConstIterator3D & | end, | ||
Iterator3D | target | ||
) |
Copy data between begin and end to target.
Target must be a valid area of memory. Note that the strides in the iterators can be different, so that we can copy data between different kinds of subtensors.
Definition at line 535 of file matpackIII.cc.
References MatrixView::begin(), ConstMatrixView::begin(), copy(), and ConstMatrixView::end().
Referenced by copy(), Tensor3View::operator=(), and Tensor3::Tensor3().
void copy | ( | Numeric | x, |
Iterator3D | target, | ||
const Iterator3D & | end | ||
) |
Copy a scalar to all elements.
Definition at line 546 of file matpackIII.cc.
References MatrixView::begin(), copy(), and MatrixView::end().
Numeric debug_tensor3view_get_elem | ( | Tensor3View & | tv, |
Index | p, | ||
Index | r, | ||
Index | c | ||
) |
Helper function to access tensor elements.
Because of function inlining the operator() is not accessible from the debuggger. This function helps to access Tensor elements from within the debugger.
tv | TensorView |
p | Page index |
r | Row index |
c | Column index |
Definition at line 788 of file matpackIII.cc.
References c.
Numeric max | ( | const ConstTensor3View & | x | ) |
Max function, tensor version.
Definition at line 733 of file matpackIII.cc.
References ConstTensor3View::begin(), ConstTensor3View::end(), and max().
Numeric min | ( | const ConstTensor3View & | x | ) |
Min function, tensor version.
Definition at line 752 of file matpackIII.cc.
References ConstTensor3View::begin(), ConstTensor3View::end(), and min().
void mult | ( | Tensor3View | A, |
const ConstVectorView | B, | ||
const ConstMatrixView | C | ||
) |
mult Tensor3
Pointwise multiplication of a vector element and matrix.
mult(Tensor3& A, const ConstVectorView B, const ConstMatrixView C) for multiplying vector pointwise with matrix. Useful, e.g., for frequency gridded absorption vector multiplied by normalized Stokes extinction matrix to get extinction matrix as a function of frequency.
A | Out: Tensor3 with N pages, M rows and L columns |
B | In: A Vector of length N. |
C | In: A Matrix of size M x L. |
Definition at line 811 of file matpackIII.cc.
References ARTS_ASSERT, joker, ConstTensor3View::ncols(), ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstTensor3View::nrows(), and ConstMatrixView::nrows().
void transform | ( | Tensor3View | y, |
double(&)(double) | my_func, | ||
ConstTensor3View | x | ||
) |
A generic transform function for tensors, which can be used to implement mathematical functions operating on all elements.
Because we have this, we don't need explicit functions like sqrt for tensors! The type of the mathematical function is double (&my_func)(double). Numeric would not work here, since mathematical functions for float do not exist!
transform(y,sin,x) computes y = sin(x)
The two views may be the same one, in which case the conversion happens in place.
y | Output: The results of the function acting on each element of x. |
my_func | A function (e.g., sqrt). |
x | A tensor. |
Definition at line 716 of file matpackIII.cc.
References ARTS_ASSERT, Tensor3View::begin(), ConstTensor3View::begin(), ConstTensor3View::end(), ConstTensor3View::ncols(), ConstTensor3View::npages(), ConstTensor3View::nrows(), and transform().
Referenced by transform().