ConstTensor3View Class Reference

A constant view of a Tensor3. More...

#include <matpackIII.h>

Inheritance diagram for ConstTensor3View:

Tensor3View Tensor3

List of all members.

Public Member Functions

Index npages () const
 Returns the number of pages.
Index nrows () const
 Returns the number of rows.
Index ncols () const
 Returns the number of columns.
ConstTensor3View operator() (const Range &p, const Range &r, const Range &c) const
 Const index operator for subrange.
ConstMatrixView operator() (const Range &p, const Range &r, Index c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (const Range &p, Index r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (Index p, const Range &r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView.
ConstVectorView operator() (Index p, Index r, const Range &c) const
 Const index operator returning an object of type ConstVectorView.
ConstVectorView operator() (Index p, const Range &r, Index c) const
 Const index operator returning an object of type ConstVectorView.
ConstVectorView operator() (const Range &p, Index r, Index c) const
 Const index operator returning an object of type ConstVectorView.
Numeric operator() (Index p, Index r, Index c) const
 Plain const index operator.
ConstIterator3D begin () const
 Return const iterator to first page.
ConstIterator3D end () const
 Return const iterator behind last page.

Protected Member Functions

 ConstTensor3View ()
 Default constructor.
 ConstTensor3View (Numeric *data, const Range &p, const Range &r, const Range &c)
 Explicit constructor.
 ConstTensor3View (Numeric *data, const Range &pp, const Range &pr, const Range &pc, const Range &np, const Range &nr, const Range &nc)
 Recursive constructor.

Protected Attributes

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

Friends

class Tensor3View


Detailed Description

A constant view of a Tensor3.

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

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

The class Tensor3 is just a special case of a Tensor3View which also allocates storage.

Definition at line 93 of file matpackIII.h.


Constructor & Destructor Documentation

ConstTensor3View::ConstTensor3View (  )  [inline, protected]

Default constructor.

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

Definition at line 556 of file matpackIII.h.

ConstTensor3View::ConstTensor3View ( Numeric data,
const Range pr,
const Range rr,
const Range cr 
) [inline, protected]

Explicit constructor.

This one is used by Tensor3 to initialize its own Tensor3View part. The row range rr must have a stride to account for the length of one row. The page range pr must have a stride to account for the length of one page.

Definition at line 566 of file matpackIII.h.

ConstTensor3View::ConstTensor3View ( Numeric data,
const Range pp,
const Range pr,
const Range pc,
const Range np,
const Range nr,
const Range nc 
) [inline, 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 585 of file matpackIII.h.


Member Function Documentation

Index ConstTensor3View::npages (  )  const [inline]

Returns the number of pages.

Definition at line 392 of file matpackIII.h.

Index ConstTensor3View::nrows (  )  const [inline]

Returns the number of rows.

Definition at line 398 of file matpackIII.h.

Index ConstTensor3View::ncols (  )  const [inline]

Returns the number of columns.

Definition at line 404 of file matpackIII.h.

ConstTensor3View ConstTensor3View::operator() ( const Range p,
const Range r,
const Range c 
) const [inline]

Const index operator for subrange.

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

Reimplemented in Tensor3View.

Definition at line 412 of file matpackIII.h.

ConstMatrixView ConstTensor3View::operator() ( const Range p,
const Range r,
Index  c 
) const [inline]

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by one.)

Reimplemented in Tensor3View.

Definition at line 421 of file matpackIII.h.

ConstMatrixView ConstTensor3View::operator() ( const Range p,
Index  r,
const Range c 
) const [inline]

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by one.)

Reimplemented in Tensor3View.

Definition at line 436 of file matpackIII.h.

ConstMatrixView ConstTensor3View::operator() ( Index  p,
const Range r,
const Range c 
) const [inline]

Const index operator returning an object of type ConstMatrixView.

(Reducing the dimension by one.)

Reimplemented in Tensor3View.

Definition at line 451 of file matpackIII.h.

ConstVectorView ConstTensor3View::operator() ( Index  p,
Index  r,
const Range c 
) const [inline]

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by two.)

Reimplemented in Tensor3View.

Definition at line 466 of file matpackIII.h.

ConstVectorView ConstTensor3View::operator() ( Index  p,
const Range r,
Index  c 
) const [inline]

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by two.)

Reimplemented in Tensor3View.

Definition at line 484 of file matpackIII.h.

ConstVectorView ConstTensor3View::operator() ( const Range p,
Index  r,
Index  c 
) const [inline]

Const index operator returning an object of type ConstVectorView.

(Reducing the dimension by two.)

Reimplemented in Tensor3View.

Definition at line 502 of file matpackIII.h.

Numeric ConstTensor3View::operator() ( Index  p,
Index  r,
Index  c 
) const [inline]

Plain const index operator.

Reimplemented in Tensor3View.

Definition at line 519 of file matpackIII.h.

ConstIterator3D ConstTensor3View::begin (  )  const [inline]

Return const iterator to first page.

Reimplemented in Tensor3View.

Definition at line 536 of file matpackIII.h.

ConstIterator3D ConstTensor3View::end (  )  const [inline]

Return const iterator behind last page.

Reimplemented in Tensor3View.

Definition at line 545 of file matpackIII.h.


Friends And Related Function Documentation

friend class Tensor3View [friend]

Definition at line 118 of file matpackIII.h.


Member Data Documentation

The page range of mdata that is actually used.

Definition at line 133 of file matpackIII.h.

The row range of mdata that is actually used.

Definition at line 135 of file matpackIII.h.

The column range of mdata that is actually used.

Definition at line 137 of file matpackIII.h.

Pointer to the plain C array that holds the data.

Definition at line 139 of file matpackIII.h.


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

Generated on Wed Feb 4 08:17:29 2009 for ARTS by  doxygen 1.5.6