15#include "densematrix.hh"
59 for (
int j = 0;
j <
k;
j++) {
209 for (
int j = 0;
j <
i;
j++) {
385 HDNUM_ERROR(
"Permutation Vector incompatible with Matrix!");
389 for (
int i = 0;
i <
p.size();
i++) {
413 for (
int c =
k+1; c <
Q.
colsize(); c++) {
416 norm +=
Q(
r, c) *
Q(
r, c);
466 for (
int j = 0;
j <
i;
j++) {
528 HDNUM_ERROR(
"Permutation Vector incompatible with Matrix!");
532 for (
int k = 0;
k <
p.size();
k++) {
537 A(
j,
k) = A(
j,
p[
k]);
Class with mathematical matrix operations.
Definition densematrix.hh:33
size_t rowsize() const
get number of rows of the matrix
Definition densematrix.hh:136
size_t colsize() const
get number of columns of the matrix
Definition densematrix.hh:153
void permute_forward(const Vector< std::size_t > &p, Vector< T > &b)
apply permutations to a right hand side vector
Definition lr.hh:160
DenseMatrix< T > qr_gram_schmidt_pivoting(DenseMatrix< T > &Q, Vector< int > &p, int &rank, T threshold=0.00000000001)
computes qr decomposition using modified Gram-Schmidt and pivoting - works with all types of matrices
Definition qr.hh:382
DenseMatrix< T > modified_gram_schmidt(const DenseMatrix< T > &A)
computes orthonormal basis of Im(A) using modified Gram-Schmidt
Definition qr.hh:112
DenseMatrix< T > qr_gram_schmidt(DenseMatrix< T > &Q)
computes qr decomposition using modified Gram-Schmidt - works only with small (m>n) and square matric...
Definition qr.hh:278
DenseMatrix< T > qr_gram_schmidt_simple(DenseMatrix< T > &Q)
computes qr decomposition using modified Gram-Schmidt - works only with small (m>n) and square matric...
Definition qr.hh:183
DenseMatrix< T > gram_schmidt(const DenseMatrix< T > &A)
computes orthonormal basis of Im(A) using classical Gram-Schmidt
Definition qr.hh:53