|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
#include <algorithm>#include <cmath>#include <vector>#include "Utilities/GSLComplex.h"#include "Utilities/GSLMatrix.h"

Go to the source code of this file.
Classes | |
| struct | gsl_permutation |
| Permutation vector for LU decomposition. More... | |
Functions | |
| gsl_permutation * | gsl_permutation_alloc (size_t n) |
| Allocate an identity permutation of size \(n\). | |
| void | gsl_permutation_free (gsl_permutation *p) |
Free a permutation allocated by gsl_permutation_alloc. | |
| int | gsl_linalg_LU_decomp (gsl_matrix *A, gsl_permutation *p, int *signum) |
| In-place LU decomposition with partial pivoting (real). | |
| double | gsl_linalg_LU_det (const gsl_matrix *LU, int signum) |
| Determinant from LU decomposition (real). | |
| int | gsl_linalg_LU_invert (const gsl_matrix *LU, const gsl_permutation *p, gsl_matrix *inverse) |
| Invert a matrix from its LU decomposition (real). | |
| int | gsl_linalg_complex_LU_decomp (gsl_matrix_complex *A, gsl_permutation *p, int *signum) |
| In-place LU decomposition with partial pivoting (complex). | |
| gsl_complex | gsl_linalg_complex_LU_det (const gsl_matrix_complex *LU, int signum) |
| Determinant from LU decomposition (complex). | |
| int | gsl_linalg_complex_LU_invert (const gsl_matrix_complex *LU, const gsl_permutation *p, gsl_matrix_complex *inverse) |
| Invert a matrix from its LU decomposition (complex). | |
| int | gsl_linalg_LU_decomp_complex (gsl_matrix_complex *A, gsl_permutation *p, int *signum) |
Alias for gsl_linalg_complex_LU_decomp. | |
| gsl_complex | gsl_linalg_LU_det_complex (const gsl_matrix_complex *LU, int signum) |
Alias for gsl_linalg_complex_LU_det. | |
| int | gsl_linalg_LU_invert_complex (const gsl_matrix_complex *LU, const gsl_permutation *p, gsl_matrix_complex *inverse) |
Alias for gsl_linalg_complex_LU_invert. | |
|
inline |
In-place LU decomposition with partial pivoting (complex).
Computes \(P A = L U\), storing \(L\) and \(U\) in A.
| A | Input/Output: matrix overwritten with LU factors. |
| p | Output: permutation encoding row swaps. |
| signum | Output: sign of the permutation ( \(\pm 1\)). |
Definition at line 187 of file GSLLinalg.h.
References gsl_permutation::data, gsl_complex_abs(), gsl_complex_div(), gsl_complex_mul(), gsl_complex_sub(), gsl_matrix_complex_ptr(), gsl_matrix_complex::size1, and gsl_matrix_complex::size2.
Referenced by interpolation::MMatrix< Tmplt >::determinant(), gsl_linalg_LU_decomp_complex(), and interpolation::MMatrix< Tmplt >::invert().

|
inline |
Determinant from LU decomposition (complex).
Computes \(\det(A) = \mathrm{signum} \prod_i U_{ii}\).
| LU | Input: LU-decomposed matrix. |
| signum | Input: sign from gsl_linalg_complex_LU_decomp. |
Definition at line 248 of file GSLLinalg.h.
References gsl_complex_mul(), gsl_matrix_complex_ptr(), and gsl_matrix_complex::size1.
Referenced by interpolation::MMatrix< Tmplt >::determinant(), and gsl_linalg_LU_det_complex().

