ARTS
2.3.1285(git:92a29ea9-dirty)
|
A constant view of a Tensor4. More...
#include <matpackIV.h>
Public Member Functions | |
constexpr | ConstTensor4View (const ConstTensor4View &)=default |
constexpr | ConstTensor4View (ConstTensor4View &&)=default |
ConstTensor4View & | operator= (const ConstTensor4View &)=default |
ConstTensor4View & | operator= (ConstTensor4View &&)=default |
bool | empty () const |
Check if variable is empty. More... | |
Index | nbooks () const |
Returns the number of books. More... | |
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... | |
ConstTensor4View | operator() (const Range &b, const Range &p, const Range &r, const Range &c) const |
Const index operator for subrange. More... | |
ConstTensor3View | operator() (const Range &b, const Range &p, const Range &r, Index c) const |
Const index operator returning an object of type ConstTensor3View. More... | |
ConstTensor3View | operator() (const Range &b, const Range &p, Index r, const Range &c) const |
Const index operator returning an object of type ConstTensor3View. More... | |
ConstTensor3View | operator() (const Range &b, Index p, const Range &r, const Range &c) const |
Const index operator returning an object of type ConstTensor3View. More... | |
ConstTensor3View | operator() (Index b, const Range &p, const Range &r, const Range &c) const |
Const index operator returning an object of type ConstTensor3View. More... | |
ConstMatrixView | operator() (const Range &b, const Range &p, Index r, Index c) const |
Const index operator returning an object of type ConstMatrixView. More... | |
ConstMatrixView | operator() (const Range &b, Index p, const Range &r, Index c) const |
Const index operator returning an object of type ConstMatrixView. More... | |
ConstMatrixView | operator() (const Range &b, Index p, Index r, const Range &c) const |
Const index operator returning an object of type ConstMatrixView. More... | |
ConstMatrixView | operator() (Index b, const Range &p, Index r, const Range &c) const |
Const index operator returning an object of type ConstMatrixView. More... | |
ConstMatrixView | operator() (Index b, const Range &p, const Range &r, Index c) const |
Const index operator returning an object of type ConstMatrixView. More... | |
ConstMatrixView | operator() (Index b, Index p, const Range &r, const Range &c) const |
Const index operator returning an object of type ConstMatrixView. More... | |
ConstVectorView | operator() (const Range &b, Index p, Index r, Index c) const |
Const index operator returning an object of type ConstVectorView. More... | |
ConstVectorView | operator() (Index b, const Range &p, Index r, Index c) const |
Const index operator returning an object of type ConstVectorView. More... | |
ConstVectorView | operator() (Index b, Index p, const Range &r, Index c) const |
Const index operator returning an object of type ConstVectorView. More... | |
ConstVectorView | operator() (Index b, Index p, Index r, const Range &c) const |
Const index operator returning an object of type ConstVectorView. More... | |
Numeric | operator() (Index b, Index p, Index r, Index c) const |
Plain const index operator. More... | |
Numeric | get (Index b, Index p, Index r, Index c) const |
Get element implementation without assertions. More... | |
ConstIterator4D | begin () const |
Return const iterator to first book. More... | |
ConstIterator4D | end () const |
Return const iterator behind last book. More... | |
virtual | ~ConstTensor4View ()=default |
Destructor. More... | |
ConstTensor4View (const ConstTensor3View &a) | |
Special constructor to make a Tensor4 view of a Tensor3. More... | |
Protected Member Functions | |
ConstTensor4View ()=default | |
ConstTensor4View (Numeric *data, const Range &b, const Range &p, const Range &r, const Range &c) | |
Explicit constructor. More... | |
ConstTensor4View (Numeric *data, const Range &pb, const Range &pp, const Range &pr, const Range &pc, const Range &nb, const Range &np, const Range &nr, const Range &nc) | |
Recursive constructor. More... | |
Protected Attributes | |
Range | mbr {0, 0, 1} |
The book range of mdata that is actually used. More... | |
Range | mpr {0, 0, 1} |
The page range of mdata that is actually used. More... | |
Range | mrr {0, 0, 1} |
The row range of mdata that is actually used. More... | |
Range | mcr {0, 0, 1} |
The column range of mdata that is actually used. More... | |
Numeric * | mdata {nullptr} |
Pointer to the plain C array that holds the data. More... | |
Friends | |
class | Tensor4View |
class | ConstIterator5D |
class | ConstTensor5View |
class | ConstTensor6View |
class | ConstTensor7View |
A constant view of a Tensor4.
This, together with the derived class Tensor4View, contains the main implementation of a Tensor4. It defines the concepts of Tensor4View. Plus additionally the recursive subrange operator, which makes it possible to create a Tensor4View from a subrange of a Tensor4View.
The four dimensions of the tensor are called: book, page, row, column.
The class Tensor4 is just a special case of a Tensor4View which also allocates storage.
Definition at line 133 of file matpackIV.h.
|
default |
|
default |
|
virtualdefault |
Destructor.
ConstTensor4View::ConstTensor4View | ( | const ConstTensor3View & | a | ) |
Special constructor to make a Tensor4 view of a Tensor3.
Definition at line 385 of file matpackIV.cc.
|
protecteddefault |
|
protected |
Explicit constructor.
This one is used by Tensor4 to initialize its own Tensor4View part. The page range pr must have a stride to account for the length of one page. The book range br must have a stride to account for the length of one book.
Definition at line 398 of file matpackIV.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 414 of file matpackIV.cc.
ConstIterator4D ConstTensor4View::begin | ( | ) | const |
Return const iterator to first book.
Definition at line 371 of file matpackIV.cc.
Referenced by copy(), max(), min(), Tensor4View::operator*=(), Tensor4View::operator+=(), Tensor4View::operator-=(), Tensor4View::operator/=(), operator<<(), Tensor4View::operator=(), Tensor4::Tensor4(), and transform().
bool ConstTensor4View::empty | ( | ) | const |
Check if variable is empty.
[in] | x | The variable to check. |
Definition at line 52 of file matpackIV.cc.
Referenced by abs_xsec_per_speciesAddLines(), any_negative(), cloudboxSetAutomatically(), get_variable_value(), iyIndependentBeamApproximation(), nlte_fieldForSingleSpeciesNonOverlappingLines(), nlteSetByQuantumIdentifiers(), pnd_fieldCalcFromParticleBulkProps(), propmat_clearsky_fieldCalc(), and test_empty().
ConstIterator4D ConstTensor4View::end | ( | ) | const |
Return const iterator behind last book.
Definition at line 377 of file matpackIV.cc.
Referenced by copy(), max(), min(), Tensor4View::operator*=(), Tensor4View::operator+=(), Tensor4View::operator-=(), Tensor4View::operator/=(), operator<<(), Tensor4View::operator=(), Tensor4::Tensor4(), and transform().
Get element implementation without assertions.
Definition at line 220 of file matpackIV.h.
Index ConstTensor4View::nbooks | ( | ) | const |
Returns the number of books.
Definition at line 57 of file matpackIV.cc.
Referenced by _cr_internal_(), Append(), AtmFieldPRegrid(), AtmFieldsCalcExpand1D(), AtmFieldsExpand1D(), AtmFieldsExtract1D(), AtmFieldsRefinePgrid(), chk_atm_field(), clear_rt_vars_at_gp(), cloud_atm_vars_by_gp(), cloud_fieldsCalc(), cloud_ppath_update1D_planeparallel(), cloud_ppath_update3D(), cloudboxSetAutomatically(), cloudy_rt_vars_at_gp(), Compare(), describe(), doit_scat_fieldCalc(), doit_scat_fieldCalcLimb(), DoitScatteringDataPrepare(), Extract(), get_paroptprop(), get_ppath_atmvars(), get_ppath_cloudvars(), get_ppath_transmat(), get_refr_index_1d(), get_refr_index_2d(), get_refr_index_3d(), get_stepwise_scattersky_propmat(), get_variable_value(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldPRegrid(), heating_ratesFromIrradiance(), interp_cloud_coeff1D(), irradiance_fieldFromRadiance(), iwp_cloud_opt_pathCalc(), iyActiveSingleScat(), iyActiveSingleScat2(), iyIndependentBeamApproximation(), iySurfaceRtpropAgenda(), iySurfaceRtpropCalc(), MCGeneral(), MCIPA(), MCRadar(), nca_def_Tensor4(), nca_put_var_Tensor4(), nca_write_to_file(), EnergyLevelMap::OK(), Tensor4View::operator*=(), Tensor4View::operator+=(), Tensor4View::operator-=(), Tensor4View::operator/=(), Tensor4::operator=(), opt_prop_1ScatElem(), OptimizeDoitPressureGrid(), particle_fieldCleanup(), pha_mat_sptFromData(), pha_mat_sptFromDataDOITOpt(), pha_mat_sptFromMonoData(), pha_mat_sptFromScat_data(), pnd_fieldCalcFromParticleBulkProps(), pnd_fieldExpand1D(), propmat_clearsky_fieldCalc(), RadiationFieldSpectralIntegrate(), Reduce(), ScatSpeciesMerge(), select_dims_by_size(), StokesVector::StokesVector(), surface_scalar_reflectivityFromGriddedField4(), surface_scalar_reflectivityFromSurface_rmatrix(), surfaceSplitSpecularTo3beams(), Tensor3ExtractFromTensor4(), Tensor4::Tensor4(), Tensor4AddScalar(), Tensor4Clip(), Tensor4Scale(), test1(), transform(), vmr_fieldSetConstant(), and xml_write_to_stream().
Index ConstTensor4View::ncols | ( | ) | const |
Returns the number of columns.
Definition at line 66 of file matpackIV.cc.
Referenced by Append(), atm_fields_compactAddConstant(), atm_fields_compactExpand(), AtmFieldPRegrid(), chk_atm_field(), cloud_fieldsCalc(), Compare(), describe(), Extract(), get_variable_value(), GriddedFieldLatLonExpand(), GriddedFieldPRegrid(), iySurfaceRtpropAgenda(), iySurfaceRtpropCalc(), nca_def_Tensor4(), nca_put_var_Tensor4(), nca_write_to_file(), EnergyLevelMap::OK(), Tensor4View::operator*=(), Tensor4View::operator+=(), Tensor4View::operator-=(), Tensor4View::operator/=(), Tensor4::operator=(), EnergyLevelMap::operator[](), opt_prop_1ScatElem(), pha_mat_sptFromDataDOITOpt(), pnd_fieldExpand1D(), PropagationMatrix::PropagationMatrix(), Reduce(), select_dims_by_size(), StokesVector::StokesVector(), surface_scalar_reflectivityFromGriddedField4(), Tensor3ExtractFromTensor4(), Tensor4::Tensor4(), Tensor4AddScalar(), Tensor4Scale(), test1(), transform(), x2artsAtmAndSurf(), and xml_write_to_stream().
Index ConstTensor4View::npages | ( | ) | const |
Returns the number of pages.
Definition at line 60 of file matpackIV.cc.
Referenced by Append(), atm_fields_compactAddConstant(), atm_fields_compactExpand(), AtmFieldsExtract1D(), chk_atm_field(), Compare(), describe(), Extract(), get_variable_value(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), heating_ratesFromIrradiance(), irradiance_fieldFromRadiance(), iyIndependentBeamApproximation(), iySurfaceRtpropAgenda(), iySurfaceRtpropCalc(), nca_def_Tensor4(), nca_put_var_Tensor4(), nca_write_to_file(), EnergyLevelMap::OK(), Tensor4View::operator*=(), Tensor4View::operator+=(), Tensor4View::operator-=(), Tensor4View::operator/=(), Tensor4::operator=(), opt_prop_1ScatElem(), particle_fieldCleanup(), pnd_fieldExpand1D(), RadiationFieldSpectralIntegrate(), Reduce(), select_dims_by_size(), StokesVector::StokesVector(), surface_scalar_reflectivityFromGriddedField4(), surface_scalar_reflectivityFromSurface_rmatrix(), Tensor3ExtractFromTensor4(), Tensor4::Tensor4(), Tensor4AddScalar(), Tensor4Clip(), Tensor4Scale(), test1(), transform(), x2artsAtmAndSurf(), and xml_write_to_stream().
Index ConstTensor4View::nrows | ( | ) | const |
Returns the number of rows.
Definition at line 63 of file matpackIV.cc.
Referenced by Append(), atm_fields_compactAddConstant(), atm_fields_compactExpand(), AtmFieldPRegrid(), chk_atm_field(), Compare(), describe(), Extract(), get_variable_value(), GriddedFieldLatLonExpand(), GriddedFieldPRegrid(), heating_ratesFromIrradiance(), irradiance_fieldFromRadiance(), iySurfaceRtpropAgenda(), iySurfaceRtpropCalc(), nca_def_Tensor4(), nca_put_var_Tensor4(), nca_write_to_file(), EnergyLevelMap::OK(), Tensor4View::operator*=(), Tensor4View::operator+=(), Tensor4View::operator-=(), Tensor4View::operator/=(), Tensor4::operator=(), opt_prop_1ScatElem(), pnd_fieldExpand1D(), RadiationFieldSpectralIntegrate(), Reduce(), select_dims_by_size(), StokesVector::StokesVector(), surface_scalar_reflectivityFromGriddedField4(), Tensor3ExtractFromTensor4(), Tensor4::Tensor4(), Tensor4AddScalar(), Tensor4Clip(), Tensor4Scale(), test1(), transform(), x2artsAtmAndSurf(), and xml_write_to_stream().
ConstTensor4View ConstTensor4View::operator() | ( | 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 Tensor4. This allows correct recursive behavior.
Definition at line 71 of file matpackIV.cc.
ConstTensor3View ConstTensor4View::operator() | ( | 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 one.)
Definition at line 80 of file matpackIV.cc.
ConstTensor3View ConstTensor4View::operator() | ( | 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 one.)
Definition at line 94 of file matpackIV.cc.
ConstTensor3View ConstTensor4View::operator() | ( | 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 one.)
Definition at line 108 of file matpackIV.cc.
ConstTensor3View ConstTensor4View::operator() | ( | 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 one.)
Definition at line 122 of file matpackIV.cc.
ConstMatrixView ConstTensor4View::operator() | ( | const Range & | b, |
const Range & | p, | ||
Index | r, | ||
Index | c | ||
) | const |
Const index operator returning an object of type ConstMatrixView.
(Reducing the dimension by two.)
Definition at line 136 of file matpackIV.cc.
ConstMatrixView ConstTensor4View::operator() | ( | const Range & | b, |
Index | p, | ||
const Range & | r, | ||
Index | c | ||
) | const |
Const index operator returning an object of type ConstMatrixView.
(Reducing the dimension by two.)
Definition at line 156 of file matpackIV.cc.
ConstMatrixView ConstTensor4View::operator() | ( | const Range & | b, |
Index | p, | ||
Index | r, | ||
const Range & | c | ||
) | const |
Const index operator returning an object of type ConstMatrixView.
(Reducing the dimension by two.)
Definition at line 176 of file matpackIV.cc.
ConstMatrixView ConstTensor4View::operator() | ( | Index | b, |
const Range & | p, | ||
Index | r, | ||
const Range & | c | ||
) | const |
Const index operator returning an object of type ConstMatrixView.
(Reducing the dimension by two.)
Definition at line 196 of file matpackIV.cc.
ConstMatrixView ConstTensor4View::operator() | ( | Index | b, |
const Range & | p, | ||
const Range & | r, | ||
Index | c | ||
) | const |
Const index operator returning an object of type ConstMatrixView.
(Reducing the dimension by two.)
Definition at line 216 of file matpackIV.cc.
ConstMatrixView ConstTensor4View::operator() | ( | Index | b, |
Index | p, | ||
const Range & | r, | ||
const Range & | c | ||
) | const |
Const index operator returning an object of type ConstMatrixView.
(Reducing the dimension by two.)
Definition at line 236 of file matpackIV.cc.
ConstVectorView ConstTensor4View::operator() | ( | const Range & | b, |
Index | p, | ||
Index | r, | ||
Index | c | ||
) | const |
Const index operator returning an object of type ConstVectorView.
(Reducing the dimension by three.)
Definition at line 256 of file matpackIV.cc.
ConstVectorView ConstTensor4View::operator() | ( | Index | b, |
const Range & | p, | ||
Index | r, | ||
Index | c | ||
) | const |
Const index operator returning an object of type ConstVectorView.
(Reducing the dimension by three.)
Definition at line 276 of file matpackIV.cc.
ConstVectorView ConstTensor4View::operator() | ( | Index | b, |
Index | p, | ||
const Range & | r, | ||
Index | c | ||
) | const |
Const index operator returning an object of type ConstVectorView.
(Reducing the dimension by three.)
Definition at line 296 of file matpackIV.cc.
ConstVectorView ConstTensor4View::operator() | ( | Index | b, |
Index | p, | ||
Index | r, | ||
const Range & | c | ||
) | const |
Const index operator returning an object of type ConstVectorView.
Reducing the dimension by three.)
Definition at line 316 of file matpackIV.cc.
|
default |
|
default |
|
friend |
Definition at line 235 of file matpackIV.h.
|
friend |
Definition at line 236 of file matpackIV.h.
|
friend |
Definition at line 237 of file matpackIV.h.
|
friend |
Definition at line 238 of file matpackIV.h.
|
friend |
Definition at line 234 of file matpackIV.h.
|
protected |
The book range of mdata that is actually used.
Definition at line 264 of file matpackIV.h.
Referenced by Tensor4View::begin(), Tensor4View::end(), Iterator5D::operator!=(), ConstIterator5D::operator!=(), Tensor4View::operator=(), Tensor4::operator=(), and swap().
|
protected |
The column range of mdata that is actually used.
Definition at line 270 of file matpackIV.h.
Referenced by Tensor4View::begin(), Tensor4View::end(), Iterator5D::operator!=(), ConstIterator5D::operator!=(), Tensor4View::operator=(), Tensor4::operator=(), and swap().
|
protected |
Pointer to the plain C array that holds the data.
Definition at line 272 of file matpackIV.h.
Referenced by Tensor4View::begin(), Tensor4View::end(), Iterator5D::operator!=(), ConstIterator5D::operator!=(), Iterator5D::operator++(), ConstIterator5D::operator++(), Tensor4::operator=(), swap(), Tensor4::Tensor4(), and Tensor4::~Tensor4().
|
protected |
The page range of mdata that is actually used.
Definition at line 266 of file matpackIV.h.
Referenced by Tensor4View::begin(), Tensor4View::end(), Iterator5D::operator!=(), ConstIterator5D::operator!=(), Tensor4View::operator=(), Tensor4::operator=(), and swap().
|
protected |
The row range of mdata that is actually used.
Definition at line 268 of file matpackIV.h.
Referenced by Tensor4View::begin(), Tensor4View::end(), Iterator5D::operator!=(), ConstIterator5D::operator!=(), Tensor4View::operator=(), Tensor4::operator=(), and swap().