ARTS 2.5.0 (git: 9ee3ac6c)
lin_alg.h
Go to the documentation of this file.
1/* Copyright (C) 2002-2012 Claudia Emde <claudia.emde@dlr.de>
2
3 This program is free software; you can redistribute it and/or modify it
5 Free Software Foundation; either version 2, or (at your option) any
6 later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA.
17*/
18
28#ifndef linalg_h
29#define linalg_h
30
31#include "matpack_complex.h"
32#include "matpackIII.h"
33
34// LU decomposition
35void ludcmp(Matrix& LU, ArrayOfIndex& indx, ConstMatrixView A);
36
37// LU backsubstitution
41 const ArrayOfIndex& indx);
42
43// Solve linear system
45
46// Matrix inverse
47void inv(MatrixView Ainv, ConstMatrixView A);
48
49// Matrix inverse
51
52// Matrix diagonalization with lapack
54
55// Matrix diagonalization with lapack
59
60// Exponential of a Matrix
61void matrix_exp(MatrixView F, ConstMatrixView A, const Index& q = 10);
63void matrix_exp_4x4(MatrixView F, ConstMatrixView A, const Index& q = 10);
65
66// Exponential of a Matrix and its partial derivatives.
67// Includes a specialized function for speedier calculations
69 Tensor3View dF_upp,
70 Tensor3View dF_low,
72 ConstTensor3View dA_upp,
73 ConstTensor3View dA_low,
74 const Index& q = 10);
75
78
80 MatrixView F,
81 Tensor3View dF_upp,
82 Tensor3View dF_low,
84 ConstTensor3View dA_upp,
85 ConstTensor3View dA_low);
86
89
91 MatrixView F,
92 Tensor3View dF_upp,
93 Tensor3View dF_low,
95 ConstTensor3View dA_upp,
96 ConstTensor3View dA_low);
97
99 Tensor3View dF_upp,
100 Tensor3View dF_low,
102 ConstTensor3View dA_upp,
103 ConstTensor3View dA_low,
104 const Index& q = 10);
105
107 Tensor3View dF,
110 const Index& q = 10);
112 MatrixView dF,
115 const Index& q = 10);
116
117// Maximum absolute row sum norm
119
120// Identity Matrix
121void id_mat(MatrixView I);
122
124
126
127
140Numeric lsf(VectorView x, ConstMatrixView A, ConstVectorView y, bool residual=true) noexcept;
141
142
148Eigen::ComplexEigenSolver<Eigen::MatrixXcd> eig(const Eigen::Ref<Eigen::MatrixXcd> A);
149
150#endif // linalg_h
The ComplexMatrixView class.
The ComplexVectorView class.
A constant view of a ComplexMatrix.
A constant view of a Matrix.
Definition: matpackI.h:1014
A constant view of a Tensor3.
Definition: matpackIII.h:132
A constant view of a Vector.
Definition: matpackI.h:489
The MatrixView class.
Definition: matpackI.h:1125
The Matrix class.
Definition: matpackI.h:1225
The Tensor3View class.
Definition: matpackIII.h:239
The VectorView class.
Definition: matpackI.h:626
The Vector class.
Definition: matpackI.h:876
#define q
void matrix_exp2(MatrixView F, ConstMatrixView A)
Definition: lin_alg.cc:454
void matrix_exp_4x4(MatrixView F, ConstMatrixView A, const Index &q=10)
Definition: lin_alg.cc:476
void propmat4x4_to_transmat4x4(MatrixView F, Tensor3View dF_upp, Tensor3View dF_low, ConstMatrixView A, ConstTensor3View dA_upp, ConstTensor3View dA_low, const Index &q=10)
Definition: lin_alg.cc:1778
void linreg(Vector &p, ConstVectorView x, ConstVectorView y)
Definition: lin_alg.cc:2297
void special_matrix_exp_and_dmatrix_exp_dx_for_rt(MatrixView F, Tensor3View dF_upp, Tensor3View dF_low, ConstMatrixView A, ConstTensor3View dA_upp, ConstTensor3View dA_low, const Index &q=10)
Special exponential of a Matrix with their derivatives.
Definition: lin_alg.cc:554
void id_mat(MatrixView I)
Identity Matrix.
Definition: lin_alg.cc:2235
void cayley_hamilton_fitted_method_4x4_propmat_to_transmat__eigen(MatrixView F, ConstMatrixView A)
Definition: lin_alg.cc:958
void solve(VectorView x, ConstMatrixView A, ConstVectorView b)
Solve a linear system.
Definition: lin_alg.cc:138
Numeric norm_inf(ConstMatrixView A)
Maximum absolute row sum norm.
Definition: lin_alg.cc:2218
void diagonalize(MatrixView P, VectorView WR, VectorView WI, ConstMatrixView A)
Matrix Diagonalization.
Definition: lin_alg.cc:241
void lubacksub(VectorView x, ConstMatrixView LU, ConstVectorView b, const ArrayOfIndex &indx)
LU backsubstitution.
Definition: lin_alg.cc:91
Numeric lsf(VectorView x, ConstMatrixView A, ConstVectorView y, bool residual=true) noexcept
Least squares fitting by solving x for known A and y.
Definition: lin_alg.cc:2345
void ludcmp(Matrix &LU, ArrayOfIndex &indx, ConstMatrixView A)
LU decomposition.
Definition: lin_alg.cc:56
Numeric det(ConstMatrixView A)
Definition: lin_alg.cc:2251
void inv(MatrixView Ainv, ConstMatrixView A)
Matrix Inverse.
Definition: lin_alg.cc:167
void matrix_exp(MatrixView F, ConstMatrixView A, const Index &q=10)
General exponential of a Matrix.
Definition: lin_alg.cc:387
void matrix_exp_dmatrix_exp(MatrixView F, Tensor3View dF, ConstMatrixView A, ConstTensor3View dA, const Index &q=10)
General exponential of a Matrix with their derivatives.
Definition: lin_alg.cc:1921
void matrix_exp2_4x4(MatrixView F, ConstMatrixView A)
Definition: lin_alg.cc:516
Eigen::ComplexEigenSolver< Eigen::MatrixXcd > eig(const Eigen::Ref< Eigen::MatrixXcd > A)
Return the Eigen decomposition of the eigen matrix.
Definition: lin_alg.cc:2368
void cayley_hamilton_fitted_method_4x4_propmat_to_transmat__explicit(MatrixView F, ConstMatrixView A)
Definition: lin_alg.cc:784
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
#define b