|
inline |
Invert a matrix from its LU decomposition (complex).
Computes \(A^{-1}\) using the stored \(L,U\) factors and permutation.
| LU | Input: LU-decomposed matrix. |
| p | Input: permutation from gsl_linalg_complex_LU_decomp. |
| inverse | Output: matrix to receive \(A^{-1}\). |
Definition at line 263 of file GSLLinalg.h.
References gsl_permutation::data, gsl_complex_add(), gsl_complex_div(), gsl_complex_mul(), gsl_complex_sub(), gsl_matrix_complex_ptr(), gsl_matrix_complex::size1, and gsl_matrix_complex::size2.
Referenced by gsl_linalg_LU_invert_complex(), and interpolation::MMatrix< Tmplt >::invert().

|
inline |
In-place LU decomposition with partial pivoting (real).
Computes \(P A = L U\), storing \(L\) (unit lower) and \(U\) in A. The permutation p encodes \(P\).
| A | Input/Output: matrix overwritten with LU factors. |
| p | Output: permutation encoding row swaps. |
| signum | Output: sign of the permutation ( \(\pm 1\)). |
Definition at line 66 of file GSLLinalg.h.
References gsl_permutation::data, gsl_matrix_ptr(), gsl_matrix::size1, and gsl_matrix::size2.
Referenced by interpolation::MMatrix< Tmplt >::determinant(), interpolation::MMatrix< Tmplt >::invert(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

|
inline |
Alias for gsl_linalg_complex_LU_decomp.
| A | Input/Output: matrix overwritten with LU factors. |
| p | Output: permutation encoding row swaps. |
| signum | Output: sign of the permutation ( \(\pm 1\)). |
Definition at line 319 of file GSLLinalg.h.
References gsl_linalg_complex_LU_decomp().
Referenced by TEST_F(), TEST_F(), and TEST_F().

|
inline |
Determinant from LU decomposition (real).
Computes \(\det(A) = \mathrm{signum} \prod_i U_{ii}\).
| LU | Input: LU-decomposed matrix. |
| signum | Input: sign from gsl_linalg_LU_decomp. |
Definition at line 124 of file GSLLinalg.h.
References gsl_matrix_ptr(), and gsl_matrix::size1.
Referenced by interpolation::MMatrix< Tmplt >::determinant(), and TEST_F().

|
inline |
Alias for gsl_linalg_complex_LU_det.
| LU | Input: LU-decomposed matrix. |
| signum | Input: sign from decomposition. |
Definition at line 327 of file GSLLinalg.h.
References gsl_linalg_complex_LU_det().
Referenced by TEST_F().

|
inline |
Invert a matrix from its LU decomposition (real).
Computes \(A^{-1}\) using the stored \(L,U\) factors and permutation.
| LU | Input: LU-decomposed matrix. |
| p | Input: permutation from gsl_linalg_LU_decomp. |
| inverse | Output: matrix to receive \(A^{-1}\). |
Definition at line 139 of file GSLLinalg.h.
References gsl_permutation::data, gsl_matrix_ptr(), gsl_matrix::size1, and gsl_matrix::size2.
Referenced by interpolation::MMatrix< Tmplt >::invert(), TEST_F(), and TEST_F().

|
inline |
Alias for gsl_linalg_complex_LU_invert.
| LU | Input: LU-decomposed matrix. |
| p | Input: permutation from decomposition. |
| inverse | Output: matrix to receive \(A^{-1}\). |
Definition at line 336 of file GSLLinalg.h.
References gsl_linalg_complex_LU_invert().
Referenced by TEST_F().

|
inline |
Allocate an identity permutation of size \(n\).
| n | Input: permutation size. |
Definition at line 40 of file GSLLinalg.h.
References gsl_permutation::data, and gsl_permutation::size.
Referenced by interpolation::MMatrix< Tmplt >::determinant(), interpolation::MMatrix< Tmplt >::invert(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Free a permutation allocated by gsl_permutation_alloc.
| p | Input: permutation to release (can be null). |
Definition at line 52 of file GSLLinalg.h.
References gsl_permutation::data.
Referenced by interpolation::MMatrix< Tmplt >::determinant(), interpolation::MMatrix< Tmplt >::invert(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().