ARTS  2.3.1285(git:92a29ea9-dirty)
ConstVectorView Class Reference

A constant view of a Vector. More...

#include <matpackI.h>

Inheritance diagram for ConstVectorView:
VectorView Vector MakeVector

Public Types

typedef ConstIterator1D const_iterator
 

Public Member Functions

constexpr ConstVectorView (const ConstVectorView &)=default
 
constexpr ConstVectorView (ConstVectorView &&)=default
 
ConstVectorViewoperator= (const ConstVectorView &)=default
 
ConstVectorViewoperator= (ConstVectorView &&)=default
 
bool empty () const
 Returns true if variable size is zero. More...
 
Index nelem () const
 Returns the number of elements. More...
 
Numeric sum () const
 The sum of all elements of a Vector. More...
 
Numeric operator[] (Index n) const
 Plain const index operator. More...
 
Numeric get (Index n) const
 Get element implementation without assertions. More...
 
ConstVectorView operator[] (const Range &r) const
 Const index operator for subrange. More...
 
ConstIterator1D begin () const
 Return const iterator to first element. More...
 
ConstIterator1D end () const
 Return const iterator behind last element. More...
 
 operator ConstMatrixView () const
 Conversion to const 1 column matrix. More...
 
virtual ~ConstVectorView ()=default
 Destructor. More...
 
 ConstVectorView (const Numeric &a)
 A special constructor, which allows to make a ConstVectorView from a scalar. More...
 

Protected Member Functions

 ConstVectorView ()=default
 
 ConstVectorView (Numeric *data, const Range &range)
 Explicit constructor. More...
 
 ConstVectorView (Numeric *data, const Range &p, const Range &n)
 Recursive constructor. More...
 

Protected Attributes

Range mrange {0, 0}
 The range of mdata that is actually used. More...
 
Numericmdata {nullptr}
 Pointer to the plain C array that holds the data. More...
 

Friends

class VectorView
 
class ConstIterator2D
 
class ConstMatrixView
 
class ConstTensor3View
 
class ConstTensor4View
 
class ConstTensor5View
 
class ConstTensor6View
 
class ConstTensor7View
 
class ConstComplexVectorView
 
Numeric operator* (const ConstVectorView &a, const ConstVectorView &b)
 Scalar product. More...
 
int poly_root_solve (Matrix &roots, Vector &coeffs)
 
void mult (VectorView, const ConstMatrixView &, const ConstVectorView &)
 Matrix-Vector Multiplication. More...
 
void mult (VectorView, const Sparse &, ConstVectorView)
 Sparse matrix - Vector multiplication. More...
 
void transpose_mult (VectorView, const Sparse &, ConstVectorView)
 Sparse matrix - Vector multiplication. More...
 
void mult_general (VectorView, const ConstMatrixView &, const ConstVectorView &)
 Matrix Vector multiplication. More...
 
void lubacksub (VectorView, ConstMatrixView, ConstVectorView, const ArrayOfIndex &)
 LU backsubstitution. More...
 
void diagonalize (MatrixView, VectorView, VectorView, ConstMatrixView)
 Matrix Diagonalization. More...
 
ConstMatrixViewMap MapToEigen (const ConstVectorView &)
 
ConstMatrixViewMap MapToEigenCol (const ConstVectorView &)
 
MatrixViewMap MapToEigen (VectorView &)
 
MatrixViewMap MapToEigenCol (VectorView &)
 

Detailed Description

A constant view of a Vector.

Together with the derived class VectorView this contains the main implementation of a Vector. The class Vector is just a special case of a VectorView which also allocates storage.

Definition at line 476 of file matpackI.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 484 of file matpackI.h.

Constructor & Destructor Documentation

◆ ConstVectorView() [1/6]

constexpr ConstVectorView::ConstVectorView ( const ConstVectorView )
default

◆ ConstVectorView() [2/6]

constexpr ConstVectorView::ConstVectorView ( ConstVectorView &&  )
default

◆ ~ConstVectorView()

