ARTS  2.4.0(git:4fb77825)
ConstTensor5View Class Reference

A constant view of a Tensor5. More...

#include <matpackV.h>

Inheritance diagram for ConstTensor5View:
Tensor5View Tensor5

Public Member Functions

constexpr ConstTensor5View (const ConstTensor5View &)=default
 
constexpr ConstTensor5View (ConstTensor5View &&)=default
 
ConstTensor5Viewoperator= (const ConstTensor5View &)=default
 
ConstTensor5Viewoperator= (ConstTensor5View &&)=default
 
bool empty () const
 Check if variable is empty. More...
 
Index nshelves () const
 Returns the number of shelves. More...
 
Index nbooks () const
 Returns the number of books. More...
 
Index npages () const
 Returns the number of pages. More...
 
Index nrows () const
 Returns the number of rows. More...
 
Index ncols () const
 Returns the number of columns. More...
 
ConstTensor5View operator() (const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
 Const index operator for subrange. More...
 
ConstTensor4View operator() (const Range &s, const Range &b, const Range &p, const Range &r, Index c) const
 Const index operator returning an object of type ConstTensor4View. More...
 
ConstTensor4View operator() (const Range &s, const Range &b, const Range &p, Index r, const Range &c) const
 Const index operator returning an object of type ConstTensor4View. More...
 
ConstTensor4View operator() (const Range &s, const Range &b, Index p, const Range &r, const Range &c) const
 Const index operator returning an object of type ConstTensor4View. More...
 
ConstTensor4View operator() (const Range &s, Index b, const Range &p, const Range &r, const Range &c) const
 Const index operator returning an object of type ConstTensor4View. More...
 
ConstTensor4View operator() (Index s, const Range &b, const Range &p, const Range &r, const Range &c) const
 Const index operator returning an object of type ConstTensor4View. More...
 
ConstTensor3View operator() (const Range &s, const Range &b, const Range &p, Index r, Index c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (const Range &s, const Range &b, Index p, const Range &r, Index c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (const Range &s, const Range &b, Index p, Index r, const Range &c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (const Range &s, Index b, const Range &p, Index r, const Range &c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (const Range &s, Index b, const Range &p, const Range &r, Index c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (const Range &s, Index b, Index p, const Range &r, const Range &c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (Index s, const Range &b, Index p, const Range &r, const Range &c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (Index s, const Range &b, const Range &p, Index r, const Range &c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (Index s, const Range &b, const Range &p, const Range &r, Index c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (Index s, Index b, const Range &p, const Range &r, const Range &c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstMatrixView operator() (const Range &s, const Range &b, Index p, Index r, Index c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (const Range &s, Index b, const Range &p, Index r, Index c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (const Range &s, Index b, Index p, const Range &r, Index c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (const Range &s, Index b, Index p, Index r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (Index s, const Range &b, Index p, Index r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (Index s, const Range &b, Index p, const Range &r, Index c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (Index s, const Range &b, const Range &p, Index r, Index c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (Index s, Index b, const Range &p, const Range &r, Index c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (Index s, Index b, const Range &p, Index r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (Index s, Index b, Index p, const Range &r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstVectorView operator() (const Range &s, Index b, Index p, Index r, Index c) const
 Const index operator returning an object of type ConstVectorView. More...
 
ConstVectorView operator() (Index s, const Range &b, Index p, Index r, Index c) const
 Const index operator returning an object of type ConstVectorView. More...
 
ConstVectorView operator() (Index s, Index b, const Range &p, Index r, Index c) const
 Const index operator returning an object of type ConstVectorView. More...
 
ConstVectorView operator() (Index s, Index b, Index p, const Range &r, Index c) const
 Const index operator returning an object of type ConstVectorView. More...
 
ConstVectorView operator() (Index s, Index b, Index p, Index r, const Range &c) const
 Const index operator returning an object of type ConstVectorView. More...
 
Numeric operator() (Index s, Index b, Index p, Index r, Index c) const
 Plain const index operator. More...
 
Numeric get (Index s, Index b, Index p, Index r, Index c) const
 Get element implementation without assertions. More...
 
ConstIterator5D begin () const
 Return const iterator to first shelf. More...
 
ConstIterator5D end () const
 Return const iterator behind last shelf. More...
 
virtual ~ConstTensor5View ()=default
 Destructor. More...
 
 ConstTensor5View (const ConstTensor4View &a)
 Special constructor to make a Tensor5 view of a Tensor4. More...
 

Protected Member Functions

 ConstTensor5View ()=default
 
 ConstTensor5View (Numeric *data, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c)
 Explicit constructor. More...
 
 ConstTensor5View (Numeric *data, const Range &ps, const Range &pb, const Range &pp, const Range &pr, const Range &pc, const Range &ns, const Range &nb, const Range &np, const Range &nr, const Range &nc)
 Recursive constructor. More...
 

Protected Attributes

Range msr {0, 0, 1}
 The shelf range of mdata that is actually used. More...
 
Range mbr {0, 0, 1}
 The book range of mdata that is actually used. More...
 
Range mpr {0, 0, 1}
 The page range of mdata that is actually used. More...
 
Range mrr {0, 0, 1}
 The row range of mdata that is actually used. More...
 
Range mcr {0, 0, 1}
 The column range of mdata that is actually used. More...
 
Numericmdata {nullptr}
 Pointer to the plain C array that holds the data. More...
 

Friends

class Tensor5View
 
class ConstIterator6D
 
class ConstTensor6View
 
class ConstTensor7View
 

Detailed Description

A constant view of a Tensor5.

This, together with the derived class Tensor5View, contains the main implementation of a Tensor5. It defines the concepts of Tensor5View. Plus additionally the recursive subrange operator, which makes it possible to create a Tensor5View from a subrange of a Tensor5View.

The five dimensions of the tensor are called: shelf, book, page, row, column.

The class Tensor5 is just a special case of a Tensor5View which also allocates storage.

Definition at line 143 of file matpackV.h.

Constructor & Destructor Documentation

◆ ConstTensor5View() [1/6]

constexpr ConstTensor5View::ConstTensor5View ( const ConstTensor5View )
constexprdefault

◆ ConstTensor5View() [2/6]

constexpr ConstTensor5View::ConstTensor5View ( ConstTensor5View &&  )
constexprdefault

◆ ~ConstTensor5View()

virtual ConstTensor5View::~ConstTensor5View ( )
virtualdefault

Destructor.

◆ ConstTensor5View() [3/6]

ConstTensor5View::ConstTensor5View ( const ConstTensor4View a)

Special constructor to make a Tensor5 view of a Tensor4.

Definition at line 704 of file matpackV.cc.

◆ ConstTensor5View() [4/6]

ConstTensor5View::ConstTensor5View ( )
protecteddefault

◆ ConstTensor5View() [5/6]

ConstTensor5View::ConstTensor5View ( Numeric data,
const Range sr,
const Range br,
const Range pr,
const Range rr,
const Range cr 
)
protected

Explicit constructor.

This one is used by Tensor5 to initialize its own Tensor5View part. The book range br must have a stride to account for the length of one book. The shelf range sr must have a stride to account for the length of one shelf.

Definition at line 718 of file matpackV.cc.

◆ ConstTensor5View() [6/6]

ConstTensor5View::ConstTensor5View ( Numeric data,
const Range ps,
const Range pb,
const Range pp,
const Range pr,
const Range pc,
const Range ns,
const Range nb,
const Range np,
const Range nr,
const Range nc 
)
protected

Recursive constructor.

This is used to construct sub-tensors from sub-tensors. That means that the new ranges have to be interpreted relative to the original ranges.

The new ranges may contain -1 for the extent which acts as a joker. However, the used Range constructor converts this to an explicit range, consistent with the original Range.

Definition at line 735 of file matpackV.cc.

Member Function Documentation

◆ begin()

ConstIterator5D ConstTensor5View::begin ( ) const

Return const iterator to first shelf.

Definition at line 690 of file matpackV.cc.

References mbr, mcr, mdata, mpr, mrr, msr, Range::mstart, and Range::mstride.

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

◆ empty()

bool ConstTensor5View::empty ( ) const

Check if variable is empty.

Parameters
[in]xThe variable to check.
Returns
True if the size of any dimension of x is 0.

Definition at line 38 of file matpackV.cc.

References nbooks(), ncols(), npages(), nrows(), and nshelves().

Referenced by get_variable_value(), and test_empty().

◆ end()

ConstIterator5D ConstTensor5View::end ( ) const

Return const iterator behind last shelf.

Definition at line 696 of file matpackV.cc.

References mbr, mcr, mdata, Range::mextent, mpr, mrr, msr, Range::mstart, and Range::mstride.

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

◆ get()

Numeric ConstTensor5View::get ( Index  s,
Index  b,
Index  p,
Index  r,
Index  c 
) const
inline

Get element implementation without assertions.

Definition at line 265 of file matpackV.h.

◆ nbooks()

◆ ncols()

◆ npages()

◆ nrows()

◆ nshelves()

◆ operator()() [1/32]

ConstTensor5View ConstTensor5View::operator() ( const Range s,
const Range b,
const Range p,
const Range r,
const Range c 
) const

Const index operator for subrange.

We have to also account for the case, that *this is already a subrange of a Tensor5. This allows correct recursive behavior.

Definition at line 61 of file matpackV.cc.

◆ operator()() [2/32]

ConstTensor4View ConstTensor5View::operator() ( const Range s,
const Range b,
const Range p,
const Range r,
Index  c 
) const

Const index operator returning an object of type ConstTensor4View.

(Reducing the dimension by one.)

Definition at line 71 of file matpackV.cc.

◆ operator()() [3/32]

ConstTensor4View ConstTensor5View::operator() ( const Range s,
const Range b,
const Range p,
Index  r,
const Range c 
) const

Const index operator returning an object of type ConstTensor4View.

(Reducing the dimension by one.)

Definition at line 86 of file matpackV.cc.

◆ operator()() [4/32]

ConstTensor3View ConstTensor5View::operator() ( const Range s,
const Range b,
const Range p,
Index  r,
Index  c 
) const

Const index operator returning an object of type ConstTensor3View.

(Reducing the dimension by two.)

Definition at line 146 of file matpackV.cc.

◆ operator()() [5/32]

ConstTensor4View ConstTensor5View::operator() ( const Range s,
const Range b,
Index  p,
const Range r,
const Range c 
) const

Const index operator returning an object of type ConstTensor4View.

(Reducing the dimension by one.)

Definition at line 101 of file matpackV.cc.

◆ operator()() [6/32]

ConstTensor3View ConstTensor5View::operator() ( const Range s,
const Range b,
Index  p,
const Range r,
Index  c 
) const

Const index operator returning an object of type ConstTensor3View.

(Reducing the dimension by two.)

Definition at line 166 of file matpackV.cc.

◆ operator()() [7/32]

ConstTensor3View ConstTensor5View::operator() ( const Range s,
const Range b,
Index  p,
Index  r,
const Range c 
) const

Const index operator returning an object of type ConstTensor3View.

(Reducing the dimension by two.)

Definition at line 186 of file matpackV.cc.

◆ operator()() [8/32]

ConstMatrixView ConstTensor5View::operator() ( const Range s,
const Range b,
Index  p,
Index  r,
Index  c 
) const

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by three.)

Definition at line 346 of file matpackV.cc.

◆ operator()() [9/32]

ConstTensor4View ConstTensor5View::operator() ( const Range s,
Index  b,
const Range p,
const Range r,
const Range c 
) const

Const index operator returning an object of type ConstTensor4View.

(Reducing the dimension by one.)

Definition at line 116 of file matpackV.cc.

◆ operator()() [10/32]

ConstTensor3View ConstTensor5View::operator() ( const Range s,
Index  b,
const Range p,
const Range r,
Index  c 
) const

Const index operator returning an object of type ConstTensor3View.

(Reducing the dimension by two.)

Definition at line 226 of file matpackV.cc.

◆ operator()() [11/32]

ConstTensor3View ConstTensor5View::operator() ( const Range s,
Index  b,
const Range p,
Index  r,
const Range c 
) const

Const index operator returning an object of type ConstTensor3View.

(Reducing the dimension by two.)

Definition at line 206 of file matpackV.cc.

◆ operator()() [12/32]

ConstMatrixView ConstTensor5View::operator() ( const Range s,
Index  b,
const Range p,
Index  r,
Index  c 
) const

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by three.)

Definition at line 366 of file matpackV.cc.

◆ operator()() [13/32]

ConstTensor3View ConstTensor5View::operator() ( const Range s,
Index  b,
Index  p,
const Range r,
const Range c 
) const

Const index operator returning an object of type ConstTensor3View.

(Reducing the dimension by two.)

Definition at line 246 of file matpackV.cc.

◆ operator()() [14/32]

ConstMatrixView ConstTensor5View::operator() ( const Range s,
Index  b,
Index  p,
const Range r,
Index  c 
) const

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by three.)

Definition at line 386 of file matpackV.cc.

◆ operator()() [15/32]

ConstMatrixView ConstTensor5View::operator() ( const Range s,
Index  b,
Index  p,
Index  r,
const Range c 
) const

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by three.)

Definition at line 406 of file matpackV.cc.

◆ operator()() [16/32]

ConstVectorView ConstTensor5View::operator() ( const Range s,
Index  b,
Index  p,
Index  r,
Index  c 
) const

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by four.)

Definition at line 546 of file matpackV.cc.

◆ operator()() [17/32]

ConstTensor4View ConstTensor5View::operator() ( Index  s,
const Range b,
const Range p,
const Range r,
const Range c 
) const

Const index operator returning an object of type ConstTensor4View.

(Reducing the dimension by one.)

Definition at line 131 of file matpackV.cc.

◆ operator()() [18/32]

ConstTensor3View ConstTensor5View::operator() ( Index  s,
const Range b,
const Range p,
const Range r,
Index  c 
) const

Const index operator returning an object of type ConstTensor3View.

(Reducing the dimension by two.)

Definition at line 306 of file matpackV.cc.

◆ operator()() [19/32]

ConstTensor3View ConstTensor5View::operator() ( Index  s,
const Range b,
const Range p,
Index  r,
const Range c 
) const

Const index operator returning an object of type ConstTensor3View.

(Reducing the dimension by two.)

Definition at line 286 of file matpackV.cc.

◆ operator()() [20/32]

ConstMatrixView ConstTensor5View::operator() ( Index  s,
const Range b,
const Range p,
Index  r,
Index  c 
) const

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by three.)

Definition at line 466 of file matpackV.cc.

◆ operator()() [21/32]

ConstTensor3View ConstTensor5View::operator() ( Index  s,
const Range b,
Index  p,
const Range r,
const Range c 
) const

Const index operator returning an object of type ConstTensor3View.

(Reducing the dimension by two.)

Definition at line 266 of file matpackV.cc.

◆ operator()() [22/32]

ConstMatrixView ConstTensor5View::operator() ( Index  s,
const Range b,
Index  p,
const Range r,
Index  c 
) const

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by three.)

Definition at line 446 of file matpackV.cc.

◆ operator()() [23/32]

ConstMatrixView ConstTensor5View::operator() ( Index  s,
const Range b,
Index  p,
Index  r,
const Range c 
) const

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by three.)

Definition at line 426 of file matpackV.cc.

◆ operator()() [24/32]

ConstVectorView ConstTensor5View::operator() ( Index  s,
const Range b,
Index  p,
Index  r,
Index  c 
) const

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by four.)

Definition at line 567 of file matpackV.cc.

◆ operator()() [25/32]

ConstTensor3View ConstTensor5View::operator() ( Index  s,
Index  b,
const Range p,
const Range r,
const Range c 
) const

Const index operator returning an object of type ConstTensor3View.

(Reducing the dimension by two.)

Definition at line 326 of file matpackV.cc.

◆ operator()() [26/32]

ConstMatrixView ConstTensor5View::operator() ( Index  s,
Index  b,
const Range p,
const Range r,
Index  c 
) const

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by three.)

Definition at line 486 of file matpackV.cc.

◆ operator()() [27/32]

ConstMatrixView ConstTensor5View::operator() ( Index  s,
Index  b,
const Range p,
Index  r,
const Range c 
) const

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by three.)

Definition at line 506 of file matpackV.cc.

◆ operator()() [28/32]

ConstVectorView ConstTensor5View::operator() ( Index  s,
Index  b,
const Range p,
Index  r,
Index  c 
) const

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by four.)

Definition at line 588 of file matpackV.cc.

◆ operator()() [29/32]

ConstMatrixView ConstTensor5View::operator() ( Index  s,
Index  b,
Index  p,
const Range r,
const Range c 
) const

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by three.)

Definition at line 526 of file matpackV.cc.

◆ operator()() [30/32]

ConstVectorView ConstTensor5View::operator() ( Index  s,
Index  b,
Index  p,
const Range r,
Index  c 
) const

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by four.)

Definition at line 609 of file matpackV.cc.

◆ operator()() [31/32]

ConstVectorView ConstTensor5View::operator() ( Index  s,
Index  b,
Index  p,
Index  r,
const Range c 
) const

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by four.)

Definition at line 630 of file matpackV.cc.

◆ operator()() [32/32]

Numeric ConstTensor5View::operator() ( Index  s,
Index  b,
Index  p,
Index  r,
Index  c 
) const
inline

Plain const index operator.

Definition at line 245 of file matpackV.h.

◆ operator=() [1/2]

ConstTensor5View& ConstTensor5View::operator= ( const ConstTensor5View )
default

◆ operator=() [2/2]

ConstTensor5View& ConstTensor5View::operator= ( ConstTensor5View &&  )
default

Friends And Related Function Documentation

◆ ConstIterator6D

friend class ConstIterator6D
friend

Definition at line 280 of file matpackV.h.

◆ ConstTensor6View

friend class ConstTensor6View
friend

Definition at line 281 of file matpackV.h.

◆ ConstTensor7View

friend class ConstTensor7View
friend

Definition at line 282 of file matpackV.h.

◆ Tensor5View

friend class Tensor5View
friend

Definition at line 279 of file matpackV.h.

Member Data Documentation

◆ mbr

Range ConstTensor5View::mbr {0, 0, 1}
protected

◆ mcr

Range ConstTensor5View::mcr {0, 0, 1}
protected

◆ mdata

◆ mpr

Range ConstTensor5View::mpr {0, 0, 1}
protected

◆ mrr

Range ConstTensor5View::mrr {0, 0, 1}
protected

◆ msr

Range ConstTensor5View::msr {0, 0, 1}
protected

The documentation for this class was generated from the following files: