ARTS 2.5.4 (git: 31ce4f0e)
matpackV.h File Reference
#include "matpackIV.h"

Go to the source code of this file.

Classes

class  Iterator5D
 Implementation of Tensors of Rank 5. More...
 
class  ConstIterator5D
 Const version of Iterator5D. More...
 
class  ConstTensor5View
 A constant view of a Tensor5. More...
 
class  Tensor5View
 The Tensor5View class. More...
 
class  Tensor5
 The Tensor5 class. More...
 

Typedefs

using ArrayOfTensor5 = Array< Tensor5 >
 An array of Tensor5. More...
 
using ArrayOfArrayOfTensor5 = Array< ArrayOfTensor5 >
 

Functions

void copy (ConstIterator5D origin, const ConstIterator5D &end, Iterator5D target)
 Copy data between begin and end to target. More...
 
void copy (Numeric x, Iterator5D target, const Iterator5D &end)
 Copy a scalar to all elements. More...
 
void transform (Tensor5View y, double(&my_func)(double), ConstTensor5View x)
 A generic transform function for tensors, which can be used to implement mathematical functions operating on all elements. More...
 
Numeric max (const ConstTensor5View &x)
 Max function, tensor version. More...
 
Numeric min (const ConstTensor5View &x)
 Min function, tensor version. More...
 
Numeric debug_tensor5view_get_elem (Tensor5View &tv, Index s, Index b, Index p, Index r, Index c)
 Helper function to access tensor elements. More...
 

Typedef Documentation

◆ ArrayOfArrayOfTensor5

Definition at line 697 of file matpackV.h.

◆ ArrayOfTensor5

An array of Tensor5.

Definition at line 695 of file matpackV.h.

Function Documentation

◆ copy() [1/2]

void copy ( ConstIterator5D  origin,
const ConstIterator5D end,
Iterator5D  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 1591 of file matpackV.cc.

References Tensor4View::begin(), ConstTensor4View::begin(), copy(), ConstTensor4View::end(), and Zeeman::end().

Referenced by copy(), Tensor5View::operator=(), and Tensor5::Tensor5().

◆ copy() [2/2]

void copy ( Numeric  x,
Iterator5D  target,
const Iterator5D end 
)

Copy a scalar to all elements.

Definition at line 1602 of file matpackV.cc.

References Tensor4View::begin(), copy(), Tensor4View::end(), and Zeeman::end().

◆ debug_tensor5view_get_elem()

Numeric debug_tensor5view_get_elem ( Tensor5View tv,
Index  s,
Index  b,
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.

Parameters
tvTensorView
sShelf index
bBook index
pPage index
rRow index
cColumn index
Author
Oliver Lemke
Date
2004-05-10

Definition at line 1884 of file matpackV.cc.

References b, and c.

◆ max()

Numeric max ( const ConstTensor5View x)

Max function, tensor version.

Definition at line 1827 of file matpackV.cc.

References ConstTensor5View::begin(), ConstTensor5View::end(), and max().

Referenced by max().

◆ min()

Numeric min ( const ConstTensor5View x)

Min function, tensor version.

Definition at line 1846 of file matpackV.cc.

References ConstTensor5View::begin(), ConstTensor5View::end(), and min().

Referenced by min().

◆ transform()

void transform ( Tensor5View  y,
double(&)(double)  my_func,
ConstTensor5View  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.

Parameters
yOutput: The results of the function acting on each element of x.
my_funcA function (e.g., sqrt).
xA tensor.

Definition at line 1808 of file matpackV.cc.

References ARTS_ASSERT, Tensor5View::begin(), ConstTensor5View::begin(), ConstTensor5View::end(), ConstTensor5View::nbooks(), ConstTensor5View::ncols(), ConstTensor5View::npages(), ConstTensor5View::nrows(), ConstTensor5View::nshelves(), and transform().

Referenced by transform(), and Tensor5::transform_elementwise().