ARTS
2.4.0(git:4fb77825)
|
A class implementing complex numbers for ARTS. More...
Go to the source code of this file.
void copy | ( | Complex | x, |
ComplexIterator1D | target, | ||
const ComplexIterator1D & | end | ||
) |
Copy a scalar to all elements.
Definition at line 490 of file complex.cc.
References Zeeman::end(), and ARTS::Var::x().
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 Zeeman::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 478 of file complex.cc.
References Zeeman::end(), ComplexIterator1D::mstride, ConstComplexIterator1D::mstride, ComplexIterator1D::mx, and ConstComplexIterator1D::mx.
Referenced by ComplexMatrix::ComplexMatrix(), ComplexVector::ComplexVector(), ComplexMatrix::operator=(), Array< base >::operator=(), ComplexMatrixView::operator=(), ComplexVectorView::operator=(), and InteractiveWorkspace::resize().
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 Zeeman::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 Zeeman::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.
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(), ConstComplexMatrixView::nrows(), ComplexVectorView::operator=(), and ARTS::Var::x().
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 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 MapToEigenRow(), mult(), 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 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 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().
ComplexMatrixViewMap MapToEigenRow | ( | ComplexVectorView & | A | ) |
Definition at line 1702 of file complex.cc.
References MapToEigen().
ComplexConstMatrixViewMap MapToEigenRow | ( | const ConstComplexVectorView & | A | ) |
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 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 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 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 MapToEigen(), 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 1579 of file complex.cc.
References M, MapToEigen(), MapToEigenRow(), ARTS::Var::x(), and ARTS::Var::y().
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(), get_stepwise_effective_source(), get_stepwise_transmission_matrix(), iy_transmission_mult(), iyHybrid(), iySurfaceFastem(), QuadraticModel::Jacobian(), jacobianCalcFreqShift(), jacobianCalcFreqStretch(), jacobianCalcPointingZaInterp(), jacobianCalcPointingZaRecalc(), lsf(), main(), matrix_vector_mult(), MatrixMatrixMultiply(), MatrixVectorMultiply(), MCGeneral(), mcPathTraceRadar(), MCRadar(), met_mm_polarisation_hmatrix(), random_fill_matrix_pos_def(), random_fill_matrix_pos_semi_def(), MCAntenna::return_los(), rte_step_doit_replacement(), rtmethods_jacobian_finalisation(), 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(), yActive(), yCalc(), yCalc_mblock_loop_body(), and ySimpleSpectrometer().
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 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().
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 Zeeman::end().
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().
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 create_covariance_matrix_1D(), create_sparse_covariance_matrix_1D(), diagonalize(), emission_from_propmat_field(), CovarianceMatrix::get_block(), CovarianceMatrix::has_block(), iyEmissionStandardSequential(), iyHybrid(), iyHybrid2(), iyTransmissionStandard(), binistream::readFloat(), InteractiveWorkspace::resize(), swap(), InteractiveWorkspace::swap(), transform_x(), transform_x_back(), and binostream::writeFloat().
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 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 transpose().
ConstComplexMatrixView transpose | ( | ConstComplexMatrixView | m | ) |
Const version of transpose.
Definition at line 1509 of file complex.cc.
References ConstComplexMatrixView::mcr, ConstComplexMatrixView::mdata, and ConstComplexMatrixView::mrr.
Referenced by Append(), generate_test_data(), jacobianSetAffineTransformation(), lsf(), ludcmp(), matrix_vector_mult(), MCRadar(), mult(), operator+=(), random_fill_matrix_pos_def(), random_fill_matrix_pos_semi_def(), random_fill_matrix_symmetric(), rtmethods_jacobian_finalisation(), test03(), test1(), test33(), test5(), test_dense_sparse_multiplication(), test_diagonal(), test_sparse_dense_multiplication(), transform_x(), transpose(), and WMRFSelectChannels().