H2Lib  3.0
factorizations.h
Go to the documentation of this file.
1 /* ------------------------------------------------------------
2  * This is the file "factorizations.h" of the H2Lib package.
3  * All rights reserved, Steffen Boerm 2010
4  * ------------------------------------------------------------ */
5 
10 #ifndef FACTORIZATIONS_H
11 #define FACTORIZATIONS_H
12 
22 #include "blas.h"
23 #include "amatrix.h"
24 #include "truncation.h"
25 
26 /* ------------------------------------------------------------
27  * Diagonal matrices
28  * ------------------------------------------------------------ */
29 
35 HEADER_PREFIX void
37 
45 HEADER_PREFIX void
46 diagsolve_amatrix(bool atrans, pcamatrix a, bool xtrans, pamatrix x);
47 
54 HEADER_PREFIX void
56 
64 HEADER_PREFIX void
65 diageval_amatrix(bool atrans, pcamatrix a, bool xtrans, pamatrix x);
66 
75 HEADER_PREFIX void
77  bool xtrans, pamatrix x);
78 
79 /* ------------------------------------------------------------
80  * Triangular matrices
81  * ------------------------------------------------------------ */
82 
91 HEADER_PREFIX void
92 triangularsolve_amatrix_avector(bool alower, bool aunit, bool atrans,
93  pcamatrix a, pavector x);
94 
105 HEADER_PREFIX void
106 triangularsolve_amatrix(bool alower, bool aunit, bool atrans, pcamatrix a,
107  bool xtrans, pamatrix x);
108 
117 HEADER_PREFIX void
118 triangulareval_amatrix_avector(bool alower, bool aunit, bool atrans,
119  pcamatrix a, pavector x);
120 
132 HEADER_PREFIX void
133 triangulareval_amatrix(bool alower, bool aunit, bool atrans, pcamatrix a,
134  bool xtrans, pamatrix x);
135 
149 HEADER_PREFIX void
150 triangularaddmul_amatrix(field alpha, bool alower, bool atrans, pcamatrix a,
151  bool blower, bool btrans, pcamatrix b, pamatrix c);
152 
158 HEADER_PREFIX void
159 copy_lower_amatrix(pcamatrix a, bool aunit, pamatrix b);
160 
166 HEADER_PREFIX void
167 copy_upper_amatrix(pcamatrix a, bool aunit, pamatrix b);
168 
169 /* ------------------------------------------------------------
170  * Triangular decompositions
171  * ------------------------------------------------------------ */
172 
183 
194 
204 HEADER_PREFIX void
205 lrdecomp_tasks_amatrix(pamatrix a, uint blocksize);
206 
213 HEADER_PREFIX void
215 
222 HEADER_PREFIX void
224 
232 HEADER_PREFIX void
233 lrsolve_amatrix_avector(bool atrans, pcamatrix a, pavector x);
234 
241 HEADER_PREFIX void
243 
250 HEADER_PREFIX void
252 
259 HEADER_PREFIX void
261 
270 HEADER_PREFIX void
271 lreval_amatrix_avector(bool atrans, pcamatrix a, pavector x);
272 
282 
294 
305 HEADER_PREFIX void
307 
314 HEADER_PREFIX void
316 
323 HEADER_PREFIX void
325 
332 HEADER_PREFIX void
334 
346 
353 HEADER_PREFIX void
355 
362 HEADER_PREFIX void
364 
365 /* ------------------------------------------------------------
366  * Orthogonal decompositions
367  * ------------------------------------------------------------ */
368 
375 HEADER_PREFIX void
377 
389 
404  uint *colpiv);
405 
414 HEADER_PREFIX void
415 qreval_amatrix_avector(bool qtrans, pcamatrix a, pcavector tau, pavector x);
416 
425 HEADER_PREFIX void
426 qreval_amatrix(bool qtrans, pcamatrix a, pcavector tau, pamatrix x);
427 
435 HEADER_PREFIX void
437 
441 HEADER_PREFIX void
443 
449 HEADER_PREFIX void
451 
454 #endif
void ldltsolve_amatrix(pcamatrix a, pamatrix x)
Solve the linear system using a LDLT factorization.
uint choldecomp_blocks_amatrix(pamatrix a, uint blocksize)
Compute the Cholesky decomposition of a self-adjoint positive definite matrix using a block-based al...
void lrsolve_amatrix_avector(bool atrans, pcamatrix a, pavector x)
Solve the linear system or using a LR factorization.
void lreval_amatrix_avector(bool atrans, pcamatrix a, pavector x)
Evaluate or using a LR factorization.
void triangularaddmul_amatrix(field alpha, bool alower, bool atrans, pcamatrix a, bool blower, bool btrans, pcamatrix b, pamatrix c)
Add the product of two triangular matrices and to a matrix , .
Definition: realavector.h:48
void qrsolve_amatrix_avector(pcamatrix a, pcavector tau, pavector x)
Solve the linear system using a QR factorization.
Definition: avector.h:39
void diageval_realavector_amatrix(field alpha, bool atrans, pcrealavector a, bool xtrans, pamatrix x)
Evaluate and variants for a diagonal matrix represented by a vector of reals.
uint choldecomp_amatrix(pamatrix a)
Compute the Cholesky decomposition of a self-adjoint positive definite matrix.
void qreval_amatrix_avector(bool qtrans, pcamatrix a, pcavector tau, pavector x)
Evaluate and variants for the matrix of a QR decomposition.
void triangularsolve_amatrix_avector(bool alower, bool aunit, bool atrans, pcamatrix a, pavector x)
Solve for a triangular matrix .
void ldltsolve_amatrix_avector(pcamatrix a, pavector x)
Solve the linear system using a LDLT factorization.
void lrsolve_n_amatrix_avector(pcamatrix a, pavector x)
Solve the linear system using a LR factorization.
void copy_upper_amatrix(pcamatrix a, bool aunit, pamatrix b)
Copy the upper triangular part of a matrix.
void lrdecomp_tasks_amatrix(pamatrix a, uint blocksize)
Compute the LR decomposition of a matrix using a block-based algorithm.
unsigned uint
Unsigned integer type.
Definition: settings.h:70
void cholsolve_amatrix_avector(pcamatrix a, pavector x)
Solve the linear system using a Cholesky factorization.
uint lrdecomp_amatrix(pamatrix a)
Compute the LR decomposition of a matrix.
void lreval_t_amatrix_avector(pcamatrix a, pavector x)
Evaluate using a LR factorization.
double _Complex field
Field type.
Definition: settings.h:171
void lrsolve_amatrix(pcamatrix a, pamatrix x)
Solve the linear system using a LR factorization.
void diageval_amatrix(bool atrans, pcamatrix a, bool xtrans, pamatrix x)
Evaluate and variants for a diagonal matrix .
void qrexpand_amatrix(pcamatrix a, pcavector tau, pamatrix q)
Compute the factor of a QR factorization.
void lrsolve_t_amatrix_avector(pcamatrix a, pavector x)
Solve the linear system using a LR factorization.
void copy_lower_amatrix(pcamatrix a, bool aunit, pamatrix b)
Copy the lower triangular part of a matrix.
void qrdecomp_amatrix(pamatrix a, pavector tau)
Compute the QR decomposition of a matrix.
void diagsolve_amatrix_avector(bool atrans, pcamatrix a, pavector x)
Solve and variants for a diagonal matrix .
Define different strategies used by various truncation and compression algorithms for hmatrices and h...
Definition: truncation.h:43
void qrinvert_amatrix(pamatrix a)
Compute the inverse of a matrix by QR decomposition.
uint qrdecomp_rank_amatrix(pamatrix a, pavector tau, pctruncmode tm, real eps, uint *colpiv)
Compute the QR decomposition of a matrix with column pivoting, exit early if the remainder becomes s...
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
void choleval_amatrix_avector(pcamatrix a, pavector x)
Evaluate using a Cholesky factorization.
double real
real floating point type.
Definition: settings.h:97
void triangularsolve_amatrix(bool alower, bool aunit, bool atrans, pcamatrix a, bool xtrans, pamatrix x)
Solve and variants for a triangular matrix .
uint ldltdecomp_amatrix(pamatrix a)
Compute the LDLT decomposition of a self-adjoint matrix.
void qreval_amatrix(bool qtrans, pcamatrix a, pcavector tau, pamatrix x)
Evaluate and variants for the matrix of a QR decomposition.
void triangulareval_amatrix(bool alower, bool aunit, bool atrans, pcamatrix a, bool xtrans, pamatrix x)
Evaluate and variants for a triangular matrix .
void cholsolve_amatrix(pcamatrix a, pamatrix x)
Solve the linear system using a Cholesky factorization.
void diageval_amatrix_avector(bool atrans, pcamatrix a, pavector x)
Evaluate and variants for a diagonal matrix .
Representation of a matrix as an array in column-major order.
Definition: amatrix.h:43
void triangulareval_amatrix_avector(bool alower, bool aunit, bool atrans, pcamatrix a, pavector x)
Evaluate for a triangular matrix .
void diagsolve_amatrix(bool atrans, pcamatrix a, bool xtrans, pamatrix x)
Solve and variants for a diagonal matrix .
uint lrdecomp_blocks_amatrix(pamatrix a, uint blocksize)
Compute the LR decomposition of a matrix using a block-based algorithm.
void choldecomp_tasks_amatrix(pamatrix a, uint blocksize)
Compute the Cholesky decomposition of a self-adjoint positive definite matrix using a block-based al...
uint qrdecomp_pivot_amatrix(pamatrix a, pavector tau, uint *colpiv)
Compute the QR decomposition of a matrix with column pivoting.
void lreval_n_amatrix_avector(pcamatrix a, pavector x)
Evaluate using a LR factorization.