accelerInt  v0.1
Functions
linear-algebra.h File Reference

Header definitions of linear algebra routines needed for the Carathéodory-Fejér method. More...

#include <complex.h>
Include dependency graph for linear-algebra.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void getInverseComplex (int, double complex *)
 Interface function to LAPACK matrix inversion subroutine. More...
 
void linSolveComplex (int, double complex *, double complex *, double complex *)
 Solves the complex linear system Ax = B. More...
 
void roots (int, double *, double complex *)
 Polynomial root finding function. More...
 
void svd (int, double *, double *, double *, double *)
 Singular value decomposition function. More...
 

Detailed Description

Header definitions of linear algebra routines needed for the Carathéodory-Fejér method.

Definition in file linear-algebra.h.

Function Documentation

◆ getInverseComplex()

void getInverseComplex ( int  n,
double complex *  A 
)

Interface function to LAPACK matrix inversion subroutine.

Performs inversion of square matrix. Uses LAPACK subroutines DGETRF and DGETRI.

Parameters
[in]norder of matrix
[in]Athe input matrix, size n*n
Returns
info success/fail integer flag

Definition at line 23 of file linear-algebra.c.

◆ linSolveComplex()

void linSolveComplex ( int  n,
double complex *  A,
double complex *  B,
double complex *  x 
)

Solves the complex linear system Ax = B.

Performs inversion of square matrix. Uses LAPACK subroutines DGETRF and DGETRI.

Parameters
[in]norder of matrix
[in]Athe LHS matrix, size n*n
[in]Bthe RHS matrix, size n*n
[out]xthe solved vector, size n*1

Definition at line 88 of file linear-algebra.c.

◆ roots()

void roots ( int  n,
double *  v,
double complex *  rt 
)

Polynomial root finding function.

This function calculates the roots of a polynomial represented by its coefficients in the array v. This is done by constructing a companion matrix out of the polynomial coefficients, then using the LAPACK subroutine DGEEV to calculate its eigenvalues. These are the roots of the polynomial.

Parameters
[in]nsize of v;
[in]varray of polynomial coefficients (real)
[out]rtarray of polynomial roots (complex), size n - 1

Definition at line 141 of file linear-algebra.c.

◆ svd()

void svd ( int  n,
double *  A,
double *  S,
double *  U,
double *  V 
)

Singular value decomposition function.

Decomposes a matrix A into U * S * V', where S (here an array, really a diagonal matrix) holds the singular values. The function uses the LAPACK subroutine DGESVD.

Parameters
[in]nleading dimension of array
[in]Aarray to be decomposed, size n * n
[out]Sarray with singular values, size n
[out]Uarray with left singular vectors, size n * n
[out]Varray with right singular vectors, size n * n

Definition at line 215 of file linear-algebra.c.