29 #ifndef transmissionmatrix_h 30 #define transmissionmatrix_h 32 #include <Eigen/Dense> 33 #include <Eigen/StdVector> 41 std::vector<Eigen::Matrix4d, Eigen::aligned_allocator<Eigen::Matrix4d>>
T4;
42 std::vector<Eigen::Matrix3d, Eigen::aligned_allocator<Eigen::Matrix3d>>
T3;
43 std::vector<Eigen::Matrix2d, Eigen::aligned_allocator<Eigen::Matrix2d>>
T2;
44 std::vector<Eigen::Matrix<double, 1, 1>,
45 Eigen::aligned_allocator<Eigen::Matrix<double, 1, 1>>>
57 T4(stokes_dim == 4 ? nf : 0, Eigen::Matrix4d::
Identity()),
58 T3(stokes_dim == 3 ? nf : 0, Eigen::Matrix3d::
Identity()),
59 T2(stokes_dim == 2 ? nf : 0, Eigen::Matrix2d::
Identity()),
61 assert(stokes_dim < 5 and stokes_dim > 0);
73 T1(std::move(tm.T1)) {}
95 T4 = std::move(tm.
T4);
96 T3 = std::move(tm.
T3);
97 T2 = std::move(tm.
T2);
98 T1 = std::move(tm.
T1);
111 for (
size_t i = 0;
i < T4.size();
i++)
112 for (
size_t j = 0; j < 4; j++)
113 for (
size_t k = 0; k < 4; k++) T(
i, j, k) = T4[
i](j, k);
114 for (
size_t i = 0;
i < T3.size();
i++)
115 for (
size_t j = 0; j < 3; j++)
116 for (
size_t k = 0; k < 3; k++) T(
i, j, k) = T3[
i](j, k);
117 for (
size_t i = 0;
i < T2.size();
i++)
118 for (
size_t j = 0; j < 2; j++)
119 for (
size_t k = 0; k < 2; k++) T(
i, j, k) = T2[
i](j, k);
120 for (
size_t i = 0;
i <
T1.size();
i++) T(
i, 0, 0) =
T1[
i](0, 0);
129 const Eigen::Matrix4d&
Mat4(
size_t i)
const {
return T4[
i]; }
136 const Eigen::Matrix3d&
Mat3(
size_t i)
const {
return T3[
i]; }
143 const Eigen::Matrix2d&
Mat2(
size_t i)
const {
return T2[
i]; }
150 const Eigen::Matrix<double, 1, 1>&
Mat1(
size_t i)
const {
return T1[
i]; }
157 Eigen::MatrixXd
Mat(
size_t i)
const {
158 switch (stokes_dim) {
176 Eigen::Matrix4d&
Mat4(
size_t i) {
return T4[
i]; }
183 Eigen::Matrix3d&
Mat3(
size_t i) {
return T3[
i]; }
190 Eigen::Matrix2d&
Mat2(
size_t i) {
return T2[
i]; }
197 Eigen::Matrix<double, 1, 1>&
Mat1(
size_t i) {
return T1[
i]; }
209 std::fill(T4.begin(), T4.end(), Eigen::Matrix4d::Zero());
210 std::fill(T3.begin(), T3.end(), Eigen::Matrix3d::Zero());
211 std::fill(T2.begin(), T2.end(), Eigen::Matrix2d::Zero());
212 std::fill(
T1.begin(),
T1.end(), Eigen::Matrix<double, 1, 1>::Zero());
223 for (
size_t i = 0;
i < T4.size();
i++) T4[
i].noalias() = A.
T4[
i] * B.
T4[
i];
224 for (
size_t i = 0;
i < T3.size();
i++) T3[
i].noalias() = A.
T3[
i] * B.
T3[
i];
225 for (
size_t i = 0;
i < T2.size();
i++) T2[
i].noalias() = A.
T2[
i] * B.
T2[
i];
226 for (
size_t i = 0;
i <
T1.size();
i++)
T1[
i].noalias() = A.
T1[
i] * B.
T1[
i];
238 for (
size_t i = 0;
i < T4.size();
i++) T4[
i] = A.
T4[
i] * B.
T4[
i];
239 for (
size_t i = 0;
i < T3.size();
i++) T3[
i] = A.
T3[
i] * B.
T3[
i];
240 for (
size_t i = 0;
i < T2.size();
i++) T2[
i] = A.
T2[
i] * B.
T2[
i];
252 switch (stokes_dim) {
269 switch (stokes_dim) {
271 return Index(T4.size());
273 return Index(T3.size());
275 return Index(T2.size());
287 for (
size_t i = 0;
i < T4.size();
i++)
289 for (
size_t i = 0;
i < T3.size();
i++)
291 for (
size_t i = 0;
i < T2.size();
i++)
293 for (
size_t i = 0;
i <
T1.size();
i++)
304 std::transform(T4.begin(), T4.end(), T4.begin(), [scale](
auto& T){
return T*scale;});
305 std::transform(T3.begin(), T3.end(), T3.begin(), [scale](
auto& T){
return T*scale;});
306 std::transform(T2.begin(), T2.end(), T2.begin(), [scale](
auto& T){
return T*scale;});
323 friend std::ostream&
operator<<(std::ostream& os,
344 static_assert (
N not_eq 0 and
N < 5,
"Bad size N");
349 const Numeric od = std::log(
this ->
operator()(
i, 0, 0));
355 const Numeric od = std::log(
this ->
operator()(
i, 0, 0));
361 const Numeric od = std::log(
this ->
operator()(
i, 0, 0));
367 const Numeric od = std::log(
this ->
operator()(
i, 0, 0));
398 std::vector<Eigen::Vector4d, Eigen::aligned_allocator<Eigen::Vector4d>>
R4;
399 std::vector<Eigen::Vector3d, Eigen::aligned_allocator<Eigen::Vector3d>>
R3;
400 std::vector<Eigen::Vector2d, Eigen::aligned_allocator<Eigen::Vector2d>>
R2;
401 std::vector<Eigen::Matrix<double, 1, 1>,
402 Eigen::aligned_allocator<Eigen::Matrix<double, 1, 1>>>
413 : stokes_dim(stokes),
414 R4(stokes_dim == 4 ? nf : 0, Eigen::Vector4d::Zero()),
415 R3(stokes_dim == 3 ? nf : 0, Eigen::Vector3d::Zero()),
416 R2(stokes_dim == 2 ? nf : 0, Eigen::Vector2d::Zero()),
417 R1(stokes_dim == 1 ? nf : 0, Eigen::
Matrix<double, 1, 1>::Zero()) {
418 assert(stokes_dim < 5 and stokes_dim > 0);
427 R4(std::move(rv.R4)),
428 R3(std::move(rv.R3)),
429 R2(std::move(rv.R2)),
430 R1(std::move(rv.R1)) {}
452 R4 = std::move(rv.
R4);
453 R3 = std::move(rv.
R3);
454 R2 = std::move(rv.
R2);
455 R1 = std::move(rv.
R1);
464 for (
size_t i = 0;
i < R4.size();
i++) R4[
i] = T.
Mat4(
i) * R4[
i];
465 for (
size_t i = 0;
i < R3.size();
i++) R3[
i] = T.
Mat3(
i) * R3[
i];
466 for (
size_t i = 0;
i < R2.size();
i++) R2[
i] = T.
Mat2(
i) * R2[
i];
467 for (
size_t i = 0;
i < R1.size();
i++) R1[
i] = T.
Mat1(
i) * R1[
i];
475 switch (stokes_dim) {
477 R4[
i].noalias() = Eigen::Vector4d::Zero();
480 R3[
i].noalias() = Eigen::Vector3d::Zero();
483 R2[
i].noalias() = Eigen::Vector2d::Zero();
496 const Eigen::Vector4d&
Vec4(
size_t i)
const {
return R4[
i]; }
503 const Eigen::Vector3d&
Vec3(
size_t i)
const {
return R3[
i]; }
510 const Eigen::Vector2d&
Vec2(
size_t i)
const {
return R2[
i]; }
517 const Eigen::Matrix<double, 1, 1>&
Vec1(
size_t i)
const {
return R1[
i]; }
524 Eigen::VectorXd
Vec(
size_t i)
const {
525 switch (stokes_dim) {
543 Eigen::Vector4d&
Vec4(
size_t i) {
return R4[
i]; }
550 Eigen::Vector3d&
Vec3(
size_t i) {
return R3[
i]; }
557 Eigen::Vector2d&
Vec2(
size_t i) {
return R2[
i]; }
564 Eigen::Matrix<double, 1, 1>&
Vec1(
size_t i) {
return R1[
i]; }
572 for (
size_t i = 0;
i < R4.size();
i++)
573 R4[
i].noalias() -= 0.5 * (O1.
R4[
i] + O2.
R4[
i]);
574 for (
size_t i = 0;
i < R3.size();
i++)
575 R3[
i].noalias() -= 0.5 * (O1.
R3[
i] + O2.
R3[
i]);
576 for (
size_t i = 0;
i < R2.size();
i++)
577 R2[
i].noalias() -= 0.5 * (O1.
R2[
i] + O2.
R2[
i]);
578 for (
size_t i = 0;
i < R1.size();
i++)
579 R1[
i].noalias() -= 0.5 * (O1.
R1[
i] + O2.
R1[
i]);
589 for (
size_t i = 0;
i < R4.size();
i++)
590 R4[
i].noalias() += 0.5 * (O1.
R4[
i] + O2.
R4[
i]);
591 for (
size_t i = 0;
i < R3.size();
i++)
592 R3[
i].noalias() += 0.5 * (O1.
R3[
i] + O2.
R3[
i]);
593 for (
size_t i = 0;
i < R2.size();
i++)
594 R2[
i].noalias() += 0.5 * (O1.
R2[
i] + O2.
R2[
i]);
595 for (
size_t i = 0;
i < R1.size();
i++)
596 R1[
i].noalias() += 0.5 * (O1.
R1[
i] + O2.
R1[
i]);
607 for (
size_t i = 0;
i < R4.size();
i++) {
609 R4[
i].noalias() +=
w.far * far.
R4[
i] +
w.close * close.
R4[
i];
611 for (
size_t i = 0;
i < R3.size();
i++) {
613 R3[
i].noalias() +=
w.far * far.
R3[
i] +
w.close * close.
R3[
i];
615 for (
size_t i = 0;
i < R2.size();
i++) {
617 R2[
i].noalias() +=
w.far * far.
R2[
i] +
w.close * close.
R2[
i];
619 for (
size_t i = 0;
i < R1.size();
i++) {
621 R1[
i].noalias() +=
w.far * far.
R1[
i] +
w.close * close.
R1[
i];
638 for (
size_t i = 0;
i < R4.size();
i++)
641 for (
size_t i = 0;
i < R3.size();
i++)
644 for (
size_t i = 0;
i < R2.size();
i++)
647 for (
size_t i = 0;
i < R1.size();
i++)
662 for (
size_t i = 0;
i < R4.size();
i++)
664 for (
size_t i = 0;
i < R3.size();
i++)
666 for (
size_t i = 0;
i < R2.size();
i++)
668 for (
size_t i = 0;
i < R1.size();
i++)
684 for (
size_t i = 0;
i < R4.size();
i++)
686 for (
size_t i = 0;
i < R3.size();
i++)
688 for (
size_t i = 0;
i < R2.size();
i++)
690 for (
size_t i = 0;
i < R1.size();
i++)
705 for (
size_t i = 0;
i < R4.size();
i++)
707 for (
size_t i = 0;
i < R3.size();
i++)
709 for (
size_t i = 0;
i < R2.size();
i++)
711 for (
size_t i = 0;
i < R1.size();
i++)
712 R4[
i][0] = PiT.
Mat1(
i)[0] *
727 for (
size_t i = 0;
i < R4.size();
i++)
729 for (
size_t i = 0;
i < R3.size();
i++)
731 for (
size_t i = 0;
i < R2.size();
i++)
733 for (
size_t i = 0;
i < R1.size();
i++)
748 for (
size_t i = 0;
i < R4.size();
i++)
750 for (
size_t i = 0;
i < R3.size();
i++)
752 for (
size_t i = 0;
i < R2.size();
i++)
754 for (
size_t i = 0;
i < R1.size();
i++)
765 for (
size_t i = 0;
i < R4.size();
i++) {
771 for (
size_t i = 0;
i < R3.size();
i++) {
776 for (
size_t i = 0;
i < R2.size();
i++) {
780 for (
size_t i = 0;
i < R1.size();
i++) {
793 switch (stokes_dim) {
811 for (
size_t i = 0;
i < R4.size();
i++)
812 for (
size_t j = 0; j < 4; j++)
M(
i, j) = R4[
i](j);
813 for (
size_t i = 0;
i < R3.size();
i++)
814 for (
size_t j = 0; j < 3; j++)
M(
i, j) = R3[
i](j);
815 for (
size_t i = 0;
i < R2.size();
i++)
816 for (
size_t j = 0; j < 2; j++)
M(
i, j) = R2[
i](j);
817 for (
size_t i = 0;
i < R1.size();
i++)
M(
i, 0) = R1[
i](0);
836 switch (stokes_dim) {
851 Eigen::Vector3d(a.
Kjj()[
i], a.
K12()[
i], a.
K13()[
i]) * B[i] +
855 Eigen::Vector3d(a.
Kjj()[
i], a.
K12()[
i], a.
K13()[
i]) * B[i];
859 R2[i].noalias() = Eigen::Vector2d(a.
Kjj()[
i], a.
K12()[
i]) * B[i] +
860 Eigen::Vector2d(S.
Kjj()[
i], S.
K12()[
i]);
862 R2[
i].noalias() = Eigen::Vector2d(a.
Kjj()[
i], a.
K12()[
i]) * B[i];
866 R1[i][0] = a.
Kjj()[
i] * B[
i] + S.
Kjj()[
i];
868 R1[
i][0] = a.
Kjj()[
i] * B[
i];
877 switch (stokes_dim) {
879 return Index(R4.size());
881 return Index(R3.size());
883 return Index(R2.size());
885 return Index(R1.size());
908 const ArrayOfTransmissionMatrix& atm);
912 const ArrayOfArrayOfTransmissionMatrix& aatm);
918 std::ostream&
operator<<(std::ostream& os,
const ArrayOfRadiationVector& arv);
922 const ArrayOfArrayOfRadiationVector& aarv);
965 ArrayOfRadiationVector& dI1,
966 ArrayOfRadiationVector& dI2,
969 const ArrayOfRadiationVector& dJ1,
970 const ArrayOfRadiationVector& dJ2,
973 const ArrayOfTransmissionMatrix& dT1,
974 const ArrayOfTransmissionMatrix& dT2,
993 ArrayOfRadiationVector&
dJ,
1003 const bool& jacobian_do);
1020 ArrayOfTransmissionMatrix& dT1,
1021 ArrayOfTransmissionMatrix& dT2,
1029 const Index temp_deriv_pos);
1038 const ArrayOfTransmissionMatrix& T,
1056 ArrayOfRadiationVector& I,
1057 ArrayOfArrayOfArrayOfRadiationVector& dI,
1059 const ArrayOfTransmissionMatrix& T,
1060 const ArrayOfTransmissionMatrix& PiTf,
1061 const ArrayOfTransmissionMatrix& PiTr,
1062 const ArrayOfTransmissionMatrix& Z,
1063 const ArrayOfArrayOfTransmissionMatrix& dT1,
1064 const ArrayOfArrayOfTransmissionMatrix& dT2,
1065 const ArrayOfArrayOfTransmissionMatrix& dZ,
1092 #endif // transmissionmatrix_h ArrayOfArrayOfTransmissionMatrix cumulative_backscatter_derivative(ConstTensor5View t, const ArrayOfMatrix &aom)
Accumulated backscatter derivative (???)
INDEX Index
The type to use for all integer numbers and indices.
TransmissionMatrix(TransmissionMatrix &&tm) noexcept
Construct a new Transmission Matrix object.
Class to keep track of Transmission Matrices for Stokes Dim 1-4.
Eigen::MatrixXd Mat(size_t i) const
Get Matrix at position by copy.
void stepwise_transmission(TransmissionMatrix &T, ArrayOfTransmissionMatrix &dT1, ArrayOfTransmissionMatrix &dT2, const PropagationMatrix &K1, const PropagationMatrix &K2, const ArrayOfPropagationMatrix &dK1, const ArrayOfPropagationMatrix &dK2, const Numeric &r, const Numeric &dr_dtemp1, const Numeric &dr_dtemp2, const Index temp_deriv_pos)
Set the stepwise transmission matrix.
void setDerivReflection(const RadiationVector &I, const TransmissionMatrix &PiT, const TransmissionMatrix &Z, const TransmissionMatrix &dZ)
Sets *this to the reflection derivative.
Index Frequencies() const
Number of frequencies.
void addDerivTransmission(const TransmissionMatrix &PiT, const TransmissionMatrix &dT, const RadiationVector &I)
Add the transmission derivative to this.
RadiativeTransferSolver
Intended to hold various forward solvers.
Index NumberOfAzimuthAngles() const
The number of azimuth angles of the propagation matrix.
TransmissionMatrix(Index nf=0, Index stokes=1)
Construct a new Transmission Matrix object.
void stepwise_source(RadiationVector &J, ArrayOfRadiationVector &dJ, const PropagationMatrix &K, const StokesVector &a, const StokesVector &S, const ArrayOfPropagationMatrix &dK, const ArrayOfStokesVector &da, const ArrayOfStokesVector &dS, const ConstVectorView B, const ConstVectorView dB_dT, const ArrayOfRetrievalQuantity &jacobian_quantities, const bool &jacobian_do)
Set the stepwise source.
TransmissionMatrix & operator*=(const Numeric &scale)
Scale self.
Array< ArrayOfTransmissionMatrix > ArrayOfArrayOfTransmissionMatrix
Routines for setting up the jacobian.
Eigen::Matrix< double, 1, 1 > & Vec1(size_t i)
Return Vector at position.
Eigen::Vector3d & Vec3(size_t i)
Return Vector at position.
void mul(const TransmissionMatrix &A, const TransmissionMatrix &B)
Set this to a multiple of A by B.
Struct of far and close weights.
bool IsEmpty() const
Asks if the class is empty.
TransmissionMatrix & operator=(const TransmissionMatrix &tm)=default
Assignment operator.
CumulativeTransmission
Intended to hold various ways to accumulate the transmission matrix.
Eigen::Matrix4d & Mat4(size_t i)
Get Matrix at position.
ArrayOfTransmissionMatrix cumulative_backscatter(ConstTensor5View t, ConstMatrixView m)
Accumulated backscatter (???)
cmplx FADDEEVA() w(cmplx z, double relerr)
const Eigen::Vector2d & Vec2(size_t i) const
Return Vector at position.
void setSource(const StokesVector &a, const ConstVectorView &B, const StokesVector &S, Index i)
Set this to source vector at position.
Class to help with hidden temporary variables for operations of type Numeric times Class...
void setIdentity()
Set to identity matrix.
Index StokesDim() const
Stokes dimensionaility.
RadiationVector(RadiationVector &&rv) noexcept
Construct a new Radiation Vector object.
Stokes vector is as Propagation matrix but only has 4 possible values.
void rem_avg(const RadiationVector &O1, const RadiationVector &O2)
Remove the average of two other RadiationVector from *this.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
Eigen::Vector2d & Vec2(size_t i)
Return Vector at position.
void addMultiplied(const TransmissionMatrix &A, const RadiationVector &x)
Add multiply.
Array< RadiationVector > ArrayOfRadiationVector
void add_avg(const RadiationVector &O1, const RadiationVector &O2)
Add the average of two other RadiationVector to *this.
VectorView K13(const Index iz=0, const Index ia=0)
Vector view to K(0, 2) elements.
const Numeric & operator()(const Index i, const Index j) const
Access operator.
std::vector< Eigen::Matrix3d, Eigen::aligned_allocator< Eigen::Matrix3d > > T3
void setZero()
Set to zero matrix.
Index ncols() const
Returns the number of columns.
void set_backscatter_radiation_vector(ArrayOfRadiationVector &I, ArrayOfArrayOfArrayOfRadiationVector &dI, const RadiationVector &I_incoming, const ArrayOfTransmissionMatrix &T, const ArrayOfTransmissionMatrix &PiTf, const ArrayOfTransmissionMatrix &PiTr, const ArrayOfTransmissionMatrix &Z, const ArrayOfArrayOfTransmissionMatrix &dT1, const ArrayOfArrayOfTransmissionMatrix &dT2, const ArrayOfArrayOfTransmissionMatrix &dZ, const BackscatterSolver solver)
Set the backscatter radiation vector.
VectorView K12(const Index iz=0, const Index ia=0)
Vector view to K(0, 1) elements.
Array< ArrayOfArrayOfRadiationVector > ArrayOfArrayOfArrayOfRadiationVector
Array< ArrayOfRadiationVector > ArrayOfArrayOfRadiationVector
void update_radiation_vector(RadiationVector &I, ArrayOfRadiationVector &dI1, ArrayOfRadiationVector &dI2, const RadiationVector &J1, const RadiationVector &J2, const ArrayOfRadiationVector &dJ1, const ArrayOfRadiationVector &dJ2, const TransmissionMatrix &T, const TransmissionMatrix &PiT, const ArrayOfTransmissionMatrix &dT1, const ArrayOfTransmissionMatrix &dT2, const RadiativeTransferSolver solver)
Update the Radiation Vector.
TransmissionMatrix & operator=(const LazyScale< TransmissionMatrix > &lstm)
Assign lazily.
Eigen::VectorXd Vec(size_t i) const
Return Vector at position by copy.
Index NumberOfZenithAngles() const
The number of zenith angles of the propagation matrix.
Stuff related to the propagation matrix.
Eigen::Matrix3d & Mat3(size_t i)
Get Matrix at position.
Array< TransmissionMatrix > ArrayOfTransmissionMatrix
Weights< N > linear_in_tau_weights(size_t) const noexcept
Eigen::Matrix< Numeric, int(N), int(N)> far
void SetZero(size_t i)
Set Radiation Vector to Zero at position.
Eigen::Matrix2d & Mat2(size_t i)
Get Matrix at position.
void addDerivEmission(const TransmissionMatrix &PiT, const TransmissionMatrix &dT, const TransmissionMatrix &T, const RadiationVector &ImJ, const RadiationVector &dJ)
Add the emission derivative to this.
Numeric operator()(const Index i, const Index j, const Index k) const
Access value in matrix.
Index StokesDim() const
Get Stokes dimension.
Eigen::Matrix< double, 1, 1 > & Mat1(size_t i)
Get Matrix at position.
A constant view of a Tensor5.
Eigen::Matrix< Numeric, int(N), int(N)> close
NUMERIC Numeric
The type to use for all floating point numbers.
Index Frequencies() const
Get frequency count.
BackscatterSolver
Intended to hold various backscatter solvers.
Eigen::Vector4d & Vec4(size_t i)
Return Vector at position.
friend std::istream & operator>>(std::istream &data, TransmissionMatrix &tm)
Input operator.
std::vector< Eigen::Matrix2d, Eigen::aligned_allocator< Eigen::Matrix2d > > T2
Radiation Vector for Stokes dimension 1-4.
std::vector< Eigen::Vector4d, Eigen::aligned_allocator< Eigen::Vector4d > > R4
RadiationVector & operator=(const ConstMatrixView &M)
Set *this from matrix.
void setBackscatterTransmission(const RadiationVector &I0, const TransmissionMatrix &Tr, const TransmissionMatrix &Tf, const TransmissionMatrix &Z)
Set this to backscatter transmission.
const Eigen::Matrix4d & Mat4(size_t i) const
Get Matrix at position.
VectorView K14(const Index iz=0, const Index ia=0)
Vector view to K(0, 3) elements.
This can be used to make arrays out of anything.
RadiationVector(Index nf=0, Index stokes=1)
Construct a new Radiation Vector object.
const base & bas
A const reference to a value.
const Eigen::Matrix3d & Mat3(size_t i) const
Get Matrix at position.
VectorView Kjj(const Index iz=0, const Index ia=0)
Vector view to diagonal elements.
std::vector< Eigen::Vector3d, Eigen::aligned_allocator< Eigen::Vector3d > > R3
LazyScale< TransmissionMatrix > operator*(const TransmissionMatrix &tm, const Numeric &x)
Lazy scale of Transmission Matrix.
const Eigen::Matrix2d & Mat2(size_t i) const
Get Matrix at position.
A constant view of a Vector.
std::vector< Eigen::Matrix4d, Eigen::aligned_allocator< Eigen::Matrix4d > > T4
Array< ArrayOfArrayOfTransmissionMatrix > ArrayOfArrayOfArrayOfTransmissionMatrix
TransmissionMatrix & operator+=(const LazyScale< TransmissionMatrix > &lstm)
Assign to *this lazily.
A constant view of a Matrix.
friend std::ostream & operator<<(std::ostream &os, const TransmissionMatrix &tm)
Output operator.
std::vector< Eigen::Matrix< double, 1, 1 >, Eigen::aligned_allocator< Eigen::Matrix< double, 1, 1 > > > T1
const Eigen::Vector4d & Vec4(size_t i) const
Return Vector at position.
void transform(VectorView y, double(&my_func)(double), ConstVectorView x)
A generic transform function for vectors, which can be used to implement mathematical functions opera...
void setBackscatterTransmissionDerivative(const RadiationVector &I0, const TransmissionMatrix &Tr, const TransmissionMatrix &Tf, const TransmissionMatrix &dZ)
Set this to backscatter transmission scatter derivative.
TransmissionMatrix & operator=(TransmissionMatrix &&tm) noexcept
Move operator.
const Eigen::Vector3d & Vec3(size_t i) const
Return Vector at position.
std::vector< Eigen::Matrix< double, 1, 1 >, Eigen::aligned_allocator< Eigen::Matrix< double, 1, 1 > > > R1
ArrayOfTransmissionMatrix cumulative_transmission(const ArrayOfTransmissionMatrix &T, const CumulativeTransmission type)
Accumulate the transmission matrix over all layers.
void add_weighted(const TransmissionMatrix &T, const RadiationVector &close, const RadiationVector &far)
Add the weighted source of two RadiationVector to *this.
invlib::MatrixIdentity< Matrix > Identity
RadiationVector & operator=(RadiationVector &&rv) noexcept
Assign old radiation vector to this.
void leftMul(const TransmissionMatrix &T)
Multiply radiation vector from the left.
invlib::Matrix< ArtsMatrix > Matrix
invlib wrapper type for ARTS matrices.
const Numeric & scale
A const reference to a Numeric.
const Eigen::Matrix< double, 1, 1 > & Vec1(size_t i) const
Return Vector at position.
void mul_aliased(const TransmissionMatrix &A, const TransmissionMatrix &B)
Set this to a multiple of A by B.
Index nrows() const
Returns the number of rows.
const Eigen::Matrix< double, 1, 1 > & Mat1(size_t i) const
Get Matrix at position.
std::vector< Eigen::Vector2d, Eigen::aligned_allocator< Eigen::Vector2d > > R2