ARTS 2.5.10 (git: 2f1c442c)
|
#include "lapack.h"
#include "matpackI.h"
#include "matpack_concepts.h"
#include "nonstd.h"
#include <complex>
#include <utility>
Go to the source code of this file.
Classes | |
struct | ComplexLayout |
class | ComplexIterator1D |
The iterator class for sub vectors. More... | |
class | ConstComplexIterator1D |
The constant iterator class for sub vectors. More... | |
class | ConstComplexVectorView |
A constant view of a ComplexVector. More... | |
class | ComplexVectorView |
The ComplexVectorView class. More... | |
class | ComplexIterator2D |
The row iterator class for sub matrices. More... | |
class | ConstComplexIterator2D |
The const row iterator class for sub matrices. More... | |
class | ComplexVector |
The ComplexVector class. More... | |
class | ConstComplexMatrixView |
A constant view of a ComplexMatrix. More... | |
class | ComplexMatrixView |
The ComplexMatrixView class. More... | |
class | ComplexMatrix |
The ComplexMatrix class. More... | |
Macros | |
#define | a1 c.real() |
#define | b1 c.imag() |
#define | a2 z.real() |
#define | b2 z.imag() |
#define | _complex_operations_(T) |
#define | GETFUN(r, c) *(mdata + mrr.mstart + r * mrr.mstride + mcr.mstart + c * mcr.mstride) |
Typedefs | |
using | Complex = std::complex< Numeric > |
using | ArrayOfComplexVector = Array< ComplexVector > |
using | ArrayOfComplexMatrix = Array< ComplexMatrix > |
Functions | |
Numeric & | real_val (Complex &c) noexcept |
Return a reference to the real value of c. | |
Numeric & | imag_val (Complex &c) noexcept |
Return a reference to the imaginary value of c. | |
const Numeric & | real_val (const Complex &c) noexcept |
Return a const reference to the real value of c. | |
const Numeric & | imag_val (const Complex &c) noexcept |
Return a const reference to the imaginary value of c. | |
std::complex< float > | operator+ (const double &d, const std::complex< float > &c) |
std::complex< float > | operator* (const double &d, const std::complex< float > &c) |
std::complex< float > | operator+ (const std::complex< float > &c, const double &d) |
std::complex< float > | operator* (const std::complex< float > &c, const double &d) |
constexpr Numeric | abs2 (Complex c) noexcept |
squared magnitude of c | |
constexpr Complex | conj (Complex c) noexcept |
the conjugate of c | |
constexpr Numeric | real (Complex c) noexcept |
real | |
constexpr Numeric | imag (Complex c) noexcept |
imag | |
constexpr Complex | operator+ (Complex c, Numeric n) noexcept |
constexpr Complex | operator- (Complex c, Numeric n) noexcept |
constexpr Complex | operator* (Complex c, Numeric n) noexcept |
constexpr Complex | operator/ (Complex c, Numeric n) noexcept |
constexpr Complex | operator+ (Numeric n, Complex c) noexcept |
constexpr Complex | operator- (Numeric n, Complex c) noexcept |
constexpr Complex | operator* (Numeric n, Complex c) noexcept |
constexpr Complex | operator/ (Numeric n, Complex c) noexcept |
constexpr Complex | operator+ (Complex c, Complex z) noexcept |
constexpr Complex | operator- (Complex c, Complex z) noexcept |
constexpr Complex | operator* (Complex c, Complex z) noexcept |
constexpr Complex | operator/ (Complex c, Complex z) noexcept |
constexpr Complex | operator- (Complex c) noexcept |
_complex_operations_ (int) _complex_operations_(float) _complex_operations_(Index) const expr bool isnan(Complex c) noexcept | |
ConstComplexMatrixView | transpose (ConstComplexMatrixView m) |
Const version of transpose. | |
ComplexMatrixView | transpose (ComplexMatrixView m) |
Returns the transpose. | |
void | copy (ConstComplexIterator1D origin, const ConstComplexIterator1D &end, ComplexIterator1D target) |
Copy data between begin and end to target. | |
void | copy (Complex x, ComplexIterator1D target, const ComplexIterator1D &end) |
Copy a scalar to all elements. | |
void | copy (ConstComplexIterator2D origin, const ConstComplexIterator2D &end, ComplexIterator2D target) |
Copy data between begin and end to target. | |
void | copy (Complex x, ComplexIterator2D target, const ComplexIterator2D &end) |
Copy a scalar to all elements. | |
void | mult (ComplexVectorView y, const ConstComplexMatrixView &M, const ConstComplexVectorView &x) |
Matrix-Vector Multiplication. | |
void | mult (ComplexMatrixView A, const ConstComplexMatrixView &B, const ConstComplexMatrixView &C) |
Matrix-Matrix Multiplication. | |
void | mult (ComplexMatrixView A, const ConstMatrixView &B, const ConstComplexMatrixView &C) |
void | mult (ComplexMatrixView A, const ConstComplexMatrixView &B, const ConstMatrixView &C) |
void | mult (ComplexMatrixView A, const ConstMatrixView &B, const ConstMatrixView &C) |
Complex | operator* (const ConstComplexVectorView &a, const ConstComplexVectorView &b) |
Scalar product. | |
Variables | |
const Joker | joker |
#define _complex_operations_ | ( | T | ) |
Definition at line 141 of file matpack_complex.h.
#define a1 c.real() |
Definition at line 72 of file matpack_complex.h.
#define a2 z.real() |
Definition at line 74 of file matpack_complex.h.
#define b1 c.imag() |
Definition at line 73 of file matpack_complex.h.
#define b2 z.imag() |
Definition at line 75 of file matpack_complex.h.
Definition at line 812 of file matpack_complex.h.
using ArrayOfComplexMatrix = Array<ComplexMatrix> |
Definition at line 1006 of file matpack_complex.h.
using ArrayOfComplexVector = Array<ComplexVector> |
Definition at line 1005 of file matpack_complex.h.
Definition at line 36 of file matpack_complex.h.
|
noexcept |
Definition at line 168 of file matpack_complex.h.
References c, and nonstd::isnan().
squared magnitude of c
Definition at line 78 of file matpack_complex.h.
Referenced by operator/(), and test02().
the conjugate of c
Definition at line 81 of file matpack_complex.h.
Referenced by ampmat_to_phamat(), and surface_specular_R_and_b().
void copy | ( | Complex | x, |
ComplexIterator1D | target, | ||
const ComplexIterator1D & | end | ||
) |
Copy a scalar to all elements.
Definition at line 468 of file matpack_complex.cc.
void copy | ( | Complex | x, |
ComplexIterator2D | target, | ||
const ComplexIterator2D & | end | ||
) |
Copy a scalar to all elements.
Definition at line 1329 of file matpack_complex.cc.
References ComplexVectorView::begin(), and ComplexVectorView::end().
void copy | ( | ConstComplexIterator1D | origin, |
const ConstComplexIterator1D & | end, | ||
ComplexIterator1D | target | ||
) |
Copy data between begin and end to target.
Target must be a valid area of memory. Note that the strides in the iterators can be different, so that we can for example copy data between different kinds of subvectors.
Definition at line 223 of file matpack_complex.cc.
Referenced by ComplexMatrix::ComplexMatrix(), ComplexVector::ComplexVector(), ComplexMatrix::operator=(), ComplexMatrixView::operator=(), and ComplexVectorView::operator=().
void copy | ( | ConstComplexIterator2D | origin, |
const ConstComplexIterator2D & | end, | ||
ComplexIterator2D | target | ||
) |
Copy data between begin and end to target.
Target must be a valid area of memory. Note that the strides in the iterators can be different, so that we can for example copy data between different kinds of subvectors.
Origin, end, and target are 2D iterators, marking rows in a matrix. For each row the 1D iterator is obtained and used to copy the elements.
Definition at line 1317 of file matpack_complex.cc.
References ComplexVectorView::begin(), ConstComplexVectorView::begin(), and ConstComplexVectorView::end().
imag
Definition at line 87 of file matpack_complex.h.
References b1.
Referenced by dtransmat3(), get_maximum_error(), imag_val(), surface_specular_R_and_b(), test03(), test_ls(), and transmat3().
Return a reference to the imaginary value of c.
Definition at line 43 of file matpack_complex.h.
Referenced by main(), LineShape::SpeedDependentVoigt::operator()(), and LineShape::HartmannTran::operator()().
Return a const reference to the imaginary value of c.
Definition at line 49 of file matpack_complex.h.
void mult | ( | ComplexMatrixView | A, |
const ConstComplexMatrixView & | B, | ||
const ConstComplexMatrixView & | C | ||
) |
Matrix-Matrix Multiplication.
Uses the Eigen library. Be carful to test the size of your input beforehand. Note that to keep speed, the inputs should be different variables. There is memory duplication if this is not the case. Note that it is mdata that is checked, so even if the matrices are at different parts of a tensor, there is still a slowdown
[in,out] | A | The matrix A, that will hold the result of the multiplication. |
[in] | B | The matrix B |
[in] | C | The matrix C |
Definition at line 751 of file matpack_complex.cc.
References ConstComplexVectorView::mdata.
void mult | ( | ComplexMatrixView | A, |
const ConstComplexMatrixView & | B, | ||
const ConstMatrixView & | C | ||
) |
Definition at line 757 of file matpack_complex.cc.
void mult | ( | ComplexMatrixView | A, |
const ConstMatrixView & | B, | ||
const ConstComplexMatrixView & | C | ||
) |
Definition at line 754 of file matpack_complex.cc.
void mult | ( | ComplexMatrixView | A, |
const ConstMatrixView & | B, | ||
const ConstMatrixView & | C | ||
) |
Definition at line 1647 of file matpack_complex.cc.
References ARTS_ASSERT, matpack::eigen::mat(), ConstComplexMatrixView::ncols(), ConstMatrixView::ncols(), ConstComplexMatrixView::nrows(), and ConstMatrixView::nrows().
void mult | ( | ComplexVectorView | y, |
const ConstComplexMatrixView & | M, | ||
const ConstComplexVectorView & | x | ||
) |
Matrix-Vector Multiplication.
Uses the Eigen library. Be carful to test the size of your input beforehand.
For left-hand multiplication, please use pure matrix-mult.
[out] | y | The length-m ComplexVectorView where the result is stored. |
[in] | M | Reference to the m-times-n Const{Complex,}MatrixView holding the matrix M. |
[in] | x | Reference to the length-n Const{Complex,}VectorView holding the vector x. |
Definition at line 350 of file matpack_complex.cc.
Definition at line 98 of file matpack_complex.h.
Complex operator* | ( | const ConstComplexVectorView & | a, |
const ConstComplexVectorView & | b | ||
) |
Scalar product.
The two vectors may be identical.
Definition at line 333 of file matpack_complex.cc.
|
inline |
Definition at line 55 of file matpack_complex.h.
|
inline |
Definition at line 64 of file matpack_complex.h.
Definition at line 111 of file matpack_complex.h.
Definition at line 92 of file matpack_complex.h.
|
inline |
Definition at line 51 of file matpack_complex.h.
|
inline |
Definition at line 60 of file matpack_complex.h.
Definition at line 105 of file matpack_complex.h.
Definition at line 130 of file matpack_complex.h.
Definition at line 95 of file matpack_complex.h.
Definition at line 108 of file matpack_complex.h.
Definition at line 101 of file matpack_complex.h.
real
Definition at line 84 of file matpack_complex.h.
References a1.
Referenced by ampmat_to_phamat(), calcSingleScatteringDataProperties(), lm_hitran_2017::compabs(), dtransmat3(), LineShape::ComputeData::enforce_positive_absorption(), get_maximum_error(), real_val(), refractive_index_water_and_steam_VisNIR(), surface_specular_R_and_b(), test03(), test_ls(), and transmat3().
Return a reference to the real value of c.
Definition at line 40 of file matpack_complex.h.
Referenced by dtransmat4(), Absorption::LineMixing::ecs_absorption_impl(), Absorption::LineMixing::ecs_relaxation_matrix(), main(), and LineShape::Voigt::operator()().
Return a const reference to the real value of c.
Definition at line 46 of file matpack_complex.h.
ComplexMatrixView transpose | ( | ComplexMatrixView | m | ) |
Returns the transpose.
This creates a special MatrixView for the transpose. The original is not changed!
Definition at line 894 of file matpack_complex.cc.
ConstComplexMatrixView transpose | ( | ConstComplexMatrixView | m | ) |
Const version of transpose.
Definition at line 747 of file matpack_complex.cc.
Referenced by Append(), lm_hitran_2017::calcw(), generate_test_data(), HydrotableCalc(), jacobianSetAffineTransformation(), lsf(), matrix_mult(), matrix_vector_mult(), MCRadar(), CovarianceMatrix::operator Matrix(), operator+=(), random_fill_matrix_pos_def(), random_fill_matrix_pos_semi_def(), random_fill_matrix_symmetric(), rtmethods_jacobian_finalisation(), test03(), test1(), test33(), test41(), test42(), test46(), test5(), test_col_and_row_vec(), test_dense_sparse_multiplication(), test_diagonal(), test_multiplication_and_setting(), test_sparse_dense_multiplication(), test_sparse_multiplication(), test_sparse_unary_operations(), transform_x(), transpose(), WMRFSelectChannels(), and yApplyUnit().
|
extern |
Referenced by abs_linesRemoveLinesFromSpecies(), abs_vecTransform(), abs_xsec_per_speciesAddCIA(), abs_xsec_per_speciesAddXsecFit(), AbsInputFromAtmFields(), GasAbsLookup::Adapt(), RadiationVector::add_weighted(), PropagationMatrix::AddAtPosition(), Species::all_have_ratio(), Species::IsotopologueRatios::all_isotopes_have_a_value(), antenna1d_matrix(), antenna2d_gridded_dlos(), antenna2d_interp_response(), AntennaMultiBeamsToPencilBeams(), Append(), CIARecord::AppendDataset(), atm_fields_compactAddConstant(), atm_fields_compactAddSpecies(), atm_fields_compactCreateFromField(), atm_fields_compactExpand(), atm_fields_compactFromMatrix(), AtmFieldPRegrid(), AtmFieldsAndParticleBulkPropFieldFromCompact(), AtmFieldsCalc(), AtmFieldsExtract1D(), atmgeom_checkedCalc(), Absorption::LineMixing::band_eigenvalue_adaptation(), bulk_backscatter(), bulk_backscatter_derivative(), calc_ssp_fixed_test(), calc_ssp_random_test(), calcSingleScatteringDataProperties(), XsecRecord::CalcXsec(), cia_interpolation(), clear_rt_vars_at_gp(), cloud_atm_vars_by_gp(), cloud_fieldsCalc(), cloud_ppath_update1D_planeparallel(), cloud_ppath_update3D(), cloud_RT_no_background(), cloud_RT_surface(), cloudbox_checkedCalc(), cloudbox_field_monoOptimizeReverse(), cloudbox_field_monoSetConst(), cloudbox_field_ngAcceleration(), cloudbox_fieldCrop(), cloudbox_fieldInterp2Azimuth(), cloudbox_fieldSetClearsky(), cloudbox_fieldSetConst(), cloudbox_fieldSetConstPerFreq(), cloudbox_fieldSetFromPrecalc(), cloudbox_fieldUpdateSeq1D(), cloudbox_fieldUpdateSeq3D(), cloudboxSetAutomatically(), cloudy_rt_vars_at_gp(), complex_n_interp(), complex_refr_indexConstant(), complex_refr_indexIceMatzler06(), complex_refr_indexTemperatureConstant(), complex_refr_indexWaterLiebe93(), complex_refr_indexWaterVisibleNIRHarvey98(), compute_transmission_matrix(), compute_transmission_matrix_and_derivative(), ConvertAzimuthallyRandomSingleScatteringData(), defocusing_general_sub(), DisortCalc(), DisortCalcIrradiance(), DisortCalcWithARTSSurface(), PropagationMatrix::DivideAtPosition(), diy_from_path_to_rgrids(), diy_from_pos_to_rgrids(), dlosGauss(), doit_scat_fieldCalc(), doit_scat_fieldCalcLimb(), doit_scat_fieldNormalize(), DoitCalc(), DoitGetIncoming(), DoitGetIncoming1DAtm(), DoitScatteringDataPrepare(), MCAntenna::draw_los(), Zeeman::dsum(), ecs_dataAddMeanAir(), Absorption::LineMixing::ecs_eigenvalue_adaptation_test(), Absorption::LineMixing::ecs_eigenvalue_approximation(), EnergyLevelMap::EnergyLevelMap(), LineShape::ComputeData::enforce_positive_absorption(), ext_abs_pfun_from_tro(), ext_matTransform(), Extract(), GasAbsLookup::Extract(), FastemStandAlone(), field_of_propagation(), FieldFromGriddedField(), find_cloudlimits(), Flatten(), FouComp_1ScatElem(), get_direct_radiation(), get_gas_scattering_properties(), get_gasoptprop(), get_iy_of_background(), get_parZ(), get_pfct(), get_pmom(), get_ppath_atmvars(), get_ppath_cloudvars(), get_ppath_f(), get_ppath_transmat(), get_refr_index_1d(), get_refr_index_2d(), get_refr_index_3d(), get_scattered_sunsource(), get_stepwise_scattersky_propmat(), get_stepwise_scattersky_source(), get_sun_background(), PropagationMatrix::GetTensor3(), GriddedFieldLatLonExpand(), GriddedFieldLatLonRegrid(), GriddedFieldPRegrid(), GriddedFieldZToPRegrid(), lm_hitran_2017::hitran_lm_eigenvalue_adaptation_test(), lm_hitran_2017::hitran_lm_eigenvalue_approximation(), HydrotableCalc(), interp(), interp_atmfield_by_itw(), interp_atmsurface_by_itw(), interp_cloud_coeff1D(), interp_scat_angle_temperature(), interpolate_scat_angle(), EnergyLevelMap::InterpToGridPos(), IntersectionGeometricalWithAltitude(), irradiance_fieldFromRadiance(), PropagationMatrix::IsZero(), iy_transmittance_mult(), iy_transmitterMultiplePol(), iy_transmitterSinglePol(), iyApplyUnit(), iyb_calc(), iyb_calc_body(), iyClearsky(), iyEmissionHybrid(), iyEmissionStandard(), iyIndependentBeamApproximation(), iyInterpCloudboxField(), iyLoopFrequencies(), iyMC(), iyRadarSingleScat(), iySurfaceFastem(), iySurfaceFlatReflectivityDirect(), iySurfaceFlatRefractiveIndexDirect(), iySurfaceLambertian(), iySurfaceLambertianDirect(), iySurfaceRtpropAgenda(), iySurfaceRtpropCalc(), iyTransmissionStandard(), jacobianAdjustAndTransform(), jacobianCalcPointingZaInterp(), jacobianCalcPointingZaRecalc(), jacobianFromYbatch(), PropagationMatrix::K12(), PropagationMatrix::K13(), PropagationMatrix::K14(), PropagationMatrix::K23(), PropagationMatrix::K24(), PropagationMatrix::K34(), PropagationMatrix::Kjj(), line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D(), MagFieldsCalc(), MagFieldsFromAltitudeRawCalc(), main(), Matrix1ColFromVector(), Matrix1RowFromVector(), Matrix2ColFromVectors(), Matrix2RowFromVectors(), Matrix3ColFromVectors(), Matrix3RowFromVectors(), matrix_exp(), matrix_vector_mult(), MatrixCBR(), MatrixExtractFromTensor3(), MatrixPlanck(), MatrixReshapeTensor3(), MCGeneral(), mcPathTraceGeneral(), mcPathTraceRadar(), MCRadar(), mult(), PropagationMatrix::MultiplyAtPosition(), Species::names_of_have_and_havenot_ratio(), nlte_fieldForSingleSpeciesNonOverlappingLines(), nlte_sourceFromTemperatureAndSrcCoefPerSpecies(), EnergyLevelMap::operator()(), PropagationMatrix::operator*=(), PropagationMatrix::operator+=(), StokesVector::operator+=(), PropagationMatrix::operator-=(), PropagationMatrix::operator/=(), StokesVector::operator=(), TelsemAtlas::operator[](), EnergyLevelMap::operator[](), opt_prop_1ScatElem(), opt_prop_NScatElems(), opt_prop_ScatSpecBulk(), opt_prop_sptFromData(), opt_prop_sptFromMonoData(), opt_prop_sptFromScat_data(), OptimizeDoitPressureGrid(), particle_bulkprop_fieldPerturb(), particle_bulkprop_fieldPerturbAtmGrids(), particle_bulkpropRadarOnionPeeling(), pha_mat_1ScatElem(), pha_mat_NScatElems(), pha_mat_ScatSpecBulk(), pha_mat_sptFromData(), pha_mat_sptFromDataDOITOpt(), pha_mat_sptFromMonoData(), pha_mat_sptFromScat_data(), pha_matTransform(), pnd_fieldCalcFromParticleBulkProps(), pnd_fieldCalcFrompnd_field_raw(), pndFromPsd(), ppath_calc(), ppath_copy(), ppath_start_stepping(), ppath_step_refr_1d(), ppath_step_refr_2d(), ppvar_optical_depthFromPpvar_trans_cumulat(), propmat_clearskyAddLines(), propmat_clearskyAddParticles(), psd_mgd_mass_and_something(), psdDelanoeEtAl14(), psdModifiedGamma(), psdModifiedGammaMass(), RadarOnionPeelingTableCalc(), reduced_1datm(), regrid_atmfield_by_gp(), regrid_atmfield_by_gp_oem(), regrid_atmsurf_by_gp(), regrid_atmsurf_by_gp_oem(), PropagationMatrix::RemoveAtPosition(), MCAntenna::return_los(), Absorption::LineMixing::rosenkranz_approximation(), rotmat_stokes(), rte_pos2gridpos(), rte_poslosFromECEF(), rte_poslosFromGeodetic(), rtmethods_jacobian_finalisation(), rtmethods_unit_conversion(), run_cdisort(), run_cdisort_flux(), Sample_los(), scat_data_monoCalc(), scat_data_monoExtract(), scat_data_singleTmatrix(), scat_dataCalc(), scat_dataCheck(), scat_dataReduceT(), ScatSpeciesExtendTemperature(), ScatSpeciesMerge(), Select(), sensor_aux_vectors(), sensor_checkedCalc(), sensor_responseGenericAMSU(), sensor_responseMetMM(), sensor_responseSimpleAMSU(), set_constant_statistical_equilibrium_matrix(), set_vmr_from_first_species(), StokesVector::SetAtPosition(), PropagationMatrix::SetAtPosition(), spectral_irradiance_fieldFromSpectralRadianceField(), spectral_radiance_fieldClearskyPlaneParallel(), spectral_radiance_fieldExpandCloudboxField(), specular_losCalc(), stepwise_source(), Zeeman::sum(), sunsAddSingleBlackbody(), surf_albedoCalc(), surf_albedoCalcSingleAngle(), surface_calc(), surface_complex_refr_indexFromGriddedField5(), surface_props_interp(), surface_reflectivityFromGriddedField6(), surface_rtpropFromTypesAverage(), surface_rtpropInterpFreq(), surface_scalar_reflectivityFromGriddedField4(), SurfaceBlackbody(), surfaceFastem(), surfaceFlatReflectivity(), surfaceFlatRefractiveIndex(), surfaceFlatRvRh(), surfaceFlatScalarReflectivity(), surfaceMapToLinearPolarisation(), Tensor3ExtractFromTensor4(), Tensor3FromVector(), test01(), test03(), test04(), test06(), test1(), test28(), test31(), test36(), test4(), test40(), test42(), test47(), test48(), test6(), test7(), test9(), test_dense_sparse_multiplication(), test_insert_row(), test_ls(), test_r_deriv_propagationmatrix(), test_sparse_dense_multiplication(), transform_jacobian(), update_radiation_vector(), StokesVector::VectorAtPosition(), VectorExtractFromMatrix(), vmr_fieldPerturb(), vmr_fieldPerturbAtmGrids(), WindFieldsCalc(), x2artsAtmAndSurf(), y_geo_seriesFromY_geo(), y_geo_swathFromY_geo(), yApplySensorPol(), yApplyUnit(), ybatchMetProfiles(), ybatchMetProfilesClear(), yCalc_mblock_loop_body(), yCalcAppend(), yRadar(), ySimpleSpectrometer(), z_at_lat_2d(), z_at_latlon(), za_gridOpt(), and zeeman_on_the_fly().