ARTS
2.3.1285(git:92a29ea9-dirty)
|
A class implementing complex numbers for ARTS. More...
Go to the source code of this file.
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 478 of file complex.cc.
References ComplexVectorView::end(), ComplexIterator1D::mstride, ConstComplexIterator1D::mstride, ComplexIterator1D::mx, and ConstComplexIterator1D::mx.
Referenced by ComplexMatrix::ComplexMatrix(), ComplexVector::ComplexVector(), Array< QuantumFieldDescription >::operator=(), ComplexVectorView::operator=(), ComplexMatrixView::operator=(), ComplexMatrix::operator=(), InteractiveWorkspace::resize(), and LineShape::LegacyLineMixingData::vector2modellm().
void copy | ( | Complex | x, |
ComplexIterator1D | target, | ||
const ComplexIterator1D & | end | ||
) |
Copy a scalar to all elements.
Definition at line 490 of file complex.cc.
References ComplexVectorView::end().
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 1316 of file complex.cc.
References ConstComplexVectorView::begin(), and ComplexMatrixView::end().
void copy | ( | Complex | x, |
ComplexIterator2D | target, | ||
const ComplexIterator2D & | end | ||
) |
Copy a scalar to all elements.
Definition at line 1328 of file complex.cc.
References ComplexVectorView::begin(), and ComplexMatrixView::end().
void copy | ( | Numeric | x, |
ComplexIterator2D | target, | ||
const ComplexIterator2D & | end | ||
) |
Copy a scalar to all elements.
Definition at line 1337 of file complex.cc.
References ComplexVectorView::begin(), and ComplexMatrixView::end().
Complex debug_matrixview_get_elem | ( | ComplexMatrixView & | mv, |
Index | r, | ||
Index | c | ||
) |
Helper function to access matrix elements.
Because of function inlining the operator() is not accessible from the debuggger. This function helps to access Matrix elements from within the debugger.
mv | MatrixView |
r | Row index |
c | Column index |
Definition at line 1731 of file complex.cc.
ComplexConstMatrixViewMap MapToEigen | ( | const ConstComplexMatrixView & | A | ) |
Definition at line 1655 of file complex.cc.
References Range::get_start(), Range::get_stride(), ConstComplexMatrixView::mcr, ConstComplexMatrixView::mdata, ConstComplexMatrixView::mrr, ConstComplexMatrixView::ncols(), and ConstComplexMatrixView::nrows().
Referenced by LineFunctions::apply_dipole(), LineFunctions::apply_linestrength(), LineFunctions::apply_linestrength_from_full_linemixing(), ComplexMatrix::get_raw_data(), Linefunctions::set_cross_section_of_band(), test03(), xsec_species(), and zeeman_on_the_fly().
ComplexConstMatrixViewMap MapToEigen | ( | const ConstComplexVectorView & | A | ) |
Definition at line 1664 of file complex.cc.
References Range::get_start(), Range::get_stride(), ConstComplexVectorView::mdata, ConstComplexVectorView::mrange, and ConstComplexVectorView::nelem().
ComplexMatrixViewMap MapToEigen | ( | ComplexMatrixView & | A | ) |
Definition at line 1685 of file complex.cc.
References Range::get_start(), Range::get_stride(), ConstComplexMatrixView::mcr, ConstComplexMatrixView::mdata, ConstComplexMatrixView::mrr, ConstComplexMatrixView::ncols(), and ConstComplexMatrixView::nrows().
ComplexMatrixViewMap MapToEigen | ( | ComplexVectorView & | A | ) |
Definition at line 1694 of file complex.cc.
References Range::get_start(), Range::get_stride(), ConstComplexVectorView::mdata, ConstComplexVectorView::mrange, and ConstComplexVectorView::nelem().
ComplexConstMatrixViewMap MapToEigenCol | ( | const ConstComplexVectorView & | A | ) |
Definition at line 1677 of file complex.cc.
References Range::get_start(), Range::get_stride(), ConstComplexVectorView::mdata, ConstComplexVectorView::mrange, and ConstComplexVectorView::nelem().
Referenced by ComplexMatrix::get_raw_data().
ComplexMatrixViewMap MapToEigenCol | ( | ComplexVectorView & | A | ) |
Definition at line 1707 of file complex.cc.
References Range::get_start(), Range::get_stride(), ConstComplexVectorView::mdata, ConstComplexVectorView::mrange, and ConstComplexVectorView::nelem().
ComplexConstMatrixViewMap MapToEigenRow | ( | const ConstComplexVectorView & | A | ) |
Definition at line 1672 of file complex.cc.
References ConstComplexMatrixView::MapToEigen.
Referenced by ComplexMatrix::get_raw_data(), and mult().
ComplexMatrixViewMap MapToEigenRow | ( | ComplexVectorView & | A | ) |
Definition at line 1702 of file complex.cc.
References ConstComplexMatrixView::MapToEigen.
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 1579 of file complex.cc.
References ConstComplexMatrixView::MapToEigen, MapToEigenRow(), ConstComplexVectorView::mdata, ConstComplexMatrixView::ncols(), ConstComplexVectorView::nelem(), and ConstComplexMatrixView::nrows().
Referenced by benchmark_mult(), benchmark_oem_linear(), cloud_RT_surface(), MCAntenna::draw_los(), LinearModel::evaluate(), QuadraticModel::evaluate(), generate_test_data(), get_diydx(), get_ppath_transmat(), ComplexMatrix::get_raw_data(), get_stepwise_effective_source(), get_stepwise_transmission_matrix(), interpTArray(), iy_transmission_mult(), iyHybrid(), iySurfaceFastem(), QuadraticModel::Jacobian(), jacobianCalcFreqShift(), jacobianCalcFreqStretch(), jacobianCalcPointingZaInterp(), jacobianCalcPointingZaRecalc(), lsf(), main(), matrix_vector_mult(), MatrixMatrixMultiply(), MatrixVectorMultiply(), MCGeneral(), MCIPA(), mcPathTraceRadar(), MCRadar(), met_mm_polarisation_hmatrix(), oem_cost_x(), oem_cost_y(), oem_gauss_newton_m_form(), oem_gauss_newton_n_form(), oem_linear_mform(), random_fill_matrix_pos_def(), random_fill_matrix_pos_semi_def(), MCAntenna::return_los(), rte_step_doit_replacement(), rtmethods_jacobian_finalisation(), scale_rows(), sensor_responseAntenna(), sensor_responseBackend(), sensor_responseFrequencySwitching(), sensor_responseMetMM(), sensor_responseMixer(), sensor_responseMixerBackendPrecalcWeights(), sensor_responsePolarisation(), sensor_responseStokesRotation(), sensor_responseWMRF(), SparseSparseMultiply(), surface_calc(), test4(), test5(), test_complex_diagonalize(), test_dense_sparse_multiplication(), test_inv(), test_lusolve4D(), test_real_diagonalize(), test_solve_linear_system(), test_sparse_arithmetic(), test_sparse_dense_multiplication(), transform_x(), transform_x_back(), VectorMatrixMultiply(), x2artsSpectroscopy(), yActive(), yCalc(), yCalc_mblock_loop_body(), and ySimpleSpectrometer().
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 1604 of file complex.cc.
References ConstComplexMatrixView::MapToEigen, ConstComplexMatrixView::mdata, ConstComplexMatrixView::ncols(), and ConstComplexMatrixView::nrows().
void mult | ( | ComplexMatrixView | A, |
const ConstComplexMatrixView & | B, | ||
const ConstMatrixView & | C | ||
) |
Definition at line 1617 of file complex.cc.
References ConstComplexMatrixView::MapToEigen, ConstComplexMatrixView::mdata, ConstComplexMatrixView::ncols(), ConstMatrixView::ncols(), ConstComplexMatrixView::nrows(), and ConstMatrixView::nrows().
void mult | ( | ComplexMatrixView | A, |
const ConstMatrixView & | B, | ||
const ConstComplexMatrixView & | C | ||
) |
Definition at line 1630 of file complex.cc.
References ConstComplexMatrixView::MapToEigen, ConstComplexMatrixView::mdata, ConstComplexMatrixView::ncols(), ConstMatrixView::ncols(), ConstComplexMatrixView::nrows(), and ConstMatrixView::nrows().
void mult | ( | ComplexMatrixView | A, |
const ConstMatrixView & | B, | ||
const ConstMatrixView & | C | ||
) |
Definition at line 1643 of file complex.cc.
References ConstComplexMatrixView::MapToEigen, ConstComplexMatrixView::ncols(), ConstMatrixView::ncols(), ConstComplexMatrixView::nrows(), and ConstMatrixView::nrows().
Complex operator* | ( | const ConstComplexVectorView & | a, |
const ConstComplexVectorView & | b | ||
) |
Scalar product.
The two vectors may be identical.
Definition at line 1554 of file complex.cc.
References ConstComplexVectorView::begin(), ConstComplexVectorView::end(), and ConstComplexVectorView::nelem().
std::ostream& operator<< | ( | std::ostream & | os, |
const ConstComplexVectorView & | v | ||
) |
Output operator.
This demonstrates how iterators can be used to traverse the vector. The iterators know which part of the vector is `active', and also the stride.
Definition at line 134 of file complex.cc.
References ConstComplexVectorView::begin(), ConstComplexVectorView::end(), and i.
Referenced by ComplexMatrix::get_raw_data().
std::ostream& operator<< | ( | std::ostream & | os, |
const ConstComplexMatrixView & | v | ||
) |
Output operator.
This demonstrates how iterators can be used to traverse the matrix. The iterators know which part of the matrix is `active', and also the strides in both directions. This function is a bit more complicated than necessary to illustrate the concept, because the formating should look nice. This means that the first row, and the first element in each row, have to be treated individually.
Definition at line 866 of file complex.cc.
References ConstComplexVectorView::begin(), ConstComplexMatrixView::begin(), ConstComplexVectorView::end(), and ConstComplexMatrixView::end().
void swap | ( | ComplexVector & | v1, |
ComplexVector & | v2 | ||
) |
Swaps two objects.
Definition at line 731 of file complex.cc.
References ConstComplexVectorView::mdata, and ConstComplexVectorView::mrange.
Referenced by InteractiveWorkspace::add_callback(), create_covariance_matrix_1D(), create_sparse_covariance_matrix_1D(), diagonalize(), emission_from_propmat_field(), CovarianceMatrix::get_block(), CovarianceMatrix::has_block(), iyEmissionStandardSequential(), iyHybrid(), iyHybrid2(), iyTransmissionStandard(), Matrix::Matrix(), binistream::readFloat(), InteractiveWorkspace::resize(), InteractiveWorkspace::swap(), swap(), Tensor3::Tensor3(), Tensor4::Tensor4(), Tensor5::Tensor5(), Tensor6::Tensor6(), Tensor7::Tensor7(), transform_x(), transform_x_back(), Vector::Vector(), and binostream::writeFloat().
void swap | ( | ComplexMatrix & | m1, |
ComplexMatrix & | m2 | ||
) |
Swaps two objects.
Definition at line 1474 of file complex.cc.
References ConstComplexMatrixView::mcr, ConstComplexMatrixView::mdata, ConstComplexMatrixView::mrr, and swap().
ConstComplexMatrixView transpose | ( | ConstComplexMatrixView | m | ) |
Const version of transpose.
Definition at line 1509 of file complex.cc.
References ConstComplexMatrixView::ConstComplexMatrixView(), ConstComplexMatrixView::mcr, ConstComplexMatrixView::mdata, and ConstComplexMatrixView::mrr.
Referenced by Append(), generate_test_data(), ComplexMatrix::get_raw_data(), jacobianSetAffineTransformation(), lsf(), ludcmp(), matrix_vector_mult(), MCRadar(), mult(), oem_gauss_newton_m_form(), oem_gauss_newton_n_form(), oem_linear_mform(), operator+=(), random_fill_matrix_pos_def(), random_fill_matrix_pos_semi_def(), random_fill_matrix_symmetric(), rtmethods_jacobian_finalisation(), scale_rows(), test03(), test1(), test33(), test5(), test_dense_sparse_multiplication(), test_diagonal(), test_sparse_dense_multiplication(), transform_x(), and WMRFSelectChannels().
ComplexMatrixView transpose | ( | ComplexMatrixView | m | ) |
Returns the transpose.
This creates a special MatrixView for the transpose. The original is not changed!
Definition at line 1515 of file complex.cc.
References ComplexMatrixView::ComplexMatrixView(), ConstComplexMatrixView::mcr, ConstComplexMatrixView::mdata, and ConstComplexMatrixView::mrr.
ComplexMatrixView transpose | ( | ComplexVector | v | ) |
Returns the transpose.
This creates a special MatrixView for the transpose. The original is not changed!
Definition at line 1521 of file complex.cc.
References ComplexMatrixView::transpose.