ARTS  2.0.49
ConstTensor4View Class Reference

A constant view of a Tensor4. More...

#include <matpackIV.h>

Inheritance diagram for ConstTensor4View:
Tensor4View Tensor4

Public Member Functions

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...
 
ConstTensor4View operator() (const Range &b, const Range &p, const Range &r, const Range &c) const
 Const index operator for subrange. More...
 
ConstTensor3View operator() (const Range &b, const Range &p, const Range &r, Index c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (const Range &b, const Range &p, Index r, const Range &c) const
 Const index operator returning an object of type ConstTensor3View. More...
 
ConstTensor3View operator() (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 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 &b, const Range &p, Index r, Index c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (const Range &b, Index p, const Range &r, Index c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (const Range &b, Index p, Index r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (Index b, const Range &p, Index r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (Index b, const Range &p, const Range &r, Index c) const
 Const index operator returning an object of type ConstMatrixView. More...
 
ConstMatrixView operator() (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 &b, Index p, Index r, Index c) const
 Const index operator returning an object of type ConstVectorView. More...
 
ConstVectorView operator() (Index b, const Range &p, Index r, Index c) const
 Const index operator returning an object of type ConstVectorView. More...
 
ConstVectorView operator() (Index b, Index p, const Range &r, Index c) const
 Const index operator returning an object of type ConstVectorView. More...
 
ConstVectorView operator() (Index b, Index p, Index r, const Range &c) const
 Const index operator returning an object of type ConstVectorView. More...
 
Numeric operator() (Index b, Index p, Index r, Index c) const
 Plain const index operator. More...
 
ConstIterator4D begin () const
 Return const iterator to first book. More...
 
ConstIterator4D end () const
 Return const iterator behind last book. More...
 
virtual ~ConstTensor4View ()
 Destructor. More...
 
 ConstTensor4View (const ConstTensor3View &a)
 Special constructor to make a Tensor4 view of a Tensor3. More...
 

Protected Member Functions

 ConstTensor4View ()
 Default constructor. More...
 
 ConstTensor4View (Numeric *data, const Range &b, const Range &p, const Range &r, const Range &c)
 Explicit constructor. More...
 
 ConstTensor4View (Numeric *data, const Range &pb, const Range &pp, const Range &pr, const Range &pc, const Range &nb, const Range &np, const Range &nr, const Range &nc)
 Recursive constructor. More...
 

Protected Attributes

Range mbr
 The book range of mdata that is actually used. More...
 
Range mpr
 The page range of mdata that is actually used. More...
 
Range mrr
 The row range of mdata that is actually used. More...
 
Range mcr
 The column range of mdata that is actually used. More...
 
Numericmdata
 Pointer to the plain C array that holds the data. More...
 

Friends

class Tensor4View
 
class ConstIterator5D
 
class ConstTensor5View
 
class ConstTensor6View
 
class ConstTensor7View
 

Detailed Description

A constant view of a Tensor4.

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

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

The class Tensor4 is just a special case of a Tensor4View which also allocates storage.

Definition at line 149 of file matpackIV.h.

Constructor & Destructor Documentation

◆ ~ConstTensor4View()

virtual ConstTensor4View::~ConstTensor4View ( )
inlinevirtual

Destructor.

Definition at line 201 of file matpackIV.h.

◆ ConstTensor4View() [1/4]

ConstTensor4View::ConstTensor4View ( const ConstTensor3View a)

Special constructor to make a Tensor4 view of a Tensor3.

Definition at line 428 of file matpackIV.cc.

◆ ConstTensor4View() [2/4]

ConstTensor4View::ConstTensor4View ( )
protected

Default constructor.

This is necessary, so that we can have a default constructor for derived classes.

Definition at line 440 of file matpackIV.cc.

Referenced by operator()().

◆ ConstTensor4View() [3/4]

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

Explicit constructor.

This one is used by Tensor4 to initialize its own Tensor4View part. The page range pr must have a stride to account for the length of one page. The book range br must have a stride to account for the length of one book.

Definition at line 454 of file matpackIV.cc.

◆ ConstTensor4View() [4/4]

ConstTensor4View::ConstTensor4View ( Numeric data,
const Range pb,
const Range pp,
const Range pr,
const Range pc,
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 475 of file matpackIV.cc.

Member Function Documentation

◆ begin()

◆ end()

ConstIterator4D ConstTensor4View::end ( ) const

Return const iterator behind last book.

Definition at line 419 of file matpackIV.cc.

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

Referenced by copy(), Tensor4View::end(), max(), min(), operator<<(), Tensor4View::operator=(), Tensor4::Tensor4(), and transform().

◆ nbooks()

◆ ncols()

◆ npages()

◆ nrows()

◆ operator()() [1/16]

ConstTensor4View ConstTensor4View::operator() ( 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 Tensor4. This allows correct recursive behavior.

Definition at line 86 of file matpackIV.cc.

References ConstTensor4View(), mbr, mcr, mdata, mpr, and mrr.

Referenced by Tensor4View::operator()().

◆ operator()() [2/16]

ConstTensor3View ConstTensor4View::operator() ( 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 one.)

Definition at line 98 of file matpackIV.cc.

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

◆ operator()() [3/16]

ConstTensor3View ConstTensor4View::operator() ( 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 one.)

Definition at line 115 of file matpackIV.cc.

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

◆ operator()() [4/16]

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

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by two.)

Definition at line 166 of file matpackIV.cc.

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

◆ operator()() [5/16]

ConstTensor3View ConstTensor4View::operator() ( 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 one.)

Definition at line 132 of file matpackIV.cc.

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

◆ operator()() [6/16]

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

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by two.)

Definition at line 186 of file matpackIV.cc.

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

◆ operator()() [7/16]

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

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by two.)

Definition at line 206 of file matpackIV.cc.

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

◆ operator()() [8/16]

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

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by three.)

Definition at line 286 of file matpackIV.cc.

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

◆ operator()() [9/16]

ConstTensor3View ConstTensor4View::operator() ( 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 one.)

Definition at line 149 of file matpackIV.cc.

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

◆ operator()() [10/16]

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

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by two.)

Definition at line 246 of file matpackIV.cc.

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

◆ operator()() [11/16]

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

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by two.)

Definition at line 226 of file matpackIV.cc.

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

◆ operator()() [12/16]

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

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by three.)

Definition at line 309 of file matpackIV.cc.

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

◆ operator()() [13/16]

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

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by two.)

Definition at line 266 of file matpackIV.cc.

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

◆ operator()() [14/16]

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

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by three.)

Definition at line 332 of file matpackIV.cc.

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

◆ operator()() [15/16]

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

Const index operator returning an object of type ConstVectorView.

Reducing the dimension by three.)

Definition at line 355 of file matpackIV.cc.

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

◆ operator()() [16/16]

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

Plain const index operator.

Definition at line 178 of file matpackIV.h.

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

Friends And Related Function Documentation

◆ ConstIterator5D

friend class ConstIterator5D
friend

Definition at line 205 of file matpackIV.h.

◆ ConstTensor5View

friend class ConstTensor5View
friend

Definition at line 206 of file matpackIV.h.

◆ ConstTensor6View

friend class ConstTensor6View
friend

Definition at line 207 of file matpackIV.h.

◆ ConstTensor7View

friend class ConstTensor7View
friend

Definition at line 208 of file matpackIV.h.

◆ Tensor4View

friend class Tensor4View
friend

Definition at line 204 of file matpackIV.h.

Member Data Documentation

◆ mbr

◆ mcr

◆ mdata

◆ mpr

◆ mrr


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