virtual ConstVectorView::~ConstVectorView ( )
virtualdefault

Destructor.

◆ ConstVectorView() [3/6]

ConstVectorView::ConstVectorView ( const Numeric a)

A special constructor, which allows to make a ConstVectorView from a scalar.

Definition at line 89 of file matpackI.cc.

◆ ConstVectorView() [4/6]

ConstVectorView::ConstVectorView ( )
protecteddefault

◆ ConstVectorView() [5/6]

ConstVectorView::ConstVectorView ( Numeric data,
const Range range 
)
protected

Explicit constructor.

This one is used by Vector to initialize its own VectorView part.

Definition at line 94 of file matpackI.cc.

◆ ConstVectorView() [6/6]

ConstVectorView::ConstVectorView ( Numeric data,
const Range p,
const Range n 
)
protected

Recursive constructor.

This is used to construct sub ranges from sub ranges. That means that the new range has to be interpreted relative to the original range. The new range 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.

Parameters
*dataThe actual data.
pPrevious range.
nNew Range.

Definition at line 99 of file matpackI.cc.

Member Function Documentation

◆ begin()

◆ empty()

◆ end()

ConstIterator1D ConstVectorView::end ( ) const

Return const iterator behind last element.

Definition at line 71 of file matpackI.cc.

References mdata, Range::mextent, mrange, Range::mstart, and Range::mstride.

Referenced by max(), mean(), min(), operator*(), operator<<(), VectorView::operator=(), transform(), and Vector::Vector().

◆ get()

Numeric ConstVectorView::get ( Index  n) const
inline

Get element implementation without assertions.

Definition at line 514 of file matpackI.h.

References Zeeman::end(), n, operator*(), and r.

◆ nelem()

Index ConstVectorView::nelem ( ) const

Returns the number of elements.

The names `size' and `length' are already used by STL functions returning size_t. To avoid confusion we choose the name `nelem'. This is also more consistent with `nrow' and `ncol' for matrices.

The value range of long, which is used to store the index is on a PC from -2147483648 to 2147483647. This means that a 15GB large array of float can be addressed with this index. So the extra bit that size_t has compared to long is not needed.

Definition at line 51 of file matpackI.cc.

References Range::mextent, and mrange.

