ARTS
2.0.49
|
A constant view of a Matrix. More...
#include <matpackI.h>
Public Types | |
typedef ConstIterator2D | const_iterator |
Public Member Functions | |
Index | nrows () const |
Returns the number of rows. More... | |
Index | ncols () const |
Returns the number of columns. More... | |
Numeric | operator() (Index r, Index c) const |
Plain const index operator. More... | |
ConstMatrixView | operator() (const Range &r, const Range &c) const |
Const index operator for subrange. More... | |
ConstVectorView | operator() (const Range &r, Index c) const |
Const index operator returning a column as an object of type ConstVectorView. More... | |
ConstVectorView | operator() (Index r, const Range &c) const |
Const index operator returning a row as an object of type ConstVectorView. More... | |
ConstIterator2D | begin () const |
Return const iterator to first row. More... | |
ConstIterator2D | end () const |
Return const iterator behind last row. More... | |
virtual | ~ConstMatrixView () |
Destructor. More... | |
Protected Member Functions | |
ConstMatrixView () | |
Default constructor. More... | |
ConstMatrixView (Numeric *data, const Range &r, const Range &c) | |
Explicit constructor. More... | |
ConstMatrixView (Numeric *data, const Range &pr, const Range &pc, const Range &nr, const Range &nc) | |
Recursive constructor. More... | |
Protected Attributes | |
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 | MatrixView |
class | ConstIterator3D |
class | ConstVectorView |
class | ConstTensor3View |
class | ConstTensor4View |
class | ConstTensor5View |
class | ConstTensor6View |
class | ConstTensor7View |
ConstMatrixView | transpose (ConstMatrixView m) |
Const version of transpose. More... | |
int | poly_root_solve (Matrix &roots, Vector &coeffs) |
void | mult (VectorView, const ConstMatrixView &, const ConstVectorView &) |
Matrix Vector multiplication. More... | |
A constant view of a Matrix.
This, together with the derived class MatrixView, contains the main implementation of a Matrix. It defines the concepts of MatrixView. Plus additionally the recursive subrange operator, which makes it possible to create a MatrixView from a subrange of a MatrixView.
The class Matrix is just a special case of a MatrixView which also allocates storage.
Definition at line 591 of file matpackI.h.
Definition at line 594 of file matpackI.h.
|
inlinevirtual |
Destructor.
Definition at line 625 of file matpackI.h.
|
protected |
Default constructor.
This is necessary, so that we can have a default constructor for derived classes.
Definition at line 864 of file matpackI.cc.
Referenced by operator()().
Explicit constructor.
This one is used by Matrix to initialize its own MatrixView part. The row range rr must have a stride to account for the length of one row.
Definition at line 873 of file matpackI.cc.
|
protected |
Recursive constructor.
This is used to construct SubMatrices from SubMatrices. 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 897 of file matpackI.cc.
ConstIterator2D ConstMatrixView::begin | ( | ) | const |
Return const iterator to first row.
Definition at line 847 of file matpackI.cc.
References ConstVectorView, mcr, mdata, mrr, Range::mstart, and Range::mstride.
Referenced by MatrixView::begin(), copy(), Matrix::Matrix(), max(), mean(), min(), mult(), MatrixView::operator*=(), MatrixView::operator+=(), MatrixView::operator-=(), MatrixView::operator/=(), operator<<(), MatrixView::operator=(), Matrix::operator=(), and transform().
ConstIterator2D ConstMatrixView::end | ( | ) | const |
Return const iterator behind last row.
Definition at line 855 of file matpackI.cc.
References ConstVectorView, mcr, mdata, Range::mextent, mrr, Range::mstart, and Range::mstride.
Referenced by copy(), MatrixView::end(), Matrix::Matrix(), max(), mean(), min(), operator<<(), MatrixView::operator=(), Matrix::operator=(), and transform().
Index ConstMatrixView::ncols | ( | ) | const |
Returns the number of columns.
Definition at line 802 of file matpackI.cc.
References mcr, and Range::mextent.
Referenced by abs_coefCalcFromXsec(), abs_coefCalcSaveMemory(), abs_h2oSet(), abs_lookupSetupBatch(), abs_n2Set(), abs_scalar_gasExtractFromLookup(), abs_vecAddPart(), abs_xsec_per_speciesAddConts(), AntennaMultiBeamsToPencilBeams(), apply_y_unit(), apply_y_unit2(), atm_fields_compactFromMatrix(), atm_fields_compactFromMatrixChevalAll(), basics_checkedCalc(), BF86_CIA_N2(), GriddedField2::checksize(), chk_atm_surface(), chk_matrix_ncols(), chk_size(), CKD24_H20(), CKD_222_foreign_h2o(), CKD_222_self_h2o(), CKD_241_co2(), CKD_242_foreign_h2o(), CKD_242_self_h2o(), CKD_mt_100_foreign_h2o(), CKD_mt_100_self_h2o(), CKD_mt_CIAfun_n2(), CKD_mt_CIAfun_o2(), CKD_mt_CIArot_n2(), CKD_mt_co2(), CKD_mt_v0v0_o2(), CKD_mt_v1v0_o2(), cloud_RT_surface(), CP98H2OAbsModel(), describe(), DoitCloudboxFieldPut(), ext_matTransform(), from_dpath_to_dx(), get_iy_of_background(), id_mat(), interp(), interp_atmfield_by_itw(), interp_atmsurface_by_itw(), is_diagonal(), is_singular(), is_size(), itw2p(), iyb_calc(), iyFOS(), MaTipping_H2O_foreign_continuum(), matrix_exp(), matrix_exp_p30(), MatrixCompare(), MatrixMatrixMultiply(), MatrixScale(), MCGeneral(), mean(), MPM02H2OAbsModel(), MPM85O2AbsModel(), MPM87H2OAbsModel(), MPM87O2AbsModel(), MPM89H2OAbsModel(), MPM89O2AbsModel(), MPM92O2AbsModel(), MPM93_H2O_continuum(), MPM93_N2_continuum(), MPM93_O2_continuum(), MPM93H2OAbsModel(), MPM93IceCrystalAbs(), MPM93O2AbsModel(), MPM93RainExt(), MPM93WaterDropletAbs(), mult(), norm_inf(), MatrixView::operator*=(), MatrixView::operator+=(), MatrixView::operator-=(), MatrixView::operator/=(), operator<<(), opt_propCalc(), Pardo_ATM_H2O_ForeignContinuum(), Pardo_ATM_N2_dry_continuum(), perturbation_field_2d(), pha_mat_labCalc(), pha_matTransform(), phase_functionCalc(), poly_root_solve(), PWR93O2AbsModel(), PWR98H2OAbsModel(), r_geoidSpherical(), r_geoidWGS84(), Rosenkranz_CO2_foreign_continuum(), Rosenkranz_CO2_self_continuum(), Rosenkranz_N2_self_continuum(), Rosenkranz_O2_continuum(), rotationmat3D(), Select(), sensor_responseAntenna(), sensor_responseSimpleAMSU(), Standard_H2O_foreign_continuum(), Standard_H2O_self_continuum(), Standard_N2_self_continuum(), Standard_O2_continuum(), surface_specular_R_and_b(), test30(), transform(), VectorExtractFromMatrix(), xml_write_to_stream(), xsec_continuum_tag(), xsec_species(), y_unitApply(), ybatchCalc(), yCalc(), yCalc2(), and z_fieldFromHSE().
Index ConstMatrixView::nrows | ( | ) | const |
Returns the number of rows.
Definition at line 796 of file matpackI.cc.
References Range::mextent, and mrr.
Referenced by abs_coefCalcFromXsec(), abs_coefCalcSaveMemory(), abs_lookupSetupBatch(), abs_scalar_gasExtractFromLookup(), abs_vecAddGas(), abs_vecAddPart(), abs_xsec_per_speciesAddConts(), abs_xsec_per_speciesAddLines(), AntennaMultiBeamsToPencilBeams(), apply_y_unit(), apply_y_unit2(), atm_fields_compactFromMatrix(), atm_fields_compactFromMatrixChevalAll(), basics_checkedCalc(), BF86_CIA_N2(), calc_lookup_error(), GriddedField2::checksize(), chk_atm_surface(), chk_matrix_nrows(), chk_size(), CKD24_H20(), CKD_222_foreign_h2o(), CKD_222_self_h2o(), CKD_241_co2(), CKD_242_foreign_h2o(), CKD_242_self_h2o(), CKD_mt_100_foreign_h2o(), CKD_mt_100_self_h2o(), CKD_mt_CIAfun_n2(), CKD_mt_CIAfun_o2(), CKD_mt_CIArot_n2(), CKD_mt_co2(), CKD_mt_v0v0_o2(), CKD_mt_v1v0_o2(), cloud_RT_no_background(), cloud_RT_surface(), CP98H2OAbsModel(), describe(), ext2trans(), ext_matAddGas(), fos_yStandard(), from_dpath_to_dx(), get_iy_of_background(), get_ppath_rtvars(), get_refr_index_1d(), id_mat(), interp(), is_diagonal(), is_singular(), is_size(), itw2p(), iyb_calc(), iyFOS(), jacobianAddPointingZa(), jacobianAddPolyfit(), jacobianCalcPointingZaInterp(), jacobianCalcPointingZaRecalc(), jacobianClose(), lubacksub(), ludcmp(), MaTipping_H2O_foreign_continuum(), matrix_exp_p30(), MatrixCompare(), MatrixMatrixMultiply(), MatrixScale(), MCGeneral(), MCIPA(), mean(), MPM02H2OAbsModel(), MPM85O2AbsModel(), MPM87H2OAbsModel(), MPM87O2AbsModel(), MPM89H2OAbsModel(), MPM89O2AbsModel(), MPM92O2AbsModel(), MPM93_H2O_continuum(), MPM93_N2_continuum(), MPM93_O2_continuum(), MPM93H2OAbsModel(), MPM93IceCrystalAbs(), MPM93O2AbsModel(), MPM93RainExt(), MPM93WaterDropletAbs(), mult(), norm_inf(), MatrixView::operator*=(), MatrixView::operator+=(), MatrixView::operator-=(), MatrixView::operator/=(), operator<<(), opt_prop_sptFromData(), opt_prop_sptFromMonoData(), opt_propCalc(), Pardo_ATM_H2O_ForeignContinuum(), Pardo_ATM_N2_dry_continuum(), perturbation_field_2d(), pmomCalc(), poly_root_solve(), ppath_end_2d(), PWR93O2AbsModel(), PWR98H2OAbsModel(), r_geoidSpherical(), r_geoidWGS84(), Rosenkranz_CO2_foreign_continuum(), Rosenkranz_CO2_self_continuum(), Rosenkranz_N2_self_continuum(), Rosenkranz_O2_continuum(), rotationmat3D(), Select(), sensor_posAddRgeoid(), sensor_responseSimpleAMSU(), Standard_H2O_foreign_continuum(), Standard_H2O_self_continuum(), Standard_N2_self_continuum(), Standard_O2_continuum(), surface_calc(), surface_specular_R_and_b(), surfaceFlatRefractiveIndex(), test30(), transform(), VectorExtractFromMatrix(), VectorZtanToZa1D(), VectorZtanToZaRefr1D(), xml_write_to_stream(), xsec_continuum_tag(), xsec_species(), y_unitApply(), ybatchCalc(), ybatchMetProfiles(), ybatchMetProfilesClear(), yCalc(), yCalc2(), and z_fieldFromHSE().
ConstMatrixView ConstMatrixView::operator() | ( | 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 Matrix. This allows correct recursive behavior.
Definition at line 810 of file matpackI.cc.
References ConstMatrixView(), mcr, mdata, and mrr.
ConstVectorView ConstMatrixView::operator() | ( | const Range & | r, |
Index | c | ||
) | const |
Const index operator returning a column as an object of type ConstVectorView.
r | A range of rows. |
c | Index of selected column |
Definition at line 821 of file matpackI.cc.
References ConstVectorView, mcr, mdata, Range::mextent, mrr, Range::mstart, and Range::mstride.
ConstVectorView ConstMatrixView::operator() | ( | Index | r, |
const Range & | c | ||
) | const |
Const index operator returning a row as an object of type ConstVectorView.
r | Index of selected row. |
c | Range of columns |
Definition at line 836 of file matpackI.cc.
References ConstVectorView, mcr, mdata, Range::mextent, mrr, Range::mstart, and Range::mstride.
Plain const index operator.
Definition at line 602 of file matpackI.h.
References mcr, mdata, Range::mextent, mrr, Range::mstart, and Range::mstride.
Referenced by MatrixView::operator()().
|
friend |
Definition at line 629 of file matpackI.h.
|
friend |
Definition at line 631 of file matpackI.h.
|
friend |
Definition at line 632 of file matpackI.h.
|
friend |
Definition at line 633 of file matpackI.h.
|
friend |
Definition at line 634 of file matpackI.h.
|
friend |
Definition at line 635 of file matpackI.h.
|
friend |
Definition at line 630 of file matpackI.h.
Referenced by begin(), end(), and operator()().
|
friend |
Definition at line 628 of file matpackI.h.
|
friend |
y = M*x. Note that the order is different from MTL, output comes first! Dimensions of y, M, and x must match. No memory reallocation takes place, only the data is copied. Using this function on overlapping MatrixViews belonging to the same Matrix will lead to unpredictable results. In particular, this means that A and B must not be the same matrix! The implementation here is different from the other multiplication routines. It does not use iterators but a more drastic approach to gain maximum performance.
Definition at line 1607 of file matpackI.cc.
Definition at line 100 of file poly_roots.cc.
|
friend |
Const version of transpose.
Definition at line 1689 of file matpackI.cc.
|
protected |
The column range of mdata that is actually used.
Definition at line 654 of file matpackI.h.
Referenced by MatrixView::begin(), begin(), MatrixView::end(), end(), MatrixView::get_c_array(), ncols(), ConstIterator3D::operator!=(), Iterator3D::operator!=(), MatrixView::operator()(), operator()(), MatrixView::operator=(), Matrix::operator=(), Matrix::resize(), and transpose().
|
protected |
Pointer to the plain C array that holds the data.
Definition at line 656 of file matpackI.h.
Referenced by MatrixView::begin(), begin(), MatrixView::end(), end(), MatrixView::get_c_array(), Matrix::get_raw_data(), Matrix::Matrix(), ConstIterator3D::operator!=(), Iterator3D::operator!=(), MatrixView::operator()(), operator()(), Iterator3D::operator++(), ConstIterator3D::operator++(), poly_root_solve(), Matrix::resize(), transpose(), and Matrix::~Matrix().
|
protected |
The row range of mdata that is actually used.
Definition at line 652 of file matpackI.h.
Referenced by MatrixView::begin(), begin(), MatrixView::end(), end(), MatrixView::get_c_array(), nrows(), ConstIterator3D::operator!=(), Iterator3D::operator!=(), MatrixView::operator()(), operator()(), MatrixView::operator=(), Matrix::operator=(), Matrix::resize(), and transpose().