ConstTensor5View Class Reference

A constant view of a Tensor5. More...

#include <matpackV.h>

Inheritance diagram for ConstTensor5View:

Inheritance graph
[legend]
Collaboration diagram for ConstTensor5View:

Collaboration graph
[legend]

List of all members.

Public Member Functions

Index nshelves () const
 Returns the number of shelves.
Index nbooks () const
 Returns the number of books.
Index npages () const
 Returns the number of pages.
Index nrows () const
 Returns the number of rows.
Index ncols () const
 Returns the number of columns.
ConstTensor5View operator() (const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
 Const index operator for subrange.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
ConstMatrixView operator() (const Range &s, const Range &b, Index p, Index r, Index c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (const Range &s, Index b, const Range &p, Index r, Index c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (const Range &s, Index b, Index p, const Range &r, Index c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (const Range &s, Index b, Index p, Index r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (Index s, const Range &b, Index p, Index r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (Index s, const Range &b, Index p, const Range &r, Index c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (Index s, const Range &b, const Range &p, Index r, Index c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (Index s, Index b, const Range &p, const Range &r, Index c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (Index s, Index b, const Range &p, Index r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView.
ConstMatrixView operator() (Index s, Index b, Index p, const Range &r, const Range &c) const
 Const index operator returning an object of type ConstMatrixView.
ConstVectorView operator() (const Range &s, Index b, Index p, Index r, Index c) const
 Const index operator returning an object of type ConstVectorView.
ConstVectorView operator() (Index s, const Range &b, Index p, Index r, Index c) const
 Const index operator returning an object of type ConstVectorView.
ConstVectorView operator() (Index s, Index b, const Range &p, Index r, Index c) const
 Const index operator returning an object of type ConstVectorView.
ConstVectorView operator() (Index s, Index b, Index p, const Range &r, Index c) const
 Const index operator returning an object of type ConstVectorView.
ConstVectorView operator() (Index s, Index b, Index p, Index r, const Range &c) const
 Const index operator returning an object of type ConstVectorView.
Numeric operator() (Index s, Index b, Index p, Index r, Index c) const
 Plain const index operator.
ConstIterator5D begin () const
 Return const iterator to first shelf.
ConstIterator5D end () const
 Return const iterator behind last shelf.
virtual ~ConstTensor5View ()
 Destructor.
 ConstTensor5View (const ConstTensor4View &a)
 Special constructor to make a Tensor5 view of a Tensor4.

Protected Member Functions

 ConstTensor5View ()
 Default constructor.
 ConstTensor5View (Numeric *data, const Range &s, const Range &b, const Range &p, const Range &r, const Range &c)
 Explicit constructor.
 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.

Protected Attributes

Range msr
 The shelf range of mdata that is actually used.
Range mbr
 The book range of mdata that is actually used.
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 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 160 of file matpackV.h.


Constructor & Destructor Documentation

virtual ConstTensor5View::~ConstTensor5View (  )  [inline, virtual]

Destructor.

Definition at line 233 of file matpackV.h.

ConstTensor5View::ConstTensor5View ( const ConstTensor4View a  ) 

Special constructor to make a Tensor5 view of a Tensor4.

Definition at line 767 of file matpackV.cc.

ConstTensor5View::ConstTensor5View (  )  [protected]

Default constructor.

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

Definition at line 784 of file matpackV.cc.

Referenced by operator()().

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 799 of file matpackV.cc.

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 822 of file matpackV.cc.


Member Function Documentation

Index ConstTensor5View::nshelves (  )  const

Index ConstTensor5View::nbooks (  )  const

Index ConstTensor5View::npages (  )  const

Index ConstTensor5View::nrows (  )  const

Index ConstTensor5View::ncols (  )  const

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.

Reimplemented in Tensor5View.

Definition at line 63 of file matpackV.cc.

References ConstTensor5View(), mbr, mcr, mdata, mpr, mrr, and msr.

Referenced by Tensor5View::operator()().

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.)

Reimplemented in Tensor5View.

Definition at line 76 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 94 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 112 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 130 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 148 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 166 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 187 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 208 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 229 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 250 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 271 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 292 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 313 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 334 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 355 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 376 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 400 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 424 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 448 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 472 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 496 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 520 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 544 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 568 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 592 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 616 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 643 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 670 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 697 of file matpackV.cc.

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

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.)

Reimplemented in Tensor5View.

Definition at line 724 of file matpackV.cc.

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

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

Plain const index operator.

Reimplemented in Tensor5View.

Definition at line 207 of file matpackV.h.

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

ConstIterator5D ConstTensor5View::begin (  )  const

ConstIterator5D ConstTensor5View::end (  )  const

Return const iterator behind last shelf.

Reimplemented in Tensor5View.

Definition at line 758 of file matpackV.cc.

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

Referenced by Tensor5View::end(), max(), min(), operator<<(), Tensor5View::operator=(), Tensor5::Tensor5(), and transform().


Friends And Related Function Documentation

friend class Tensor5View [friend]

Definition at line 233 of file matpackV.h.

friend class ConstIterator6D [friend]

Definition at line 237 of file matpackV.h.

friend class ConstTensor6View [friend]

Definition at line 238 of file matpackV.h.

friend class ConstTensor7View [friend]

Definition at line 239 of file matpackV.h.


Member Data Documentation


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

Generated on Mon Mar 23 14:06:58 2009 for ARTS by  doxygen 1.5.6