SCOREC core
Parallel unstructured mesh tools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mthQR.h
Go to the documentation of this file.
1 #ifndef MTH_QR_H
2 #define MTH_QR_H
3 
4 #include "mthMatrix.h"
5 
9 namespace mth {
10 
19 template <class T, unsigned M, unsigned N>
20 unsigned decomposeQR(
21  Matrix<T,M,N> const& a,
22  Matrix<T,M,M>& q,
23  Matrix<T,M,N>& r);
24 
31 template <class T, unsigned M, unsigned N>
32 void backsubUT(
33  Matrix<T,M,N> const& r,
34  Vector<T,M> const& b,
35  Vector<T,N>& x);
36 
45 template <class T, unsigned M, unsigned N>
46 void solveFromQR(Matrix<T,M,M> const& q,
47  Matrix<T,M,N> const& r,
48  Vector<T,M> const& b, Vector<T,N>& x);
49 
57 template <class T, unsigned M, unsigned N>
58 bool solveQR(Matrix<T,M,N> const& a,
59  Vector<T,M> const& b, Vector<T,N>& x);
60 
61 template <class T, unsigned M>
62 void reduceToHessenberg(Matrix<T,M,M> const& a, Matrix<T,M,M>& q,
63  Matrix<T,M,M>& h);
64 
75 template <class T, unsigned M>
76 bool eigenQR(Matrix<T,M,M> const& a,
77  Matrix<T,M,M>& l,
78  Matrix<T,M,M>& q,
79  unsigned max_iters);
80 
81 }
82 
83 #endif
void backsubUT(Matrix< T, M, N > const &r, Vector< T, M > const &b, Vector< T, N > &x)
solves Rx = b for upper triangular R
bool solveQR(Matrix< T, M, N > const &a, Vector< T, M > const &b, Vector< T, N > &x)
solves Ax = b using A&#39;s QR factorization
unsigned decomposeQR(Matrix< T, M, N > const &a, Matrix< T, M, M > &q, Matrix< T, M, N > &r)
finds the QR decomposition of A
Small compile-time and run-time linear algebra matrices.
void solveFromQR(Matrix< T, M, M > const &q, Matrix< T, M, N > const &r, Vector< T, M > const &b, Vector< T, N > &x)
solves Ax = b given A&#39;s QR factorization
bool eigenQR(Matrix< T, M, M > const &a, Matrix< T, M, M > &l, Matrix< T, M, M > &q, unsigned max_iters)
computes the eigendecomposition of A