ARTS 2.5.10 (git: 2f1c442c)
|
A constant view of a Vector. More...
#include <matpackI.h>
Public Types | |
using | const_iterator = ConstIterator1D |
Public Member Functions | |
constexpr | ConstVectorView (const ConstVectorView &)=default |
constexpr | ConstVectorView (ConstVectorView &&)=default |
ConstVectorView & | operator= (const ConstVectorView &)=default |
ConstVectorView & | operator= (ConstVectorView &&)=default |
bool | empty () const noexcept |
Returns true if variable size is zero. | |
Index | nelem () const noexcept |
Returns the number of elements. | |
Index | size () const noexcept |
Shape< 1 > | shape () const |
Numeric | sum () const ARTS_NOEXCEPT |
The sum of all elements of a Vector. | |
Numeric | operator[] (Index n) const ARTS_NOEXCEPT |
Plain const index operator. | |
Numeric | get (Index n) const ARTS_NOEXCEPT |
Get element implementation without assertions. | |
ConstVectorView | operator[] (const Range &r) const ARTS_NOEXCEPT |
Const index operator for subrange. | |
ConstIterator1D | begin () const ARTS_NOEXCEPT |
Return const iterator to first element. | |
ConstIterator1D | end () const ARTS_NOEXCEPT |
Return const iterator behind last element. | |
operator ConstMatrixView () const | |
Conversion to const 1 column matrix. | |
virtual | ~ConstVectorView ()=default |
Destructor. | |
ConstVectorView (const Numeric &a) ARTS_NOEXCEPT | |
A special constructor, which allows to make a ConstVectorView from a scalar. | |
Index | selem () const noexcept |
Start element in memory. | |
Index | delem () const noexcept |
Steps in memory between elements. | |
Numeric * | get_c_array () const noexcept |
Conversion to plain C-array, const-version. | |
Static Public Attributes | |
static constexpr bool | matpack_type {true} |
Protected Member Functions | |
ConstVectorView ()=default | |
ConstVectorView (Numeric *data, const Range &range) ARTS_NOEXCEPT | |
Explicit constructor. | |
ConstVectorView (Numeric *data, const Range &p, const Range &n) ARTS_NOEXCEPT | |
Recursive constructor. | |
Protected Attributes | |
Range | mrange {0, 0} |
The range of mdata that is actually used. | |
Numeric * | mdata {nullptr} |
Pointer to the plain C array that holds the data. | |
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 521 of file matpackI.h.
Definition at line 531 of file matpackI.h.
|
constexprdefault |
|
constexprdefault |
|
virtualdefault |
Destructor.
ConstVectorView::ConstVectorView | ( | const Numeric & | a | ) |
A special constructor, which allows to make a ConstVectorView from a scalar.
Definition at line 85 of file matpackI.cc.
|
protecteddefault |
Explicit constructor.
This one is used by Vector to initialize its own VectorView part.
Definition at line 91 of file matpackI.cc.
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.
*data | The actual data. |
p | Previous range. |
n | New Range. |
Definition at line 98 of file matpackI.cc.
ConstIterator1D ConstVectorView::begin | ( | ) | const |
Return const iterator to first element.
Definition at line 63 of file matpackI.cc.
References mdata, mrange, Range::mstart, and Range::mstride.
Referenced by copy(), max(), mean(), min(), ComplexMatrixView::operator*=(), MatrixView::operator*=(), ComplexVectorView::operator*=(), ComplexMatrixView::operator+=(), MatrixView::operator+=(), ComplexVectorView::operator+=(), ComplexMatrixView::operator-=(), MatrixView::operator-=(), ComplexVectorView::operator-=(), ComplexMatrixView::operator/=(), MatrixView::operator/=(), ComplexVectorView::operator/=(), sum(), and transform().
|
inlinenoexcept |
Steps in memory between elements.
Definition at line 626 of file matpackI.h.
References mrange, and Range::mstride.
|
inlinenoexcept |
Returns true if variable size is zero.
Definition at line 536 of file matpackI.h.
References Range::mextent, and mrange.
Referenced by abs_lines_per_speciesPopulationNlteField(), any_negative(), cloudbox_fieldUpdate1D(), cloudbox_fieldUpdateSeq1D(), cloudbox_fieldUpdateSeq3D(), covmatDiagonal(), doit_conv_flagAbsBT(), doit_conv_flagLsq(), DoitCalc(), FieldFromGriddedFieldCheckLatLonHelper(), scat_data_checkedCalc(), ScatElementsToabs_speciesAdd(), yApplySensorPol(), yCalc(), yCalcAppend(), and yRadar().
ConstIterator1D ConstVectorView::end | ( | ) | const |
Return const iterator behind last element.
Definition at line 67 of file matpackI.cc.
References mdata, Range::mextent, mrange, Range::mstart, and Range::mstride.
Referenced by copy(), max(), mean(), min(), sum(), and transform().
Get element implementation without assertions.
Definition at line 567 of file matpackI.h.
References mdata, mrange, Range::mstart, and Range::mstride.
Referenced by interp(), ConstMatrixView::operator()(), and operator[]().
|
inlinenoexcept |
Conversion to plain C-array, const-version.
This function returns a pointer to the raw data. It fails if the VectorView is not pointing to the beginning of a Vector or the stride is not 1 because the caller expects to get a C array with continuous data.
Definition at line 633 of file matpackI.h.
References mdata.
Referenced by diagonalize(), XsecRecord::Extract(), fastem(), gsl_integration_glfixed_table_alloc(), Reduce(), regrid_sun_spectrum(), tmatrix_random_orientation(), tmatrix_tmd_test(), xml_parse_from_stream(), and xml_read_from_stream().
|
inlinenoexcept |
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 547 of file matpackI.h.
References Range::mextent, and mrange.
Referenced by abs_lines_per_speciesBaseParameterMatchingLevels(), abs_lines_per_speciesChangeBaseParameterForMatchingLevels(), abs_linesBaseParameterMatchingLevels(), abs_linesChangeBaseParameterForMatchingLevels(), abs_linesLineShapeModelParametersMatchingLines(), abs_linesZeemanCoefficients(), abs_xsec_per_speciesAddCIA(), abs_xsec_per_speciesAddXsecFit(), AbsInputFromRteScalars(), GasAbsLookup::Adapt(), 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(), Append(), CIARecord::AppendDataset(), apply_iy_unit(), apply_iy_unit2(), asymmetry_parameter(), atm_fields_compactAddSpecies(), atm_fields_compactCreateFromField(), AtmFieldPerturbAtmGrids(), AtmFieldPRegrid(), AtmFieldPRegridHelper(), AtmFieldsCalc(), AtmFieldsCalcExpand1D(), AtmFieldsExpand1D(), AtmFieldsExtract1D(), atmgeom_checkedCalc(), AtmWithNLTERawRead(), Raw::Average::avg(), bad_propmat(), bin_quadweights(), Absorption::Lines::BroadeningSpeciesMass(), calc_ssp_fixed_test(), calc_ssp_random_test(), calcBaselineFit(), calcSingleScatteringDataProperties(), calculate_int_weights_arbitrary_grid(), calculate_weights_linear(), XsecRecord::CalcXsec(), check_disort_input(), check_retrieval_grids(), GriddedField1::checksize(), 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_size(), chk_vector_length(), cia_interpolation(), cloud_atm_vars_by_gp(), cloud_ppath_update3D(), cloud_RT_surface(), cloudbox_checkedCalc(), cloudbox_field_monoOptimizeReverse(), cloudbox_field_monoSetConst(), cloudbox_fieldInterp2Azimuth(), cloudbox_fieldSetFromPrecalc(), cloudbox_fieldUpdate1D(), cloudbox_fieldUpdateSeq1D(), cloudbox_fieldUpdateSeq1DPP(), cloudbox_fieldUpdateSeq3D(), cloudboxSetAutomatically(), cloudboxSetFullAtm(), cloudboxSetManually(), cloudboxSetManuallyAltitude(), lm_hitran_2017::compabs(), complex_n_ice_matzler06(), complex_n_interp(), complex_n_water_liebe93(), complex_refr_indexIceMatzler06(), complex_refr_indexTemperatureConstant(), complex_refr_indexWaterLiebe93(), complex_refr_indexWaterVisibleNIRHarvey98(), lm_hitran_2017::compute(), ConvertAzimuthallyRandomSingleScatteringData(), Raw::Average::cov(), covmat1D(), covmat1DMarkov(), covmat_sxExtractSqrtDiagonal(), covmatDiagonal(), create_covariance_matrix_1D(), create_sparse_covariance_matrix_1D(), createBji(), cumsum(), dampened_statistical_equilibrium_equation(), delanoe_shape_with_derivative(), derive_scat_species_a_and_b(), describe(), DiagonalMatrix(), DisortCalc(), DisortCalcIrradiance(), DisortCalcWithARTSSurface(), diy_from_pos_to_rgrids(), dlosDiffOfLos(), dlosGauss(), 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_df(), dplanck_dt(), Absorption::LineMixing::ecs_absorption_impl(), ecs_dataAddMeanAir(), Absorption::LineMixing::ecs_eigenvalue_adaptation_test(), Absorption::LineMixing::ecs_eigenvalue_approximation(), Absorption::LineMixing::ecs_relaxation_matrix(), emission_from_propmat_field(), LineShape::ComputeData::enforce_positive_absorption(), lm_hitran_2017::eqvlines(), ext_abs_pfun_from_tro(), ext_matFromabs_vec(), GasAbsLookup::Extract(), XsecRecord::Extract(), f_gridFromAbsorptionLines(), FastemStandAlone(), field_of_propagation(), FieldFromGriddedField(), find_effective_channel_boundaries(), find_new_grid_in_old_grid(), flat(), FouComp_1ScatElem(), FrequencyFromCGSAngularWavenumber(), FrequencyFromCGSKayserWavenumber(), FrequencyFromWavelength(), gas_scattering_coefAirSimple(), gas_scattering_coefXsecConst(), gas_scattering_matIsotropic(), gas_scattering_matRayleigh(), get_direct_radiation(), get_disortsurf_props(), get_gas_scattering_properties(), 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_scattered_sunsource(), get_stepwise_blackbody_radiation(), get_stepwise_scattersky_source(), get_sun_background(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegridHelper(), GriddedFieldPRegrid(), GriddedFieldPRegridHelper(), GriddedFieldZToPRegrid(), GriddedFieldZToPRegridHelper(), gridpos(), gridpos_1to1(), lm_hitran_2017::hitran_lm_eigenvalue_adaptation_test(), lm_hitran_2017::hitran_lm_eigenvalue_approximation(), HydrotableCalc(), IndexNumberOfAtmosphericPoints(), init_ifield(), init_x(), init_xy(), insert_elements(), integrate_convolved(), integrate_zenith(), integration_bin_by_vecmult(), integration_func_by_vecmult(), interp(), interp_atmfield_by_itw(), interp_atmsurface_by_itw(), interp_cloud_coeff1D(), interp_cloudfield_gp2itw(), interp_poly(), interp_scat_angle_temperature(), irradiance_fieldFromRadiance(), is_decreasing(), is_increasing(), Agenda::is_input(), is_lon_cyclic(), is_size(), is_sorted(), itw2p(), iy_transmitterMultiplePol(), iy_transmitterSinglePol(), iyb_calc(), iyClearsky(), iyEmissionHybrid(), iyEmissionStandard(), iyIndependentBeamApproximation(), iyInterpCloudboxField(), iyLoopFrequencies(), iyMC(), iyRadarSingleScat(), iySurfaceFastem(), iySurfaceFlatReflectivity(), iySurfaceFlatReflectivityDirect(), iySurfaceFlatRefractiveIndex(), iySurfaceFlatRefractiveIndexDirect(), iySurfaceInit(), iySurfaceLambertian(), iySurfaceLambertianDirect(), iySurfaceRtpropAgenda(), iySurfaceRtpropCalc(), iyTransmissionStandard(), jacobianAddFreqShift(), jacobianAddFreqStretch(), jacobianAddSinefit(), jacobianCalcFreqShift(), jacobianCalcFreqStretch(), jacobianCalcPointingZaInterp(), jacobianCalcPolyfit(), jacobianCalcSinefit(), jacobianFromTwoY(), jacobianFromYbatch(), jacobianSetAffineTransformation(), LagrangeInterpol4(), last(), line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D(), linreg(), lon_shiftgrid(), MagFieldsCalc(), MagFieldsCalcExpand1D(), MagFieldsCalcIGRF(), Raw::Mask::mask(), Matrix2ColFromVectors(), Matrix2RowFromVectors(), Matrix3ColFromVectors(), Matrix3RowFromVectors(), MatrixCBR(), MatrixGaussian(), MatrixPlanck(), MatrixUnitIntensity(), MCGeneral(), mcPathTraceGeneral(), mcPathTraceRadar(), MCRadar(), mgd(), mgd_with_derivatives(), mixer_matrix(), mult(), Raw::Average::nanavg(), Raw::Average::nanvar(), nlte_fieldForSingleSpeciesNonOverlappingLines(), NumericFromVector(), EnergyLevelMap::OK(), ComplexVectorView::operator*=(), ComplexVectorView::operator+=(), ComplexVectorView::operator-=(), ComplexVectorView::operator/=(), Vector::operator=(), opt_prop_1ScatElem(), opt_prop_NScatElems(), opt_prop_sptFromData(), opt_prop_sptFromMonoData(), OptimizeDoitPressureGrid(), p2gridpos(), 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_clearskyAddCIA(), propmat_clearskyAddFaraday(), propmat_clearskyAddHitranLineMixingLines(), propmat_clearskyAddLines(), propmat_clearskyAddOnTheFlyLineMixing(), propmat_clearskyAddOnTheFlyLineMixingWithZeeman(), propmat_clearskyAddParticles(), propmat_clearskyAddPredefined(), propmat_clearskyAddXsecFit(), propmat_clearskyAddZeeman(), propmat_clearskyInit(), propmat_clearskyZero(), psd_cloudice_MH97(), psd_MY05(), psd_rain_W16(), psd_SB06(), psd_snow_F07(), psdDelanoeEtAl14(), psdMilbrandtYau05(), psdSeifertBeheng06(), RadarOnionPeelingTableCalc(), RadiationFieldSpectralIntegrate(), raytrace_1d_linear_basic(), raytrace_2d_linear_basic(), raytrace_3d_linear_basic(), Reduce(), reduced_1datm(), refell2r(), refellipsoidForAzimuth(), refellipsoidOrbitPlane(), refr_index_airMicrowavesEarth(), refr_index_airMicrowavesGeneral(), regrid_sun_spectrum(), reshape(), retrievalAddSinefit(), Absorption::LineMixing::rosenkranz_approximation(), Absorption::LineMixing::RosenkranzDV(), Absorption::LineMixing::RosenkranzG(), Absorption::LineMixing::RosenkranzY(), rotationmat3D(), rte_pos2gridpos(), rte_step_doit_replacement(), rtmethods_jacobian_finalisation(), run_cdisort(), run_cdisort_flux(), 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_responseFillFgrid(), sensor_responseGenericAMSU(), sensor_responseInit(), sensor_responseMetMM(), sensor_responseMixer(), sensor_responseMixerBackendPrecalcWeights(), sensor_responseMultiMixerBackend(), sensor_responsePolarisation(), sensor_responseStokesRotation(), sensor_responseWMRF(), shape(), solve(), sorted_index_of_ppath_field(), sparse_f_gridFromFrequencyGrid(), spectral_radiance_fieldClearskyPlaneParallel(), spectral_radiance_fieldCopyCloudboxField(), spectral_radiance_fieldExpandCloudboxField(), spectrometer_matrix(), ssd_tinterp_parameters(), statistical_equilibrium_equation(), StokesVector::StokesVector(), summation_by_vecmult(), sunsAddSingleBlackbody(), surf_albedoCalc(), surface_get_incoming_direct(), surface_props_check(), surface_reflectivityFromGriddedField6(), surface_rtpropFromTypesAverage(), surface_rtpropInterpFreq(), surface_scalar_reflectivityFromGriddedField4(), surface_specular_R_and_b(), SurfaceBlackbody(), surfaceBlackbody(), surfaceFastem(), surfaceFlatReflectivity(), surfaceFlatRefractiveIndex(), surfaceFlatRvRh(), SurfaceFlatScalarReflectivity(), surfaceFlatScalarReflectivity(), surfaceLambertianSimple(), surfaceTelsem(), surfaceTessem(), telsemStandalone(), tessem_prop_nn(), test01(), test04(), test05(), test06(), test09(), test1(), test28(), test47(), test7(), test8(), test_and_merge_two_channels(), test_diagonal(), test_integrate_convolved(), test_integrate_zenith(), test_sparse(), test_telsem_interpolate(), test_x_fixedstep(), time_vector(), transform(), trapz(), Trapz(), unitl(), Raw::Average::var(), Vector::Vector(), VectorAdd(), VectorClip(), VectorCrop(), VectorDivide(), VectorFlip(), VectorGaussian(), VectorInsertGridPoints(), VectorLinSpace(), VectorLogSpace(), VectorMatrixMultiply(), VectorMultiply(), VectorNLinSpace(), VectorSparseMultiply(), VectorSubtract(), VectorZtanToZa1D(), WindFieldsCalc(), WindFieldsCalcExpand1D(), WMRFSelectChannels(), WriteMolTau(), x2artsAtmAndSurf(), x2artsSensor(), xml_parse_from_stream(), xml_read_from_stream(), xml_write_to_stream(), y_geo_seriesFromY_geo(), y_geo_swathFromY_geo(), y_seriesFromY(), y_swathFromY(), yApplySensorPol(), yApplyUnit(), ybatchCalc(), ybatchColdAtmHotAtmCycle(), ybatchDoublingMeanFocus(), ybatchMetProfiles(), ybatchMetProfilesClear(), ybatchTroposphericCorrectionNaiveMedianForward(), yCalc(), yCalc_mblock_loop_body(), yCalcAppend(), yColdAtmHot(), yDoublingMeanFocus(), yMaskOutsideMedianRange(), yRadar(), ySimpleSpectrometer(), z_at_lat_2d(), z_at_latlon(), z_surfaceConstantAltitude(), za_gridOpt(), ze_cfac(), zeeman_on_the_fly(), and ZFromPSimple().
ConstVectorView::operator ConstMatrixView | ( | ) | const |
Conversion to const 1 column matrix.
Definition at line 73 of file matpackI.cc.
|
default |
|
default |
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 58 of file matpackI.cc.
Plain const index operator.
Definition at line 560 of file matpackI.h.
References ARTS_ASSERT, get(), Range::mextent, and mrange.
|
inlinenoexcept |
Start element in memory.
Definition at line 623 of file matpackI.h.
References mrange, and Range::mstart.
|
inline |
Returns the shape as an array (to allow templates to just look for shape on different matpack objects)
Definition at line 553 of file matpackI.h.
References nelem().
Referenced by Matrix::operator=().
|
inlinenoexcept |
See nelem()
Definition at line 550 of file matpackI.h.
References Range::mextent, and mrange.
Referenced by Absorption::LineMixing::ecs_eigenvalue_adaptation_test(), Absorption::LineMixing::eigenvalue_adaptation_of_relmat(), ConstMatrixView::empty(), XsecRecord::Extract(), Raw::Reduce::focus(), Raw::Reduce::focus_doublescaling(), lm_hitran_2017::hitran_lm_eigenvalue_adaptation_test(), Interpolation::interp(), is_regularly_increasing_within_epsilon(), Interpolation::LagrangeVector(), Raw::Reduce::nanfocus(), Raw::Mask::out_of_bounds(), predefined_model_dataAddWaterMTCKD400(), Matrix::reduce_rank(), Tensor3::reduce_rank(), Tensor4::reduce_rank(), Tensor5::reduce_rank(), Tensor6::reduce_rank(), Tensor7::reduce_rank(), regrid_sun_spectrum(), test_multiplication_and_setting(), and Matrix::transform_elementwise().
Numeric ConstVectorView::sum | ( | ) | const |
The sum of all elements of a Vector.
Definition at line 48 of file matpackI.cc.
References begin(), and end().
Referenced by antenna1d_matrix(), antenna2d_gridded_dlos(), antenna2d_interp_response(), interp(), LineShape::mass(), mixer_matrix(), nlte_fieldForSingleSpeciesNonOverlappingLines(), spectrometer_matrix(), surface_rtpropFromTypesAverage(), and LineShape::vmrs().
|
friend |
Definition at line 602 of file matpackI.h.
|
friend |
Definition at line 595 of file matpackI.h.
|
friend |
Definition at line 596 of file matpackI.h.
|
friend |
Definition at line 597 of file matpackI.h.
|
friend |
Definition at line 598 of file matpackI.h.
|
friend |
Definition at line 599 of file matpackI.h.
|
friend |
Definition at line 600 of file matpackI.h.
|
friend |
Definition at line 601 of file matpackI.h.
|
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.
[out] | P | The right eigenvectors. |
[out] | WR | The real eigenvalues. |
[out] | WI | The imaginary eigenvalues. |
[in] | A | The matrix to diagonalize. |
Definition at line 240 of file lin_alg.cc.
|
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.
x | Output: Solution vector of the equation system. |
LU | Input: LU decomposition of the matrix (output of function ludcp). |
b | Input: Right-hand-side vector of equation system. |
indx | Input: Pivoting information (output of function ludcp). |
Definition at line 91 of file lin_alg.cc.
|
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.
[out] | y | The length-m VectorView where the result is stored. |
[in] | M | Reference to the m-times-n ConstMatrixView holding the matrix M. |
[in] | x | Reference to the length-n ConstVectorView holding the vector x. |
Definition at line 1080 of file matpackI.cc.
|
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.
y | Output: The multiplication result. |
M | Matrix for multiplication (sparse). |
x | Vector for multiplication. |
Definition at line 417 of file matpackII.cc.
|
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 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 1138 of file matpackI.cc.
|
friend |
|
friend |
Definition at line 108 of file matpackI.cc.
Definition at line 90 of file poly_roots.cc.
|
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.
y | Output: The multiplication result. |
M | Matrix for multiplication (sparse). |
x | Vector for multiplication. |
Definition at line 452 of file matpackII.cc.
|
friend |
Definition at line 594 of file matpackI.h.
|
staticconstexpr |
Definition at line 523 of file matpackI.h.
Referenced by test_concepts().
|
protected |
Pointer to the plain C array that holds the data.
Definition at line 660 of file matpackI.h.
Referenced by VectorView::begin(), begin(), VectorView::end(), end(), get(), ConstMatrixView::get(), get_c_array(), ConstMatrixView::get_c_array(), Matrix::get_raw_data(), Vector::operator=(), Matrix::reduce_rank(), Vector::resize(), Matrix::transform_elementwise(), Vector::Vector(), and Vector::~Vector().
|
protected |
The range of mdata that is actually used.
Definition at line 658 of file matpackI.h.
Referenced by VectorView::begin(), begin(), delem(), empty(), VectorView::end(), end(), get(), nelem(), VectorView::operator=(), VectorView::operator[](), operator[](), Vector::resize(), selem(), and size().