OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
GSLEigen.h File Reference
#include <cmath>
#include <complex>
#include <vector>
#include "Utilities/GSLComplex.h"
#include "Utilities/GSLMatrix.h"
Include dependency graph for GSLEigen.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gsl_eigen_nonsymm_workspace
 Workspace for nonsymmetric eigenvalue computation. More...
 
struct  gsl_eigen_nonsymmv_workspace
 Workspace for nonsymmetric eigenvalues/eigenvectors. More...
 

Functions

gsl_eigen_nonsymm_workspacegsl_eigen_nonsymm_alloc (size_t n)
 Allocate a nonsymmetric eigenvalue workspace for \(n \times n\) matrices.
 
void gsl_eigen_nonsymm_params (int, int, gsl_eigen_nonsymm_workspace *)
 Accept GSL-style parameters (no-op in this implementation).
 
void gsl_eigen_nonsymm_free (gsl_eigen_nonsymm_workspace *w)
 Free a workspace allocated by gsl_eigen_nonsymm_alloc.
 
gsl_eigen_nonsymmv_workspacegsl_eigen_nonsymmv_alloc (size_t n)
 Allocate a nonsymmetric eigenvalue/vector workspace for \(n \times n\) matrices.
 
void gsl_eigen_nonsymmv_free (gsl_eigen_nonsymmv_workspace *w)
 Free a workspace allocated by gsl_eigen_nonsymmv_alloc.
 
int gsl_eigen_nonsymm (gsl_matrix *A, gsl_vector_complex *eval, gsl_eigen_nonsymm_workspace *)
 Compute eigenvalues of a real nonsymmetric matrix.
 
int gsl_eigen_nonsymmv (gsl_matrix *A, gsl_vector_complex *eval, gsl_matrix_complex *evec, gsl_eigen_nonsymmv_workspace *w)
 Compute eigenvalues and a simplified set of eigenvectors.
 

Function Documentation

◆ gsl_eigen_nonsymm()

int gsl_eigen_nonsymm ( gsl_matrix A,
gsl_vector_complex eval,
gsl_eigen_nonsymm_workspace  
)
inline

Compute eigenvalues of a real nonsymmetric matrix.

See also
https://www.gnu.org/software/gsl/doc/html/eigen.html

Uses a basic QR iteration to approximate eigenvalues for small matrices.

Parameters
AInput: matrix (read-only; may be modified by algorithm).
evalOutput: vector of eigenvalues (complex).
wInput: workspace (unused).
Returns
Output: 0 on success, -1 on size mismatch.

Definition at line 94 of file GSLEigen.h.

References dot(), gsl_matrix_ptr(), gsl_vector_complex_ptr(), gsl_vector_complex::size, gsl_matrix::size1, and gsl_matrix::size2.

Referenced by interpolation::MMatrix< Tmplt >::eigenvalues(), gsl_eigen_nonsymmv(), TEST_F(), TEST_F(), and TEST_F().

Here is the call graph for this function:

◆ gsl_eigen_nonsymm_alloc()

gsl_eigen_nonsymm_workspace * gsl_eigen_nonsymm_alloc ( size_t  n)
inline

Allocate a nonsymmetric eigenvalue workspace for \(n \times n\) matrices.

See also
https://www.gnu.org/software/gsl/doc/html/eigen.html
Parameters
nInput: matrix dimension.
Returns
Output: workspace pointer.

Definition at line 49 of file GSLEigen.h.

References gsl_eigen_nonsymm_workspace::n, and gsl_eigen_nonsymm_workspace::work.

Referenced by interpolation::MMatrix< Tmplt >::eigenvalues(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ gsl_eigen_nonsymm_free()

void gsl_eigen_nonsymm_free ( gsl_eigen_nonsymm_workspace w)
inline

Free a workspace allocated by gsl_eigen_nonsymm_alloc.

See also
https://www.gnu.org/software/gsl/doc/html/eigen.html
Parameters
wInput: workspace to release (can be null).

Definition at line 69 of file GSLEigen.h.

Referenced by interpolation::MMatrix< Tmplt >::eigenvalues(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ gsl_eigen_nonsymm_params()

void gsl_eigen_nonsymm_params ( int  ,
int  ,
gsl_eigen_nonsymm_workspace  
)
inline

Accept GSL-style parameters (no-op in this implementation).

See also
https://www.gnu.org/software/gsl/doc/html/eigen.html
Parameters
balanceInput: balancing flag (unused).
compute_shurInput: Schur computation flag (unused).
wInput: workspace (unused).

Definition at line 61 of file GSLEigen.h.

Referenced by interpolation::MMatrix< Tmplt >::eigenvalues().

◆ gsl_eigen_nonsymmv()

int gsl_eigen_nonsymmv ( gsl_matrix A,
gsl_vector_complex eval,
gsl_matrix_complex evec,
gsl_eigen_nonsymmv_workspace w 
)
inline

Compute eigenvalues and a simplified set of eigenvectors.

See also
https://www.gnu.org/software/gsl/doc/html/eigen.html

Eigenvectors are approximated with a basic heuristic per eigenvalue.

Parameters
AInput: matrix (read-only; may be modified by algorithm).
evalOutput: vector of eigenvalues (complex).
evecOutput: matrix of eigenvectors in columns.
wInput: workspace (unused aside from type).
Returns
Output: 0 on success, -1 on size mismatch.

Definition at line 194 of file GSLEigen.h.

References gsl_complex_sub(), gsl_eigen_nonsymm(), gsl_matrix_complex_alloc(), gsl_matrix_complex_free(), gsl_matrix_complex_ptr(), gsl_matrix_ptr(), gsl_vector_complex_ptr(), and gsl_matrix::size1.

Referenced by interpolation::MMatrix< Tmplt >::eigenvectors(), TEST_F(), and TEST_F().

Here is the call graph for this function:

◆ gsl_eigen_nonsymmv_alloc()

gsl_eigen_nonsymmv_workspace * gsl_eigen_nonsymmv_alloc ( size_t  n)
inline

Allocate a nonsymmetric eigenvalue/vector workspace for \(n \times n\) matrices.

See also
https://www.gnu.org/software/gsl/doc/html/eigen.html
Parameters
nInput: matrix dimension.
Returns
Output: workspace pointer.

Definition at line 75 of file GSLEigen.h.

References gsl_eigen_nonsymmv_workspace::n, and gsl_eigen_nonsymmv_workspace::work.

Referenced by interpolation::MMatrix< Tmplt >::eigenvectors(), TEST_F(), TEST_F(), and TEST_F().

◆ gsl_eigen_nonsymmv_free()

void gsl_eigen_nonsymmv_free ( gsl_eigen_nonsymmv_workspace w)
inline

Free a workspace allocated by gsl_eigen_nonsymmv_alloc.

See also
https://www.gnu.org/software/gsl/doc/html/eigen.html
Parameters
wInput: workspace to release (can be null).

Definition at line 85 of file GSLEigen.h.

Referenced by interpolation::MMatrix< Tmplt >::eigenvectors(), TEST_F(), TEST_F(), and TEST_F().