ARTS
2.2.66
|
A constant view of a Tensor3. More...
#include <matpackIII.h>
Public Member Functions | |
Index | npages () const |
Returns the number of pages. More... | |
Index | nrows () const |
Returns the number of rows. More... | |
Index | ncols () const |
Returns the number of columns. More... | |
ConstTensor3View | operator() (const Range &p, const Range &r, const Range &c) const |
Const index operator for subrange. More... | |
ConstMatrixView | operator() (const Range &p, const Range &r, Index c) const |
Const index operator returning an object of type ConstMatrixView. More... | |
ConstMatrixView | operator() (const Range &p, Index r, const Range &c) const |
Const index operator returning an object of type ConstMatrixView. More... | |
ConstMatrixView | operator() (Index p, const Range &r, const Range &c) const |
Const index operator returning an object of type ConstMatrixView. More... | |
ConstVectorView | operator() (Index p, Index r, const Range &c) const |
Const index operator returning an object of type ConstVectorView. More... | |
ConstVectorView | operator() (Index p, const Range &r, Index c) const |
Const index operator returning an object of type ConstVectorView. More... | |
ConstVectorView | operator() (const Range &p, Index r, Index c) const |
Const index operator returning an object of type ConstVectorView. More... | |
Numeric | operator() (Index p, Index r, Index c) const |
Plain const index operator. More... | |
Numeric | get (Index p, Index r, Index c) const |
Get element implementation without assertions. More... | |
ConstIterator3D | begin () const |
Return const iterator to first page. More... | |
ConstIterator3D | end () const |
Return const iterator behind last page. More... | |
virtual | ~ConstTensor3View () |
Destructor. More... | |
ConstTensor3View (const ConstMatrixView &a) | |
Special constructor to make a Tensor3 view of a matrix. More... | |
Protected Member Functions | |
ConstTensor3View () | |
Default constructor. More... | |
ConstTensor3View (Numeric *data, const Range &p, const Range &r, const Range &c) | |
Explicit constructor. More... | |
ConstTensor3View (Numeric *data, const Range &pp, const Range &pr, const Range &pc, const Range &np, const Range &nr, const Range &nc) | |
Recursive constructor. More... | |
Protected Attributes | |
Range | mpr |
The page range of mdata that is actually used. More... | |
Range | mrr |
The row range of mdata that is actually used. More... | |
Range | mcr |
The column range of mdata that is actually used. More... | |
Numeric * | mdata |
Pointer to the plain C array that holds the data. More... | |
Friends | |
class | Tensor3View |
class | ConstIterator4D |
class | ConstTensor4View |
class | ConstTensor5View |
class | ConstTensor6View |
class | ConstTensor7View |
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 139 of file matpackIII.h.
|
inlinevirtual |
Destructor.
Definition at line 189 of file matpackIII.h.
ConstTensor3View::ConstTensor3View | ( | const ConstMatrixView & | a | ) |
Special constructor to make a Tensor3 view of a matrix.
Definition at line 163 of file matpackIII.cc.
|
protected |
Default constructor.
This is necessary, so that we can have a default constructor for derived classes.
Definition at line 174 of file matpackIII.cc.
Referenced by operator()().
|
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 184 of file matpackIII.cc.
|
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 203 of file matpackIII.cc.
ConstIterator3D ConstTensor3View::begin | ( | ) | const |
Return const iterator to first page.
Definition at line 144 of file matpackIII.cc.
References mcr, mdata, mpr, mrr, Range::mstart, and Range::mstride.
Referenced by Tensor3View::begin(), copy(), max(), min(), Tensor3View::operator*=(), Tensor3View::operator+=(), Tensor3View::operator-=(), Tensor3View::operator/=(), operator<<(), Tensor3View::operator=(), Tensor3::Tensor3(), and transform().
ConstIterator3D ConstTensor3View::end | ( | ) | const |
Return const iterator behind last page.
Definition at line 153 of file matpackIII.cc.
References mcr, mdata, Range::mextent, mpr, mrr, Range::mstart, and Range::mstride.
Referenced by copy(), Tensor3View::end(), max(), min(), operator<<(), Tensor3View::operator=(), Tensor3::Tensor3(), and transform().
Get element implementation without assertions.
Definition at line 176 of file matpackIII.h.
References mcr, mdata, mpr, mrr, Range::mstart, and Range::mstride.
Referenced by Tensor3View::get(), interp(), and operator()().
|
inline |
Returns the number of columns.
Definition at line 149 of file matpackIII.h.
References mcr, and Range::mextent.
Referenced by abs_vecTransform(), apply_iy_unit2(), atmgeom_checkedCalc(), calc_nd_field(), GriddedField3::checksize(), GriddedField3::checksize_strict(), chk_atm_field(), chk_atm_vecfield_lat90(), chk_massdensity_field(), chk_size(), Compare(), complex_n_interp(), describe(), emission_rtstep(), ext_matAddGas(), ext_matAddPart(), ext_matTransform(), GriddedFieldLatLonExpand(), GriddedFieldPRegrid(), GriddedFieldZToPRegrid(), is_size(), iy_transmission_mult(), iyCloudRadar(), iyLoopFrequencies(), iyMC(), iyRadioLink(), iyTransmissionStandard(), jacobianCalcAbsSpeciesPerturbations(), MatrixExtractFromTensor3(), mult(), nca_write_to_file(), Tensor3View::operator*=(), Tensor3View::operator+=(), Tensor3View::operator-=(), Tensor3View::operator/=(), opt_prop_sptFromData(), opt_prop_sptFromMonoData(), perturbation_field_3d(), pnd_fieldSetup(), Reduce(), select_dims_by_size(), surface_calc(), surfaceFlatReflectivity(), Tensor3AddScalar(), Tensor3Scale(), test01(), test06(), test31(), transform(), xml_write_to_stream(), xsec_species_line_mixing_wrapper_with_zeeman(), and z_fieldFromHSE().
|
inline |
Returns the number of pages.
Definition at line 143 of file matpackIII.h.
References Range::mextent, and mpr.
Referenced by abs_vecTransform(), apply_iy_unit2(), atmfields_checkedCalc(), AtmFieldsCalcExpand1D(), atmgeom_checkedCalc(), calc_nd_field(), GriddedField3::checksize(), GriddedField3::checksize_strict(), chk_atm_field(), chk_atm_vecfield_lat90(), chk_massdensity_field(), chk_size(), cloudbox_checkedCalc(), cloudboxSetManuallyAltitude(), Compare(), complex_n_interp(), describe(), emission_rtstep(), ext_matAddGas(), ext_matAddPart(), ext_matTransform(), Extract(), get_ppath_atmvars(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldZToPRegrid(), is_size(), iy_transmission_mult(), iySurfaceRtpropAgenda(), jacobianCalcAbsSpeciesPerturbations(), MatrixExtractFromTensor3(), mult(), nca_write_to_file(), Tensor3View::operator*=(), Tensor3View::operator+=(), Tensor3View::operator-=(), Tensor3View::operator/=(), opt_prop_sptFromData(), opt_prop_sptFromMonoData(), p_gridFromZRaw(), perturbation_field_3d(), pnd_fieldSetup(), propmat_clearsky_fieldCalc(), Reduce(), select_dims_by_size(), surfaceFlatReflectivity(), Tensor3AddScalar(), Tensor3Scale(), test04(), test31(), transform(), wind_u_fieldIncludePlanetRotation(), WriteMolTau(), xml_write_to_stream(), xsec_species_line_mixing_wrapper_with_zeeman(), and z_fieldFromHSE().
|
inline |
Returns the number of rows.
Definition at line 146 of file matpackIII.h.
References Range::mextent, and mrr.
Referenced by apply_iy_unit2(), atmgeom_checkedCalc(), calc_nd_field(), GriddedField3::checksize(), GriddedField3::checksize_strict(), chk_atm_field(), chk_atm_vecfield_lat90(), chk_massdensity_field(), chk_size(), Compare(), complex_n_interp(), describe(), emission_rtstep(), ext_matAddGas(), ext_matAddPart(), GriddedFieldLatLonExpand(), GriddedFieldPRegrid(), GriddedFieldZToPRegrid(), is_size(), iy_transmission_mult(), jacobianCalcAbsSpeciesPerturbations(), MatrixExtractFromTensor3(), mult(), nca_write_to_file(), Tensor3View::operator*=(), Tensor3View::operator+=(), Tensor3View::operator-=(), Tensor3View::operator/=(), perturbation_field_3d(), pnd_fieldSetup(), Reduce(), select_dims_by_size(), surface_calc(), surfaceFlatReflectivity(), Tensor3AddScalar(), Tensor3Scale(), test31(), transform(), xml_write_to_stream(), xsec_species_line_mixing_wrapper_with_zeeman(), and z_fieldFromHSE().
ConstTensor3View ConstTensor3View::operator() | ( | 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 Tensor3. This allows correct recursive behavior.
Definition at line 37 of file matpackIII.cc.
References ConstTensor3View(), mcr, mdata, mpr, and mrr.
Referenced by Tensor3View::operator()().
ConstMatrixView ConstTensor3View::operator() | ( | const Range & | p, |
const Range & | r, | ||
Index | c | ||
) | const |
Const index operator returning an object of type ConstMatrixView.
(Reducing the dimension by one.)
Definition at line 46 of file matpackIII.cc.
References mcr, mdata, Range::mextent, mpr, mrr, Range::mstart, and Range::mstride.
ConstMatrixView ConstTensor3View::operator() | ( | const Range & | p, |
Index | r, | ||
const Range & | c | ||
) | const |
Const index operator returning an object of type ConstMatrixView.
(Reducing the dimension by one.)
Definition at line 61 of file matpackIII.cc.
References mcr, mdata, Range::mextent, mpr, mrr, Range::mstart, and Range::mstride.
ConstVectorView ConstTensor3View::operator() | ( | const Range & | p, |
Index | r, | ||
Index | c | ||
) | const |
Const index operator returning an object of type ConstVectorView.
(Reducing the dimension by two.)
Definition at line 127 of file matpackIII.cc.
References mcr, mdata, Range::mextent, mpr, mrr, Range::mstart, and Range::mstride.
ConstMatrixView ConstTensor3View::operator() | ( | Index | p, |
const Range & | r, | ||
const Range & | c | ||
) | const |
Const index operator returning an object of type ConstMatrixView.
(Reducing the dimension by one.)
Definition at line 76 of file matpackIII.cc.
References mcr, mdata, Range::mextent, mpr, mrr, Range::mstart, and Range::mstride.
ConstVectorView ConstTensor3View::operator() | ( | Index | p, |
const Range & | r, | ||
Index | c | ||
) | const |
Const index operator returning an object of type ConstVectorView.
(Reducing the dimension by two.)
Definition at line 109 of file matpackIII.cc.
References mcr, mdata, Range::mextent, mpr, mrr, Range::mstart, and Range::mstride.
ConstVectorView ConstTensor3View::operator() | ( | Index | p, |
Index | r, | ||
const Range & | c | ||
) | const |
Const index operator returning an object of type ConstVectorView.
(Reducing the dimension by two.)
Definition at line 91 of file matpackIII.cc.
References mcr, mdata, Range::mextent, mpr, mrr, Range::mstart, and Range::mstride.
Plain const index operator.
Definition at line 163 of file matpackIII.h.
References get(), mcr, Range::mextent, mpr, and mrr.
|
friend |
Definition at line 193 of file matpackIII.h.
|
friend |
Definition at line 194 of file matpackIII.h.
|
friend |
Definition at line 195 of file matpackIII.h.
|
friend |
Definition at line 196 of file matpackIII.h.
|
friend |
Definition at line 197 of file matpackIII.h.
|
friend |
Definition at line 192 of file matpackIII.h.
|
protected |
The column range of mdata that is actually used.
Definition at line 218 of file matpackIII.h.
Referenced by Tensor3View::begin(), begin(), Tensor3View::end(), end(), Tensor3View::get(), get(), Tensor3View::get_c_array(), ncols(), ConstIterator4D::operator!=(), Iterator4D::operator!=(), Tensor3View::operator()(), operator()(), Tensor3View::operator=(), Tensor3::resize(), and swap().
|
protected |
Pointer to the plain C array that holds the data.
Definition at line 220 of file matpackIII.h.
Referenced by Tensor3View::begin(), begin(), Tensor3View::end(), end(), Tensor3View::get(), get(), Tensor3View::get_c_array(), ConstIterator4D::operator!=(), Iterator4D::operator!=(), Tensor3View::operator()(), operator()(), Iterator4D::operator++(), ConstIterator4D::operator++(), Tensor3::resize(), swap(), Tensor3::Tensor3(), and Tensor3::~Tensor3().
|
protected |
The page range of mdata that is actually used.
Definition at line 214 of file matpackIII.h.
Referenced by Tensor3View::begin(), begin(), Tensor3View::end(), end(), Tensor3View::get(), get(), Tensor3View::get_c_array(), npages(), ConstIterator4D::operator!=(), Iterator4D::operator!=(), Tensor3View::operator()(), operator()(), Tensor3View::operator=(), Tensor3::resize(), and swap().
|
protected |
The row range of mdata that is actually used.
Definition at line 216 of file matpackIII.h.
Referenced by Tensor3View::begin(), begin(), Tensor3View::end(), end(), Tensor3View::get(), get(), Tensor3View::get_c_array(), nrows(), ConstIterator4D::operator!=(), Iterator4D::operator!=(), Tensor3View::operator()(), operator()(), Tensor3View::operator=(), Tensor3::resize(), and swap().