Heidelberg Educational Numerics Library Version 0.27 (from 15 March 2021)
Functions
qrhousholder.hh File Reference

This file implements QR decomposition using housholder transformation. More...

#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include "densematrix.hh"
#include "vector.hh"

Go to the source code of this file.

Functions

template<class REAL >
DenseMatrix< REALhdnum::creat_I_matrix (size_t n)
 
template<typename REAL >
size_t hdnum::sgn (REAL val)
 Function that return the sign of a number.
 
template<class REAL >
void hdnum::qrhousholder (DenseMatrix< REAL > &A, hdnum::Vector< REAL > &v)
 Funktion that calculate the QR decoposition in place the elements of A will be replaced with the elements of v_{i}vectors and the upper diagonals elements of R and the diagonal elements of R will be saved in vectro v.
 
template<class REAL >
DenseMatrix< REALhdnum::qrhousholderexplizitQ (DenseMatrix< REAL > &A, hdnum::Vector< REAL > &v, bool show_Hi=false)
 Funktion that calculate the QR decoposition in place and return Q the elements of A will be replaced with the elements of v_{i}vectors and the upper diagonals elements of R and the diagonal elements of R will be saved in vectro v.
 

Detailed Description

This file implements QR decomposition using housholder transformation.

Function Documentation

◆ qrhousholder()

template<class REAL >
void hdnum::qrhousholder ( DenseMatrix< REAL > & A,
hdnum::Vector< REAL > & v )

Funktion that calculate the QR decoposition in place the elements of A will be replaced with the elements of v_{i}vectors and the upper diagonals elements of R and the diagonal elements of R will be saved in vectro v.

Template Parameters
Athe Matrix
voa vector of hdnum::Vector

◆ qrhousholderexplizitQ()

template<class REAL >
DenseMatrix< REAL > hdnum::qrhousholderexplizitQ ( DenseMatrix< REAL > & A,
hdnum::Vector< REAL > & v,
bool show_Hi = false )

Funktion that calculate the QR decoposition in place and return Q the elements of A will be replaced with the elements of v_{i}vectors and the upper diagonals elements of R and the diagonal elements of R will be saved in vectro v.

Template Parameters
Athe Matrix
voa vector of hdnum::Vector
Returns
Q matrix