Tensor3 Class Reference

The Tensor3 class. More...

#include <matpackIII.h>

Inheritance diagram for Tensor3:

Tensor3View ConstTensor3View

List of all members.

Public Member Functions

 Tensor3 ()
 Default constructor.
 Tensor3 (Index p, Index r, Index c)
 Constructor setting size.
 Tensor3 (Index p, Index r, Index c, Numeric fill)
 Constructor setting size and filling with constant value.
 Tensor3 (const ConstTensor3View &v)
 Copy constructor from Tensor3View.
 Tensor3 (const Tensor3 &v)
 Copy constructor from Tensor3.
Tensor3operator= (const Tensor3 &x)
 Assignment operator from another tensor.
Tensor3operator= (Numeric x)
 Assignment operator from scalar.
void resize (Index p, Index r, Index c)
 Resize function.
 ~Tensor3 ()
 Destructor for Tensor3.


Detailed Description

The Tensor3 class.

This is a Tensor3View that also allocates storage automatically, and deallocates it when it is destroyed. We take all the functionality from Tensor3View. Additionally defined here are:

1. Constructors and destructor. 2. Assignment operators. 3. Resize function.

Definition at line 227 of file matpackIII.h.


Constructor & Destructor Documentation

Tensor3::Tensor3 (  )  [inline]

Default constructor.

Definition at line 1118 of file matpackIII.h.

Tensor3::Tensor3 ( Index  p,
Index  r,
Index  c 
) [inline]

Constructor setting size.

This constructor has to set the strides in the page and row ranges correctly!

Definition at line 1129 of file matpackIII.h.

Tensor3::Tensor3 ( Index  p,
Index  r,
Index  c,
Numeric  fill 
) [inline]

Constructor setting size and filling with constant value.

Definition at line 1139 of file matpackIII.h.

Tensor3::Tensor3 ( const ConstTensor3View m  )  [inline]

Copy constructor from Tensor3View.

This automatically sets the size and copies the data.

Definition at line 1153 of file matpackIII.h.

Tensor3::Tensor3 ( const Tensor3 m  )  [inline]

Copy constructor from Tensor3.

This automatically sets the size and copies the data.

Definition at line 1164 of file matpackIII.h.

Tensor3::~Tensor3 (  )  [inline]

Destructor for Tensor3.

This is important, since Tensor3 uses new to allocate storage.

Definition at line 1252 of file matpackIII.h.


Member Function Documentation

Tensor3 & Tensor3::operator= ( const Tensor3 m  )  [inline]

Assignment operator from another tensor.

It is important that this operator exists. Otherwise the = operator seems to copy references instead of content in some cases.

The Behavior of this one is a bit special: If the size of the target tensor is 0 then it will be automatically resized to match (this is needed to have the correct initialization for constructed classes that use the assignment operator to initialize their data).

Reimplemented from Tensor3View.

Definition at line 1188 of file matpackIII.h.

Tensor3 & Tensor3::operator= ( Numeric  x  )  [inline]

Assignment operator from scalar.

Assignment operators are not inherited.

Reimplemented from Tensor3View.

Definition at line 1214 of file matpackIII.h.

void Tensor3::resize ( Index  p,
Index  r,
Index  c 
) [inline]

Resize function.

If the size is already correct this function does nothing. All data is lost after resizing! The new tensor is not initialized, so it will contain random values.

Definition at line 1223 of file matpackIII.h.


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

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