ARTS 2.5.10 (git: 2f1c442c)
matpackVII.h File Reference
#include <utility>
#include "matpackVI.h"
#include "matpack_concepts.h"

Go to the source code of this file.

Classes

class  Iterator7D
 Implementation of Tensors of Rank 7. More...
 
class  ConstIterator7D
 Const version of Iterator7D. More...
 
class  ConstTensor7View
 A constant view of a Tensor7. More...
 
class  Tensor7View
 The Tensor7View class. More...
 
class  Tensor7
 The Tensor7 class. More...
 

Macros

#define GETFUN(l, v, s, b, p, r, c)
 

Typedefs

using ArrayOfTensor7 = Array< Tensor7 >
 An array of Tensor7.
 
using ArrayOfArrayOfTensor7 = Array< ArrayOfTensor7 >
 

Functions

void copy (ConstIterator7D origin, const ConstIterator7D &end, Iterator7D target)
 Copy data between begin and end to target.
 
void copy (Numeric x, Iterator7D target, const Iterator7D &end)
 Copy a scalar to all elements.
 
void transform (Tensor7View y, double(&my_func)(double), ConstTensor7View x)
 A generic transform function for tensors, which can be used to implement mathematical functions operating on all elements.
 
Numeric max (const ConstTensor7View &x)
 Max function, tensor version.
 
Numeric min (const ConstTensor7View &x)
 Min function, tensor version.
 
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.
 

Macro Definition Documentation

◆ GETFUN

#define GETFUN (   l,
  v,
  s,
  b,
  p,
  r,
  c 
)
Value:
*(mdata + OFFSET(l) + OFFSET(v) + OFFSET(s) + OFFSET(b) + OFFSET(p) + \
OFFSET(r) + OFFSET(c))
#define OFFSET(x)
Definition: matpackVI.h:39
#define v
#define c
#define b

Definition at line 2315 of file matpackVII.h.

Typedef Documentation

◆ ArrayOfArrayOfTensor7

Definition at line 2715 of file matpackVII.h.

◆ ArrayOfTensor7

An array of Tensor7.

Definition at line 2713 of file matpackVII.h.

Function Documentation

◆ copy() [1/2]

void copy ( ConstIterator7D  origin,
const ConstIterator7D end,
Iterator7D  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 5306 of file matpackVII.cc.

References Tensor6View::begin(), ConstTensor6View::begin(), copy(), and ConstTensor6View::end().

Referenced by copy(), Tensor7View::operator=(), and Tensor7::Tensor7().

◆ copy() [2/2]

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

Copy a scalar to all elements.

Definition at line 5317 of file matpackVII.cc.

References Tensor6View::begin(), copy(), and Tensor6View::end().

◆ debug_tensor7view_get_elem()

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.

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
lLibrary index
vVitrine index
sShelf index
bBook index
pPage index
rRow index
cColumn index
Author
Oliver Lemke
Date
2004-05-10

Definition at line 5650 of file matpackVII.cc.

References b, c, and v.

◆ max()

Numeric max ( const ConstTensor7View x)

Max function, tensor version.

Definition at line 5591 of file matpackVII.cc.

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

◆ min()

Numeric min ( const ConstTensor7View x)

Min function, tensor version.

Definition at line 5610 of file matpackVII.cc.

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

◆ transform()

void transform ( Tensor7View  y,
double(&)(double)  my_func,
ConstTensor7View  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 5570 of file matpackVII.cc.

References ARTS_ASSERT, Tensor7View::begin(), ConstTensor7View::begin(), ConstTensor7View::end(), ConstTensor7View::nbooks(), ConstTensor7View::ncols(), ConstTensor7View::nlibraries(), ConstTensor7View::npages(), ConstTensor7View::nrows(), ConstTensor7View::nshelves(), ConstTensor7View::nvitrines(), and transform().

Referenced by transform().