TPCCLIB
|
Implementation and use of Householder transform. More...
#include "libtpcmodel.h"
Go to the source code of this file.
Functions | |
double | householder_transform (double *v, int N) |
int | householder_hm (double tau, double *vector, double **matrix, int rowNr, int columnNr) |
int | householder_hv (double tau, int size, double *v, double *w) |
double | householder_norm (double *v, int size) |
Implementation and use of Householder transform.
These routines are based on the code provided in the GSL library (https://sources.redhat.com/gsl/).
Definition in file hholder.c.
int householder_hm | ( | double | tau, |
double * | vector, | ||
double ** | matrix, | ||
int | rowNr, | ||
int | columnNr ) |
Applies a householder transformation defined by vector "vector" and scalar tau to the left-hand side of the matrix. (I - tau vector vector^T)*matrix The result of the transform is stored in matrix.
tau | Coefficient defining householder transform. |
vector | Vector defining householder transform (of size rowNr). |
matrix | the matrix that is to be transformed. |
rowNr | Nr of rows in matrix. |
columnNr | Nr of columns in matrix. |
Definition at line 68 of file hholder.c.
Referenced by qr_decomp().
int householder_hv | ( | double | tau, |
int | size, | ||
double * | v, | ||
double * | w ) |
Applies a householder transformation defined by vector v and coefficient tau to vector w w = (I - tau v v^T) w.
tau | Coefficient defining householder transform. |
size | Size of vectors v and w. |
v | Vector v. |
w | Vector w. |
Definition at line 107 of file hholder.c.
Referenced by qr_solve().
double householder_norm | ( | double * | v, |
int | size ) |
double householder_transform | ( | double * | v, |
int | N ) |
This function prepares a Householder transformation P = I - tau h h^T which can be used to zero all the elements of the input vector except the first one that will get value beta. On output the elements 1 - size-1 of the vector h are stored in locations vector[1] - vector[size-1] of the input vector and value of beta is stored in location vector[0].
v | The N-vector to be transformed. |
N | size of the vector. |
Definition at line 23 of file hholder.c.
Referenced by qr_decomp().