21 DecompQR(
const std::vector<std::vector<T>>& mat);
53 std::vector<std::vector<T>>
NewMatrix(
size_t m,
size_t n);
62 T
DotProduct(
const std::vector<T>& a,
const std::vector<T>& b);
65 const std::vector<std::vector<T>>&
Q() {
return _Q; }
68 const std::vector<std::vector<T>>&
R() {
return _R; }
72 std::vector<std::vector<T>>
_Q;
73 std::vector<std::vector<T>>
_R;
76 #include "DecompQR-inl.hh"
void DecomposeGramSchmidt(const std::vector< std::vector< T >> &mat)
Decomposes a square matrix into a parity matrix P, an orthogonal matrix Q and a right triangular matr...
Definition: DecompQR-inl.hh:31
std::vector< std::vector< T > > _R
R Matrix.
Definition: DecompQR.hh:73
std::vector< std::vector< T > > _Q
Q Matrix.
Definition: DecompQR.hh:72
std::vector< std::vector< T > > NewMatrix(size_t m, size_t n)
Returns a matrix of m rows and n columns.
Definition: DecompQR-inl.hh:89
Defines the QR decomposition algorithm of a square matrix.
Definition: DecompQR.hh:15
T Determinant()
Returns the determinant of the decomposed matrix.
DecompQR & operator=(const DecompQR &decQR)
Equality operator.
Definition: DecompQR-inl.hh:20
const std::vector< std::vector< T > > & R()
Gets and returns the upper triangular matrix.
Definition: DecompQR.hh:68
const std::vector< std::vector< T > > & Q()
Gets and returns the lower triangular matrix.
Definition: DecompQR.hh:65
DecompQR()
Default constructor, initilizes an empty matrix of dimension 0x0.
Definition: DecompQR-inl.hh:1
T DotProduct(const std::vector< T > &a, const std::vector< T > &b)
Returns the dot produt of two vectors.
Definition: DecompQR-inl.hh:99
~DecompQR()
Destructor.
Definition: DecompQR-inl.hh:29