ARTS  2.4.0(git:4fb77825)
Field3D< base > Class Template Reference

Creates a 3D field of a base unit. More...

#include <field.h>

Public Member Functions

 Field3D (const Field3D &g)=default
 Construct a new Field3D object. More...
 
Field3D< base > & operator= (const Field3D &g)=default
 Default assignment operator. More...
 
Field3D< base > & operator= (Field3D &&g)=default
 Default move operator. More...
 
 Field3D (Field3D &&g)
 Construct a new Field3D object. More...
 
 Field3D (size_t pages=0, size_t rows=0, size_t cols=0, const base &init=base())
 Construct a new Field 3 D object. More...
 
base & operator() (size_t page=0, size_t row=0, size_t col=0)
 Access operator. More...
 
const base & operator() (size_t col=0, size_t row=0, size_t page=0) const
 Access operator. More...
 
base operator() (const GridPos &page={0, {0, 1}}, const GridPos &row={0, {0, 1}}, const GridPos &col={0, {0, 1}}) const
 Weighted access operator by GridPos. More...
 
size_t npages () const
 Number of pages. More...
 
size_t nrows () const
 Number of rows. More...
 
size_t ncols () const
 Number of columns. More...
 

Private Attributes

size_t mpages
 
size_t mrows
 
size_t mcols
 
std::vector< base > data
 

Detailed Description

template<class base>
class Field3D< base >

Creates a 3D field of a base unit.

Definition at line 33 of file field.h.

Constructor & Destructor Documentation

◆ Field3D() [1/3]

template<class base >
Field3D< base >::Field3D ( const Field3D< base > &  g)
default

Construct a new Field3D object.

Parameters
[in]gAnother field

◆ Field3D() [2/3]

template<class base >
Field3D< base >::Field3D ( Field3D< base > &&  g)
inline

Construct a new Field3D object.

Parameters
[in]gAnother field

Definition at line 67 of file field.h.

◆ Field3D() [3/3]

template<class base >
Field3D< base >::Field3D ( size_t  pages = 0,
size_t  rows = 0,
size_t  cols = 0,
const base &  init = base() 
)
inline

Construct a new Field 3 D object.

Parameters
[in]pagesNumber of pages
[in]rowsNumber of rows
[in]colsNumeber of columns
[in]initConst value

Definition at line 81 of file field.h.

Member Function Documentation

◆ ncols()

template<class base >
size_t Field3D< base >::ncols ( ) const
inline

Number of columns.

Definition at line 176 of file field.h.

References Field3D< base >::mcols.

Referenced by transmat_field_calc_from_propmat_field().

◆ npages()

template<class base >
size_t Field3D< base >::npages ( ) const
inline

Number of pages.

Definition at line 170 of file field.h.

References Field3D< base >::mpages.

Referenced by operator<<(), and transmat_field_calc_from_propmat_field().

◆ nrows()

template<class base >
size_t Field3D< base >::nrows ( ) const
inline

Number of rows.

Definition at line 173 of file field.h.

References Field3D< base >::mrows.

Referenced by operator<<(), and transmat_field_calc_from_propmat_field().

◆ operator()() [1/3]

template<class base >
base Field3D< base >::operator() ( const GridPos page = {0, {0, 1}},
const GridPos row = {0, {0, 1}},
const GridPos col = {0, {0, 1}} 
) const
inline

Weighted access operator by GridPos.

Returns a weighted new object. The object must support multiplication with a Numeric and the addition of (object) * (Numeric).

Parameters
[in]pageOuter dim
[in]rowMiddle dim
[in]colInner dim
Returns
base&

Definition at line 133 of file field.h.

◆ operator()() [2/3]

template<class base >
const base& Field3D< base >::operator() ( size_t  col = 0,
size_t  row = 0,
size_t  page = 0 
) const
inline

Access operator.

Returns a ref to the object that cannot be changed

Parameters
[in]pageOuter dim
[in]rowMiddle dim
[in]colInner dim
Returns
base&

Definition at line 114 of file field.h.

References Field3D< base >::data, Field3D< base >::mcols, and Field3D< base >::mrows.

◆ operator()() [3/3]

template<class base >
base& Field3D< base >::operator() ( size_t  page = 0,
size_t  row = 0,
size_t  col = 0 
)
inline

Access operator.

Returns a ref to the object that can be changed in place

Parameters
[in]pageOuter dim
[in]rowMiddle dim
[in]colInner dim
Returns
base&

Definition at line 100 of file field.h.

References Field3D< base >::data, Field3D< base >::mcols, and Field3D< base >::mrows.

◆ operator=() [1/2]

template<class base >
Field3D<base>& Field3D< base >::operator= ( const Field3D< base > &  g)
default

Default assignment operator.

Parameters
[in]gAnother field
Returns
Field3D<base>& *this

◆ operator=() [2/2]

template<class base >
Field3D<base>& Field3D< base >::operator= ( Field3D< base > &&  g)
default

Default move operator.

Parameters
[in]gAnother field
Returns
Field3D<base>& *this

Member Data Documentation

◆ data

template<class base >
std::vector<base> Field3D< base >::data
private

Definition at line 36 of file field.h.

Referenced by Field3D< base >::operator()().

◆ mcols

template<class base >
size_t Field3D< base >::mcols
private

Definition at line 35 of file field.h.

Referenced by Field3D< base >::ncols(), and Field3D< base >::operator()().

◆ mpages

template<class base >
size_t Field3D< base >::mpages
private

Definition at line 35 of file field.h.

Referenced by Field3D< base >::npages().

◆ mrows

template<class base >
size_t Field3D< base >::mrows
private

Definition at line 35 of file field.h.

Referenced by Field3D< base >::nrows(), and Field3D< base >::operator()().


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