Tensor6 Class Reference

The Tensor6 class. More...

#include <matpackVI.h>

Inheritance diagram for Tensor6:

Inheritance graph
[legend]
Collaboration diagram for Tensor6:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Tensor6 ()
 Default constructor.
 Tensor6 (Index v, Index s, Index b, Index p, Index r, Index c)
 Constructor setting size.
 Tensor6 (Index v, Index s, Index b, Index p, Index r, Index c, Numeric fill)
 Constructor setting size and filling with constant value.
 Tensor6 (const ConstTensor6View &v)
 Copy constructor from Tensor6View.
 Tensor6 (const Tensor6 &v)
 Copy constructor from Tensor6.
Tensor6operator= (const Tensor6 &x)
 Assignment operator from another tensor.
Tensor6operator= (Numeric x)
 Assignment operator from scalar.
void resize (Index v, Index s, Index b, Index p, Index r, Index c)
 Resize function.
virtual ~Tensor6 ()
 Destructor for Tensor6.


Detailed Description

The Tensor6 class.

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

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

Definition at line 936 of file matpackVI.h.


Constructor & Destructor Documentation

Tensor6::Tensor6 (  ) 

Default constructor.

Definition at line 2722 of file matpackVI.cc.

Tensor6::Tensor6 ( Index  v,
Index  s,
Index  b,
Index  p,
Index  r,
Index  c 
)

Constructor setting size.

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

Definition at line 2733 of file matpackVI.cc.

Tensor6::Tensor6 ( Index  v,
Index  s,
Index  b,
Index  p,
Index  r,
Index  c,
Numeric  fill 
)

Constructor setting size and filling with constant value.

Definition at line 2747 of file matpackVI.cc.

References ConstTensor6View::mdata.

Tensor6::Tensor6 ( const ConstTensor6View m  ) 

Copy constructor from Tensor6View.

This automatically sets the size and copies the data.

Definition at line 2766 of file matpackVI.cc.

References Tensor6View::begin(), ConstTensor6View::begin(), copy(), and ConstTensor6View::end().

Tensor6::Tensor6 ( const Tensor6 m  ) 

Copy constructor from Tensor6.

This automatically sets the size and copies the data.

Definition at line 2781 of file matpackVI.cc.

References Tensor6View::begin(), copy(), and Tensor6View::end().

Tensor6::~Tensor6 (  )  [virtual]

Destructor for Tensor6.

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

Definition at line 2893 of file matpackVI.cc.

References ConstTensor6View::mdata.


Member Function Documentation

Tensor6 & Tensor6::operator= ( const Tensor6 m  ) 

Assignment operator from another tensor.

While dimensions of views can not be adjusted, dimensions of tensors *can* be adjusted. Hence, the behavior of the assignment operator is different.

In this case the size of the target is automatically adjusted. This is important, so that structures containing tensors are copied correctly.

This is a deviation from the old ARTS paradigm that sizes must match exactly before copying!

Note: It is sufficient to have only this one version of the assignment (Tensor = Tensor). It implicitly covers the cases Tensor=TensorView, etc, because there is a default constructor for Tensor from TensorView. (See C++ Primer Plus, page 571ff.)

Parameters:
m The other tensor to assign to this one.
Returns:
This tensor, by tradition.
Author:
Stefan Buehler
Date:
2002-12-19

Reimplemented from Tensor6View.

Definition at line 2823 of file matpackVI.cc.

References Tensor6View::begin(), copy(), Tensor6View::end(), ConstTensor6View::mbr, ConstTensor6View::mcr, Range::mextent, ConstTensor6View::mpr, ConstTensor6View::mrr, ConstTensor6View::msr, ConstTensor6View::mvr, and resize().

Tensor6 & Tensor6::operator= ( Numeric  x  ) 

Assignment operator from scalar.

Assignment operators are not inherited.

Reimplemented from Tensor6View.

Definition at line 2836 of file matpackVI.cc.

References Tensor6View::begin(), copy(), and Tensor6View::end().

void Tensor6::resize ( Index  v,
Index  s,
Index  b,
Index  p,
Index  r,
Index  c 
)

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 2845 of file matpackVI.cc.

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

Referenced by doit_i_fieldSetClearsky(), doit_i_fieldSetConst(), DoitInit(), fill_tensor6(), operator=(), Tensor6Scale(), Tensor6SetConstant(), Tensor6ToPlanckBT(), and xml_read_from_stream().


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

Generated on Mon Mar 23 14:07:04 2009 for ARTS by  doxygen 1.5.6