From 70f074695b73ae49fc4127c1a7844c081cd61064 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Wed, 6 Apr 2005 20:37:02 +0000 Subject: [PATCH] gcc 3.4.3 git-svn-id: https://svn.dealii.org/trunk@10400 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/householder.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/deal.II/lac/include/lac/householder.h b/deal.II/lac/include/lac/householder.h index 361a1c12e2..3d922d07f0 100644 --- a/deal.II/lac/include/lac/householder.h +++ b/deal.II/lac/include/lac/householder.h @@ -86,12 +86,12 @@ Householder::Householder(const FullMatrix& M) Assert (this->n_cols() <= this->n_rows(), ExcDimensionMismatch(this->n_cols(), this->n_rows())); - for (unsigned int j=0 ; jn() ; ++j) { number2 sigma = 0; unsigned int i; // sigma = ||v||^2 - for (i=j ; im() ; ++i) sigma += this->el(i,j)*this->el(i,j); // We are ready if the column is // empty. Are we? @@ -107,20 +107,20 @@ Householder::Householder(const FullMatrix& M) diagonal[j] = beta*(this->el(j,j) - s); this->el(j,j) = s; - for (i=j+1 ; im() ; ++i) this->el(i,j) *= beta; // For all subsequent columns do // the Householder reflexion - for (unsigned int k=j+1 ; kn() ; ++k) { number2 sum = diagonal[j]*this->el(j,k); - for (i=j+1 ; im() ; ++i) sum += this->el(i,j)*this->el(i,k); this->el(j,k) -= sum*this->diagonal[j]; - for (i=j+1 ; im() ; ++i) this->el(i,k) -= sum*this->el(i,j); } } @@ -139,22 +139,22 @@ Householder::least_squares (Vector& dst, // Multiply Q_n ... Q_2 Q_1 src // Where Q_i = I-v_i v_i^T - for (unsigned int j=0;jn();++j) { // sum = v_i^T src number2 sum = diagonal[j]*src(j); - for (unsigned int i=j+1 ; im() ; ++i) sum += this->el(i,j)*src(i); // src -= v * sum src(j) -= sum*diagonal[j]; - for (unsigned int i=j+1 ; im() ; ++i) src(i) -= sum*this->el(i,j); } backward(dst, src); number2 sum = 0.; - for (unsigned int i=n() ; in() ; im() ; ++i) sum += src(i) * src(i); return std::sqrt(sum); } -- 2.39.5