Referenced by _cr_internal_(), abs_lines_per_speciesChangeBaseParameterForMatchingLevels(), abs_lines_per_speciesSetBaseParameterForMatchingLevels(), abs_linesChangeBaseParameterForMatchingLevels(), abs_linesSetBaseParameterForMatchingLevels(), abs_lookupCalc(), abs_lookupSetup(), abs_lookupTestAccMC(), abs_lookupTestAccuracy(), abs_xsec_per_speciesAddCIA(), abs_xsec_per_speciesAddConts(), abs_xsec_per_speciesAddHitranXsec(), abs_xsec_per_speciesAddPredefinedO2MPM2020(), abs_xsec_per_speciesInit(), AbsInputFromRteScalars(), GasAbsLookup::Adapt(), add_noise(), AddZaAa(), AngIntegrate_trapezoid(), AngIntegrate_trapezoid_fixedstep(), AngIntegrate_trapezoid_fixedstep_opt(), AngIntegrate_trapezoid_fixedstep_opt2(), AngIntegrate_trapezoid_opt(), AngIntegrate_trapezoid_opti(), AngIntegrate_trapezoid_original(), AngularGridsSetFluxCalc(), antenna1d_matrix(), antenna2d_gridded_dlos(), antenna2d_interp_response(), antenna_responseGaussian(), antenna_responseVaryingGaussian(), AntennaConstantGaussian1D(), Append(), CIARecord::AppendDataset(), apply_iy_unit(), apply_iy_unit2(), LineFunctions::apply_rosenkranz_quadratic(), LineFunctions::apply_VVH(), LineFunctions::apply_VVW(), atm_fields_compactAddSpecies(), atm_fields_compactCreateFromField(), AtmFieldPerturbAtmGrids(), AtmFieldPRegrid(), AtmFieldPRegridHelper(), AtmFieldsCalc(), AtmFieldsCalcExpand1D(), AtmFieldsExpand1D(), AtmFieldsExtract1D(), atmgeom_checkedCalc(), AtmWithNLTERawRead(), backend_channel_responseGaussian(), bad_propmat(), BF86_CIA_N2(), bin_quadweights(), calc_lookup_error(), calc_ssp_fixed_test(), calc_ssp_random_test(), calcBaselineFit(), calcSingleScatteringDataProperties(), calculate_weights_linear(), check_disort_input(), check_retrieval_grids(), chk_atm_field(), chk_atm_grids(), chk_atm_surface(), chk_if_equal(), chk_interpolation_grids(), chk_interpolation_grids_loose_check_data(), chk_interpolation_grids_loose_no_data_check(), chk_interpolation_pgrids(), chk_interpolation_pgrids_loose_no_data_check(), chk_latlon_true(), chk_pnd_data(), chk_rte_los(), chk_rte_pos(), chk_scat_data(), chk_scat_species_field(), chk_vector_length(), choose_abs_nls_pert(), choose_abs_t_pert(), cia_interpolation(), 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_250_CIAfun_n2(), CKD_mt_250_CIArot_n2(), CKD_mt_250_co2(), CKD_mt_250_foreign_h2o(), CKD_mt_250_o2_vis(), CKD_mt_250_self_h2o(), CKD_mt_320_foreign_h2o(), CKD_mt_320_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_atm_vars_by_gp(), cloud_ppath_update3D(), cloud_RT_surface(), cloudbox_checkedCalc(), cloudbox_field_monoOptimizeReverse(), cloudbox_fieldSetFromPrecalc(), cloudbox_fieldUpdate1D(), cloudbox_fieldUpdateSeq1D(), cloudbox_fieldUpdateSeq1DPP(), cloudbox_fieldUpdateSeq3D(), cloudboxSetAutomatically(), cloudboxSetFullAtm(), cloudboxSetManually(), cloudboxSetManuallyAltitude(), PartitionFunctionData::CoeffData2Vector(), Compare(), complex_n_ice_matzler06(), complex_n_interp(), complex_n_water_liebe93(), complex_refr_indexIceMatzler06(), complex_refr_indexWaterLiebe93(), ConvertAzimuthallyRandomSingleScatteringData(), convolve(), covmat1D(), covmat1DMarkov(), covmat_sxExtractSqrtDiagonal(), covmatDiagonal(), CP98H2OAbsModel(), create_sparse_covariance_matrix_1D(), createBji(), dampened_statistical_equilibrium_equation(), delanoe_shape_with_derivative(), derive_scat_species_a_and_b(), describe(), Sparse::diagonal(), diagonalize(), DiagonalMatrix(), DiffZaAa(), DisortCalc(), DisortCalcWithARTSSurface(), diy_from_pos_to_rgrids(), do_gridcell_2d(), doit_conv_flagAbs(), doit_conv_flagAbsBT(), doit_conv_flagLsq(), doit_scat_fieldCalc(), doit_scat_fieldCalcLimb(), doit_scat_fieldNormalize(), doit_za_grid_optCalc(), DoitCalc(), DoitGetIncoming(), DoitGetIncoming1DAtm(), DoitInit(), DoitScatteringDataPrepare(), dplanck_dt(), ELL07WaterDropletAbs(), emission_from_propmat_field(), empty(), ext_matFromabs_vec(), GasAbsLookup::Extract(), Extract(), XsecRecord::Extract(), f_gridFromabs_linesSet(), f_gridFromGasAbsLookup(), f_gridFromSensorAMSU(), f_gridFromSensorAMSUgeneric(), f_gridFromSensorHIRS(), f_gridMetMM(), faddeeva_algorithm_916(), FastemStandAlone(), field_of_propagation(), FieldFromGriddedField(), fillSpeciesAuxDataWithPartitionFunctionsFromSpeciesData(), find_effective_channel_boundaries(), find_new_grid_in_old_grid(), flat(), FouComp_1ScatElem(), FrequencyFromCGSAngularWavenumber(), FrequencyFromCGSKayserWavenumber(), FrequencyFromWavelength(), func_2straights(), gaussian_response(), get_disortsurf_props(), get_gasoptprop(), get_gp_rq_to_atmgrids(), get_iy_of_background(), get_maximum_error(), get_paroptprop(), get_parZ(), get_pmom(), get_ppath_f(), get_refr_index_2d(), get_refr_index_3d(), get_stepwise_blackbody_radiation(), get_stepwise_f_partials(), get_stepwise_scattersky_source(), get_variable_value(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegrid(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), GriddedFieldZToPRegridHelper(), gridpos(), gridpos_1to1(), gridpos_poly(), gridpos_poly_cyclic_longitudinal(), gridpos_poly_longitudinal(), hartmann_tran_lineshape(), Ho66_CO2_foreign_continuum(), Ho66_CO2_self_continuum(), hui_etal_1978_lineshape(), IndexNumberOfAtmosphericPoints(), init_ifield(), init_x(), init_xy(), insert_elements(), Sparse::insert_row(), integrate_convolved(), integrate_zenith(), interp(), interp_atmfield_by_itw(), interp_atmsurface_by_itw(), interp_cloud_coeff1D(), interp_cloudfield_gp2itw(), interp_poly(), interpTArray(), interpweights(), irradiance_fieldFromRadiance(), is_decreasing(), is_increasing(), is_lon_cyclic(), is_size(), is_sorted(), itw2p(), iwp_cloud_opt_pathCalc(), iy_transmitterMultiplePol(), iy_transmitterSinglePol(), iyActiveSingleScat(), iyActiveSingleScat2(), iyb_calc(), iyEmissionStandard(), iyEmissionStandardSequential(), iyHybrid(), iyHybrid2(), iyIndependentBeamApproximation(), iyInterpCloudboxField(), iyLoopFrequencies(), iyMC(), iySurfaceFastem(), iySurfaceRtpropAgenda(), iySurfaceRtpropCalc(), iyTransmissionStandard(), jacobianAddFreqShift(), jacobianAddFreqStretch(), jacobianAddPointingZa(), jacobianAddSinefit(), jacobianCalcFreqShift(), jacobianCalcFreqStretch(), jacobianCalcPointingZaInterp(), jacobianCalcPolyfit(), jacobianCalcSinefit(), jacobianFromTwoY(), jacobianFromYbatch(), jacobianSetAffineTransformation(), LagrangeInterpol4(), last(), line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D(), lineshape_CO2_drayson(), lineshape_CO2_lorentz(), lineshape_doppler(), lineshape_lorentz(), lineshape_mirrored_lorentz(), lineshape_norm_linear(), lineshape_norm_linear_dF(), lineshape_norm_linear_dF0(), lineshape_norm_quadratic_Rosenkranz(), lineshape_norm_quadratic_Rosenkranz_dF(), lineshape_norm_quadratic_Rosenkranz_dF0(), lineshape_norm_quadratic_Rosenkranz_dT(), lineshape_norm_VVH(), lineshape_norm_VVH_dF(), lineshape_norm_VVH_dF0(), lineshape_norm_VVH_dT(), lineshape_norm_VVW(), lineshape_norm_VVW_dF(), lineshape_norm_VVW_dF0(), lineshape_o2nonresonant(), lineshape_voigt_drayson(), lineshape_voigt_kuntz6(), linreg(), lon_shiftgrid(), MagFieldsCalc(), MagFieldsCalcExpand1D(), Absorption::PredefinedModel::makarov2020_o2_lines_mpm(), MapToEigen(), MapToEigenCol(), MaTipping_H2O_foreign_continuum(), Matrix1ColFromVector(), Matrix1RowFromVector(), Matrix2ColFromVectors(), Matrix2RowFromVectors(), Matrix3ColFromVectors(), Matrix3RowFromVectors(), MatrixCBR(), MatrixPlanck(), MatrixUnitIntensity(), MatrixVectorMultiply(), mblock_dlos_gridUniformCircular(), mblock_dlos_gridUniformRectangular(), MCGeneral(), MCIPA(), mcPathTraceIPA(), mcPathTraceRadar(), MCRadar(), mean(), linalg::median(), mgd(), mgd_with_derivatives(), mixer_matrix(), MPM02H2OAbsModel(), MPM85O2AbsModel(), MPM87H2OAbsModel(), MPM87O2AbsModel(), MPM89H2OAbsModel(), MPM89O2AbsModel(), MPM92O2AbsModel(), MPM93_H2O_continuum(), MPM93_N2_continuum(), MPM93_O2_continuum(), MPM93H2OAbsModel(), MPM93IceCrystalAbs(), MPM93O2AbsModel(), MPM93RainExt(), MPM93WaterDropletAbs(), mult(), mult_outer(), nca_def_Vector(), nca_put_var_Vector(), nca_write_to_file(), nlte_fieldForSingleSpeciesNonOverlappingLines(), nlteSetByQuantumIdentifiers(), NumericFromVector(), OEM(), OEM_checks(), oem_cost_x(), oem_cost_y(), oem_gauss_newton(), oem_gauss_newton_m_form(), oem_gauss_newton_n_form(), oem_levenberg_marquardt(), oem_linear_mform(), oem_linear_nform(), EnergyLevelMap::OK(), operator*(), ComplexVectorView::operator*=(), VectorView::operator*=(), MatrixView::operator*=(), ComplexVectorView::operator+=(), VectorView::operator+=(), MatrixView::operator+=(), ComplexVectorView::operator-=(), VectorView::operator-=(), MatrixView::operator-=(), ComplexVectorView::operator/=(), VectorView::operator/=(), MatrixView::operator/=(), operator<<(), Vector::operator=(), MatrixView::operator=(), Matrix::operator=(), opt_prop_1ScatElem(), opt_prop_NScatElems(), opt_prop_sptFromData(), opt_prop_sptFromMonoData(), p2gridpos(), p2gridpos_poly(), p_gridDensify(), p_gridFromGasAbsLookup(), p_gridRefine(), Pardo_ATM_H2O_ForeignContinuum(), Pardo_ATM_N2_dry_continuum(), partial_derivatives_lineshape_dependency(), PFromZSimple(), pha_mat_1ScatElem(), pha_mat_NScatElems(), pha_mat_sptFromData(), pha_mat_sptFromDataDOITOpt(), pha_mat_sptFromMonoData(), pha_mat_sptFromScat_data(), pha_matTransform(), planck(), plevel_slope_3d(), pnd_fieldCalcFromParticleBulkProps(), pnd_fieldZero(), pndFromPsd(), pndFromPsdBasic(), polynomial_basis_func(), pos2refell_r(), pos2true_latlon(), ppath_calc(), ppath_end_1d(), ppath_end_2d(), ppath_end_3d(), ppath_start_3d(), ppath_start_stepping(), ppath_step_geom_1d(), ppath_step_geom_2d(), ppath_step_geom_3d(), Print(), propmat_clearsky_fieldCalc(), propmat_clearskyAddFaraday(), propmat_clearskyAddHitranLineMixingLines(), propmat_clearskyAddParticles(), propmat_clearskyAddZeeman(), propmat_clearskyInit(), propmat_clearskyZero(), psd_cloudice_MH97(), psd_MY05(), psd_rain_W16(), psd_snow_F07(), psdDelanoeEtAl14(), psdMilbrandtYau05(), psdSeifertBeheng06(), PWR93O2AbsModel(), PWR98H2OAbsModel(), RadiationFieldSpectralIntegrate(), random_fill_vector(), raytrace_1d_linear_basic(), raytrace_2d_linear_basic(), raytrace_3d_linear_basic(), Reduce(), refell2r(), refellipsoidForAzimuth(), refellipsoidOrbitPlane(), refr_index_airMicrowavesEarth(), reshape(), retrievalAddSinefit(), Rosenkranz_CO2_foreign_continuum(), Rosenkranz_CO2_self_continuum(), Rosenkranz_N2_self_continuum(), Rosenkranz_O2_continuum(), rte_pos2gridpos(), rte_step_doit_replacement(), rtmethods_jacobian_finalisation(), run_cdisort(), Sample_los(), scat_data_checkedCalc(), scat_data_singleTmatrix(), scat_dataCalc(), ScatSpeciesExtendTemperature(), ScatSpeciesMerge(), Select(), select_dims_by_size(), Absorption::Lines::SelfVMR(), sensor_aux_vectors(), sensor_checkedCalc(), sensor_responseAntenna(), sensor_responseBackend(), sensor_responseFillFgrid(), sensor_responseFrequencySwitching(), sensor_responseGenericAMSU(), sensor_responseInit(), sensor_responseMetMM(), sensor_responseMixer(), sensor_responseMixerBackendPrecalcWeights(), sensor_responseMultiMixerBackend(), sensor_responsePolarisation(), sensor_responseStokesRotation(), sensor_responseWMRF(), LineFunctions::set_faddeeva_algorithm916(), LineFunctions::set_faddeeva_from_full_linemixing(), LineFunctions::set_htp(), LineFunctions::set_hui_etal_1978(), LineFunctions::set_lorentz(), LineFunctions::set_mirrored_lorentz(), LineFunctions::set_o2_non_resonant(), PressureBroadeningData::SetDataFromVectorWithKnownType(), LineRecord::SetLineMixing2AER(), PressureBroadeningData::SetPlanetaryBroadeningFromCatalog(), SingleCalculatePartitionFctFromCoeff(), SingleCalculatePartitionFctFromCoeff_dT(), solve(), sorted_index_of_ppath_field(), spectral_irradiance_fieldFromSpectralRadianceField(), spectral_radiance_fieldClearskyPlaneParallel(), spectral_radiance_fieldCopyCloudboxField(), spectral_radiance_fieldExpandCloudboxField(), spectrometer_matrix(), ssd_tinterp_parameters(), Standard_H2O_foreign_continuum(), Standard_H2O_self_continuum(), Standard_N2_self_continuum(), Standard_O2_continuum(), statistical_equilibrium_equation(), stokes2pol(), StokesVector::StokesVector(), surf_albedoCalc(), surface_props_check(), surface_props_interp(), surface_reflectivityFromGriddedField6(), surface_scalar_reflectivityFromGriddedField4(), surface_specular_R_and_b(), surfaceBlackbody(), surfaceFastem(), surfaceFlatReflectivity(), surfaceFlatRefractiveIndex(), surfaceFlatRvRh(), surfaceFlatScalarReflectivity(), surfaceLambertianSimple(), surfaceTelsem(), surfaceTessem(), telsemStandalone(), tessem_prop_nn(), test02(), test04(), test07(), test1(), test11(), test2(), test4(), test47(), test7(), test8(), test_and_merge_two_channels(), test_ecs20(), test_integrate_convolved(), test_integrate_zenith(), test_telsem_interpolate(), test_x_fixedstep(), testVector(), transform(), transpose_mult(), TRE05O2AbsModel(), unitl(), Vector::Vector(), PartitionFunctionData::Vector2CoeffData(), LineMixingData::Vector2FirstOrderData(), LineMixingData::Vector2LBLRTM_O2NonResonantData(), LineMixingData::Vector2LBLRTMData(), PartitionFunctionData::Vector2NoneData(), LineMixingData::Vector2NoneData(), LineMixingData::Vector2SecondOrderData(), vector_angle(), VectorAddScalar(), VectorCrop(), VectorFlip(), VectorInsertGridPoints(), VectorLinSpace(), VectorLogSpace(), VectorMatrixMultiply(), VectorScale(), VectorVectorMultiply(), VectorZtanToZa1D(), VectorZtanToZaRefr1D(), vmr_fieldSetAllConstant(), LineShape::Model::vmrs(), LineShape::vmrs(), w_x_plus_iy_dT(), wind_u_fieldIncludePlanetRotation(), WindFieldsCalc(), WindFieldsCalcExpand1D(), WMRFSelectChannels(), write_vector(), WriteMolTau(), x2artsAtmAndSurf(), x2artsSensor(), x2artsSpectroscopy(), xClip(), XINT_FUN(), xml_read_from_stream(), xml_write_to_stream(), xsec_continuum_tag(), xsec_species(), yActive(), yApplySensorPol(), ybatchCalc(), ybatchMetProfiles(), ybatchMetProfilesClear(), ybatchTroposphericCorrectionNaiveMedianForward(), yCalc(), yCalc_mblock_loop_body(), yCalcAppend(), yColdAtmHot(), ySimpleSpectrometer(), z_at_lat_2d(), z_at_latlon(), z_fieldFromHSE(), z_surfaceConstantAltitude(), za_gridOpt(), ze_cfac(), zeeman_on_the_fly(), and ZFromPSimple().

◆ operator ConstMatrixView()

ConstVectorView::operator ConstMatrixView ( ) const

Conversion to const 1 column matrix.

Definition at line 77 of file matpackI.cc.

References ConstMatrixView, mdata, and mrange.

◆ operator=() [1/2]

ConstVectorView& ConstVectorView::operator= ( const ConstVectorView )
default

◆ operator=() [2/2]

ConstVectorView& ConstVectorView::operator= ( ConstVectorView &&  )
default

◆ operator[]() [1/2]

Numeric ConstVectorView::operator[] ( Index  n) const
inline

Plain const index operator.

Definition at line 507 of file matpackI.h.

References n.

◆ operator[]() [2/2]

ConstVectorView ConstVectorView::operator[] ( const Range r) const

Const index operator for subrange.

We have to also account for the case, that *this is already a subrange of a Vector. This allows correct recursive behavior.

Definition at line 63 of file matpackI.cc.

References ConstVectorView(), mdata, and mrange.

◆ sum()

Numeric ConstVectorView::sum ( ) const

The sum of all elements of a Vector.

Definition at line 53 of file matpackI.cc.

References begin(), and i.

Referenced by antenna1d_matrix(), antenna2d_interp_response(), interp(), spectrometer_matrix(), test17(), LineShape::Model::vmrs(), LineShape::vmrs(), and xsec_continuum_tag().

Friends And Related Function Documentation

◆ ConstComplexVectorView

friend class ConstComplexVectorView
friend

Definition at line 548 of file matpackI.h.

◆ ConstIterator2D

friend class ConstIterator2D
friend

Definition at line 541 of file matpackI.h.

◆ ConstMatrixView

friend class ConstMatrixView
friend

Definition at line 542 of file matpackI.h.

Referenced by operator ConstMatrixView().

◆ ConstTensor3View

friend class ConstTensor3View
friend

Definition at line 543 of file matpackI.h.

◆ ConstTensor4View

friend class ConstTensor4View
friend

Definition at line 544 of file matpackI.h.

◆ ConstTensor5View

friend class ConstTensor5View
friend

Definition at line 545 of file matpackI.h.

◆ ConstTensor6View

friend class ConstTensor6View
friend

Definition at line 546 of file matpackI.h.

◆ ConstTensor7View

friend class ConstTensor7View
friend

Definition at line 547 of file matpackI.h.

◆ diagonalize

void diagonalize ( MatrixView  ,
VectorView  ,
VectorView  ,
ConstMatrixView   
)
friend

Matrix Diagonalization.

Return P and W from A in the statement diag(P^-1*A*P)-W == 0. The real function will require some manipulation if the eigenvalues are imaginary.

The real version returns WR and WI as returned by dgeev. The complex version just returns W.

The function makes many copies and is thereby not fast. There are no tests on the condition of the returned matrix, so nan and inf can occur.

Parameters
[out]PThe right eigenvectors.
[out]WRThe real eigenvalues.
[out]WIThe imaginary eigenvalues.
[in]AThe matrix to diagonalize.

Definition at line 245 of file lin_alg.cc.

◆ lubacksub

void lubacksub ( VectorView  ,
ConstMatrixView  ,
ConstVectorView  ,
const ArrayOfIndex  
)
friend

LU backsubstitution.

Solves a set of linear equations Ax=b. It is neccessairy to do a L decomposition using the function ludcp before using this function. The backsubstitution is in-place, i.e. x and b may be the same vector.

Parameters
xOutput: Solution vector of the equation system.
LUInput: LU decomposition of the matrix (output of function ludcp).
bInput: Right-hand-side vector of equation system.
indxInput: Pivoting information (output of function ludcp).

Definition at line 91 of file lin_alg.cc.

◆ MapToEigen [1/2]

ConstMatrixViewMap MapToEigen ( const ConstVectorView )
friend

Definition at line 1660 of file matpackI.cc.

◆ MapToEigen [2/2]

MatrixViewMap MapToEigen ( VectorView )
friend

Definition at line 1691 of file matpackI.cc.

◆ MapToEigenCol [1/2]

ConstMatrixViewMap MapToEigenCol ( const ConstVectorView )
friend

Definition at line 1673 of file matpackI.cc.

◆ MapToEigenCol [2/2]

MatrixViewMap MapToEigenCol ( VectorView )
friend

Definition at line 1702 of file matpackI.cc.

◆ mult [1/2]

void mult ( VectorView  ,
const ConstMatrixView ,
const ConstVectorView  
)
friend

Matrix-Vector Multiplication.

Computes the Matrix-Vector product y = M * x, for a m times n matrix M, a length-m vector y and a length-n vector x.

The product is computed using the dgemv_ routine from the BLAS library if the matrix is contiguous in memory. If this is not the case, the mult_general method is used to compute the product.

No memory is allocated for the computation and the matrix and vector views may not overlap.

Parameters
[out]yThe length-m VectorView where the result is stored.
[in]MReference to the m-times-n ConstMatrixView holding the matrix M.
[in]xReference to the length-n ConstVectorView holding the vector x.

Definition at line 1123 of file matpackI.cc.

◆ mult [2/2]

void mult ( VectorView  ,
const Sparse ,
ConstVectorView   
)
friend

Sparse matrix - Vector multiplication.

This calculates the product

y = M*x, where M is sparse.

Output comes first!

Dimensions of y, M, and x must match. No memory reallocation takes place, only the data is copied.

Parameters
yOutput: The multiplication result.
MMatrix for multiplication (sparse).
xVector for multiplication.

Definition at line 417 of file matpackII.cc.

◆ mult_general

void mult_general ( VectorView  y,
const ConstMatrixView M,
const ConstVectorView x 
)
friend

Matrix Vector multiplication.

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 Matrix and VectorViews belonging to the same Matrix will lead to unpredictable results.

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 1181 of file matpackI.cc.

◆ operator*

Numeric operator* ( const ConstVectorView a,
const ConstVectorView b 
)
friend

Scalar product.

The two vectors may be identical.

Definition at line 1092 of file matpackI.cc.

◆ poly_root_solve

int poly_root_solve ( Matrix roots,
Vector coeffs 
)
friend

Definition at line 90 of file poly_roots.cc.

◆ transpose_mult

void transpose_mult ( VectorView  ,
const Sparse ,
ConstVectorView   
)
friend

Sparse matrix - Vector multiplication.

This calculates the product

y = M*x, where M is sparse.

Output comes first!

Dimensions of y, M, and x must match. No memory reallocation takes place, only the data is copied.

Parameters
yOutput: The multiplication result.
MMatrix for multiplication (sparse).
xVector for multiplication.

Definition at line 452 of file matpackII.cc.

◆ VectorView

friend class VectorView
friend

Definition at line 540 of file matpackI.h.

Referenced by VectorView::operator[]().

Member Data Documentation

◆ mdata

◆ mrange


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