// @(#)root/matrix:$Id$
// Authors: Fons Rademakers, Eddy Offermann  Dec 2003

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

///////////////////////////////////////////////////////////////////////////
//                                                                       //
// QR Decomposition class                                                //
//                                                                       //
// Decompose  a general (m x n) matrix A into A = fQ fR H   where        //
//                                                                       //
//  fQ : (m x n) - orthogonal matrix                                     //
//  fR : (n x n) - upper triangular matrix                               //
//  H  : HouseHolder matrix which is stored through                      //
//  fUp: (n) - vector with Householder up's                              //
//  fW : (n) - vector with Householder beta's                            //
//                                                                       //
//  If row/column index of A starts at (rowLwb,colLwb) then              //
//  the decomposed matrices start from :                                 //
//  fQ  : (rowLwb,0)                                                     //
//  fR  : (0,colLwb)                                                     //
//  and the decomposed vectors start from :                              //
//  fUp : (0)                                                            //
//  fW  : (0)                                                            //
//                                                                       //
// Errors arise from formation of reflectors i.e. singularity .          //
// Note it attempts to handle the cases where the nRow <= nCol .         //
//                                                                       //
///////////////////////////////////////////////////////////////////////////

#include "TDecompQRH.h"

ClassImp(TDecompQRH)

//______________________________________________________________________________
TDecompQRH::TDecompQRH(Int_t nrows,Int_t ncols)
{
// Constructor for (nrows x ncols) matrix

   if (nrows < ncols) {
      Error("TDecompQRH(Int_t,Int_t","matrix rows should be >= columns");
      return;
   }

   fQ.ResizeTo(nrows,ncols);
   fR.ResizeTo(ncols,ncols);
   if (nrows <= ncols) {
      fW.ResizeTo(nrows);
      fUp.ResizeTo(nrows);
   } else {
      fW.ResizeTo(ncols);
      fUp.ResizeTo(ncols);
   }
}

//______________________________________________________________________________
TDecompQRH::TDecompQRH(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb)
{
// Constructor for ([row_lwb..row_upb] x [col_lwb..col_upb]) matrix

   const Int_t nrows = row_upb-row_lwb+1;
   const Int_t ncols = col_upb-col_lwb+1;

   if (nrows < ncols) {
      Error("TDecompQRH(Int_t,Int_t,Int_t,Int_t","matrix rows should be >= columns");
      return;
   }

   fRowLwb = row_lwb;
   fColLwb = col_lwb;

   fQ.ResizeTo(nrows,ncols);
   fR.ResizeTo(ncols,ncols);
   if (nrows <= ncols) {
      fW.ResizeTo(nrows);
      fUp.ResizeTo(nrows);
   } else {
      fW.ResizeTo(ncols);
      fUp.ResizeTo(ncols);
   }
}

//______________________________________________________________________________
TDecompQRH::TDecompQRH(const TMatrixD &a,Double_t tol)
{
// Constructor for general matrix A .

   R__ASSERT(a.IsValid());
   if (a.GetNrows() < a.GetNcols()) {
      Error("TDecompQRH(const TMatrixD &","matrix rows should be >= columns");
      return;
   }

   SetBit(kMatrixSet);
   fCondition = a.Norm1();
   fTol = a.GetTol();
   if (tol > 0.0)
      fTol = tol;

   fRowLwb = a.GetRowLwb();
   fColLwb = a.GetColLwb();
   const Int_t nRow = a.GetNrows();
   const Int_t nCol = a.GetNcols();

   fQ.ResizeTo(nRow,nCol);
   memcpy(fQ.GetMatrixArray(),a.GetMatrixArray(),nRow*nCol*sizeof(Double_t));
   fR.ResizeTo(nCol,nCol);
   if (nRow <= nCol) {
      fW.ResizeTo(nRow);
      fUp.ResizeTo(nRow);
   } else {
      fW.ResizeTo(nCol);
      fUp.ResizeTo(nCol);
   }
}

//______________________________________________________________________________
TDecompQRH::TDecompQRH(const TDecompQRH &another) : TDecompBase(another)
{
// Copy constructor

   *this = another;
}

//______________________________________________________________________________
Bool_t TDecompQRH::Decompose()
{
// QR decomposition of matrix a by Householder transformations,
//  see Golub & Loan first edition p41 & Sec 6.2.
// First fR is returned in upper triang of fQ and diagR. fQ returned in
// 'u-form' in lower triang of fQ and fW, the latter containing the
//  "Householder betas".
// If the decomposition succeeds, bit kDecomposed is set , otherwise kSingular

   if (TestBit(kDecomposed)) return kTRUE;

   if ( !TestBit(kMatrixSet) ) {
      Error("Decompose()","Matrix has not been set");
      return kFALSE;
   }

   const Int_t nRow   = this->GetNrows();
   const Int_t nCol   = this->GetNcols();
   const Int_t rowLwb = this->GetRowLwb();
   const Int_t colLwb = this->GetColLwb();

   TVectorD diagR;
   Double_t work[kWorkMax];
   if (nCol > kWorkMax) diagR.ResizeTo(nCol);
   else                 diagR.Use(nCol,work);

   if (QRH(fQ,diagR,fUp,fW,fTol)) {
      for (Int_t i = 0; i < nRow; i++) {
         const Int_t ic = (i < nCol) ? i : nCol;
         for (Int_t j = ic ; j < nCol; j++)
            fR(i,j) = fQ(i,j);
      }
      TMatrixDDiag diag(fR); diag = diagR;

      fQ.Shift(rowLwb,0);
      fR.Shift(0,colLwb);

      SetBit(kDecomposed);
   }

   return kTRUE;
}

//______________________________________________________________________________
Bool_t TDecompQRH::QRH(TMatrixD &q,TVectorD &diagR,TVectorD &up,TVectorD &w,Double_t tol)
{
// Decomposition function .

   const Int_t nRow = q.GetNrows();
   const Int_t nCol = q.GetNcols();

   const Int_t n = (nRow <= nCol) ? nRow-1 : nCol;

   for (Int_t k = 0 ; k < n ; k++) {
      const TVectorD qc_k = TMatrixDColumn_const(q,k);
      if (!DefHouseHolder(qc_k,k,k+1,up(k),w(k),tol))
         return kFALSE;
      diagR(k) = qc_k(k)-up(k);
      if (k < nCol-1) {
         // Apply HouseHolder to sub-matrix
         for (Int_t j = k+1; j < nCol; j++) {
            TMatrixDColumn qc_j = TMatrixDColumn(q,j);
            ApplyHouseHolder(qc_k,up(k),w(k),k,k+1,qc_j);
         }
      }
   }

   if (nRow <= nCol) {
      diagR(nRow-1) = q(nRow-1,nRow-1);
      up(nRow-1) = 0;
      w(nRow-1)  = 0;
   }

   return kTRUE;
}

//______________________________________________________________________________
void TDecompQRH::SetMatrix(const TMatrixD &a)
{
// Set matrix to be decomposed

   R__ASSERT(a.IsValid());

   ResetStatus();
   if (a.GetNrows() < a.GetNcols()) {
      Error("TDecompQRH(const TMatrixD &","matrix rows should be >= columns");
      return;
   }

   SetBit(kMatrixSet);
   fCondition = a.Norm1();

   fRowLwb = a.GetRowLwb();
   fColLwb = a.GetColLwb();
   const Int_t nRow = a.GetNrows();
   const Int_t nCol = a.GetNcols();

   fQ.ResizeTo(nRow,nCol);
   memcpy(fQ.GetMatrixArray(),a.GetMatrixArray(),nRow*nCol*sizeof(Double_t));
   fR.ResizeTo(nCol,nCol);
   if (nRow <= nCol) {
      fW.ResizeTo(nRow);
      fUp.ResizeTo(nRow);
   } else {
      fW.ResizeTo(nCol);
      fUp.ResizeTo(nCol);
   }
}

//______________________________________________________________________________
Bool_t TDecompQRH::Solve(TVectorD &b)
{
// Solve Ax=b assuming the QR form of A is stored in fR,fQ and fW, but assume b
// has *not* been transformed.  Solution returned in b.

   R__ASSERT(b.IsValid());
   if (TestBit(kSingular)) {
      Error("Solve()","Matrix is singular");
      return kFALSE;
   }
   if ( !TestBit(kDecomposed) ) {
      if (!Decompose()) {
         Error("Solve()","Decomposition failed");
         return kFALSE;
      }
   }

   if (fQ.GetNrows() != b.GetNrows() || fQ.GetRowLwb() != b.GetLwb()) {
      Error("Solve(TVectorD &","vector and matrix incompatible");
      return kFALSE;
   }

   const Int_t nQRow = fQ.GetNrows();
   const Int_t nQCol = fQ.GetNcols();

   // Calculate  Q^T.b
   const Int_t nQ = (nQRow <= nQCol) ? nQRow-1 : nQCol;
   for (Int_t k = 0; k < nQ; k++) {
      const TVectorD qc_k = TMatrixDColumn_const(fQ,k);
      ApplyHouseHolder(qc_k,fUp(k),fW(k),k,k+1,b);
   }

   const Int_t nRCol = fR.GetNcols();

   const Double_t *pR = fR.GetMatrixArray();
         Double_t *pb = b.GetMatrixArray();

   // Backward substitution
   for (Int_t i = nRCol-1; i >= 0; i--) {
      const Int_t off_i = i*nRCol;
      Double_t r = pb[i];
      for (Int_t j = i+1; j < nRCol; j++)
         r -= pR[off_i+j]*pb[j];
      if (TMath::Abs(pR[off_i+i]) < fTol)
      {
         Error("Solve(TVectorD &)","R[%d,%d]=%.4e < %.4e",i,i,pR[off_i+i],fTol);
         return kFALSE;
      }
      pb[i] = r/pR[off_i+i];
   }

   return kTRUE;
}

//______________________________________________________________________________
Bool_t TDecompQRH::Solve(TMatrixDColumn &cb)
{
// Solve Ax=b assuming the QR form of A is stored in fR,fQ and fW, but assume b
// has *not* been transformed.  Solution returned in b.

   TMatrixDBase *b = const_cast<TMatrixDBase *>(cb.GetMatrix());
   R__ASSERT(b->IsValid());
   if (TestBit(kSingular)) {
      Error("Solve()","Matrix is singular");
      return kFALSE;
   }
   if ( !TestBit(kDecomposed) ) {
      if (!Decompose()) {
         Error("Solve()","Decomposition failed");
         return kFALSE;
      }
   }

   if (fQ.GetNrows() != b->GetNrows() || fQ.GetRowLwb() != b->GetRowLwb())
   {
      Error("Solve(TMatrixDColumn &","vector and matrix incompatible");
      return kFALSE;
   }

   const Int_t nQRow = fQ.GetNrows();
   const Int_t nQCol = fQ.GetNcols();

   // Calculate  Q^T.b
   const Int_t nQ = (nQRow <= nQCol) ? nQRow-1 : nQCol;
   for (Int_t k = 0; k < nQ; k++) {
      const TVectorD qc_k = TMatrixDColumn_const(fQ,k);
      ApplyHouseHolder(qc_k,fUp(k),fW(k),k,k+1,cb);
   }

   const Int_t nRCol = fR.GetNcols();

   const Double_t *pR  = fR.GetMatrixArray();
         Double_t *pcb = cb.GetPtr();
   const Int_t     inc = cb.GetInc();

   // Backward substitution
   for (Int_t i = nRCol-1; i >= 0; i--) {
      const Int_t off_i  = i*nRCol;
      const Int_t off_i2 = i*inc;
      Double_t r = pcb[off_i2];
      for (Int_t j = i+1; j < nRCol; j++)
         r -= pR[off_i+j]*pcb[j*inc];
      if (TMath::Abs(pR[off_i+i]) < fTol)
      {
         Error("Solve(TMatrixDColumn &)","R[%d,%d]=%.4e < %.4e",i,i,pR[off_i+i],fTol);
         return kFALSE;
      }
      pcb[off_i2] = r/pR[off_i+i];
   }

   return kTRUE;
}

//______________________________________________________________________________
Bool_t TDecompQRH::TransSolve(TVectorD &b)
{
// Solve A^T x=b assuming the QR form of A is stored in fR,fQ and fW, but assume b
// has *not* been transformed.  Solution returned in b.

   R__ASSERT(b.IsValid());
   if (TestBit(kSingular)) {
      Error("TransSolve()","Matrix is singular");
      return kFALSE;
   }
   if ( !TestBit(kDecomposed) ) {
      if (!Decompose()) {
         Error("TransSolve()","Decomposition failed");
         return kFALSE;
      }
   }

   if (fQ.GetNrows() != fQ.GetNcols() || fQ.GetRowLwb() != fQ.GetColLwb()) {
      Error("TransSolve(TVectorD &","matrix should be square");
      return kFALSE;
   }

   if (fR.GetNrows() != b.GetNrows() || fR.GetRowLwb() != b.GetLwb()) {
      Error("TransSolve(TVectorD &","vector and matrix incompatible");
      return kFALSE;
   }

   const Double_t *pR = fR.GetMatrixArray();
         Double_t *pb = b.GetMatrixArray();

   const Int_t nRCol = fR.GetNcols();

   // Backward substitution
   for (Int_t i = 0; i < nRCol; i++) {
      const Int_t off_i = i*nRCol;
      Double_t r = pb[i];
      for (Int_t j = 0; j < i; j++) {
         const Int_t off_j = j*nRCol;
         r -= pR[off_j+i]*pb[j];
      }
      if (TMath::Abs(pR[off_i+i]) < fTol)
      {
         Error("TransSolve(TVectorD &)","R[%d,%d]=%.4e < %.4e",i,i,pR[off_i+i],fTol);
         return kFALSE;
      }
      pb[i] = r/pR[off_i+i];
   }

   const Int_t nQRow = fQ.GetNrows();

   // Calculate  Q.b; it was checked nQRow == nQCol
   for (Int_t k = nQRow-1; k >= 0; k--) {
      const TVectorD qc_k = TMatrixDColumn_const(fQ,k);
      ApplyHouseHolder(qc_k,fUp(k),fW(k),k,k+1,b);
   }

   return kTRUE;
}

//______________________________________________________________________________
Bool_t TDecompQRH::TransSolve(TMatrixDColumn &cb)
{
// Solve A^T x=b assuming the QR form of A is stored in fR,fQ and fW, but assume b
// has *not* been transformed.  Solution returned in b.

   TMatrixDBase *b = const_cast<TMatrixDBase *>(cb.GetMatrix());
   R__ASSERT(b->IsValid());
   if (TestBit(kSingular)) {
      Error("TransSolve()","Matrix is singular");
      return kFALSE;
   }
   if ( !TestBit(kDecomposed) ) {
      if (!Decompose()) {
         Error("TransSolve()","Decomposition failed");
         return kFALSE;
      }
   }

   if (fQ.GetNrows() != fQ.GetNcols() || fQ.GetRowLwb() != fQ.GetColLwb()) {
      Error("TransSolve(TMatrixDColumn &","matrix should be square");
      return kFALSE;
   }

   if (fR.GetNrows() != b->GetNrows() || fR.GetRowLwb() != b->GetRowLwb()) {
      Error("TransSolve(TMatrixDColumn &","vector and matrix incompatible");
      return kFALSE;
   }

   const Double_t *pR  = fR.GetMatrixArray();
         Double_t *pcb = cb.GetPtr();
   const Int_t     inc = cb.GetInc();

   const Int_t nRCol = fR.GetNcols();

   // Backward substitution
   for (Int_t i = 0; i < nRCol; i++) {
      const Int_t off_i  = i*nRCol;
      const Int_t off_i2 = i*inc;
      Double_t r = pcb[off_i2];
      for (Int_t j = 0; j < i; j++) {
         const Int_t off_j = j*nRCol;
         r -= pR[off_j+i]*pcb[j*inc];
      }
      if (TMath::Abs(pR[off_i+i]) < fTol)
      {
         Error("TransSolve(TMatrixDColumn &)","R[%d,%d]=%.4e < %.4e",i,i,pR[off_i+i],fTol);
         return kFALSE;
      }
      pcb[off_i2] = r/pR[off_i+i];
   }

   const Int_t nQRow = fQ.GetNrows();

   // Calculate  Q.b; it was checked nQRow == nQCol
   for (Int_t k = nQRow-1; k >= 0; k--) {
      const TVectorD qc_k = TMatrixDColumn_const(fQ,k);
      ApplyHouseHolder(qc_k,fUp(k),fW(k),k,k+1,cb);
   }

   return kTRUE;
}

//______________________________________________________________________________
void TDecompQRH::Det(Double_t &d1,Double_t &d2)
{
// This routine calculates the absolute (!) value of the determinant
// |det| = d1*TMath::Power(2.,d2)

   if ( !TestBit(kDetermined) ) {
      if ( !TestBit(kDecomposed) )
        Decompose();
      if (TestBit(kSingular)) {
         fDet1 = 0.0;
         fDet2 = 0.0;
      } else
         TDecompBase::Det(d1,d2);
      SetBit(kDetermined);
   }
   d1 = fDet1;
   d2 = fDet2;
}

//______________________________________________________________________________
Bool_t TDecompQRH::Invert(TMatrixD &inv)
{
// For a matrix A(m,n), its inverse A_inv is defined as A * A_inv = A_inv * A = unit
// The user should always supply a matrix of size (m x m) !
// If m > n , only the (n x m) part of the returned (pseudo inverse) matrix
// should be used .

   if (inv.GetNrows()  != GetNrows()  || inv.GetNcols()  != GetNrows() ||
       inv.GetRowLwb() != GetRowLwb() || inv.GetColLwb() != GetColLwb()) {
      Error("Invert(TMatrixD &","Input matrix has wrong shape");
      return kFALSE;
   }

   inv.UnitMatrix();
   const Bool_t status = MultiSolve(inv);

   return status;
}

//______________________________________________________________________________
TMatrixD TDecompQRH::Invert(Bool_t &status)
{
// For a matrix A(m,n), its inverse A_inv is defined as A * A_inv = A_inv * A = unit
// (n x m) Ainv is returned .

   const Int_t rowLwb = GetRowLwb();
   const Int_t colLwb = GetColLwb();
   const Int_t rowUpb = rowLwb+GetNrows()-1;
   TMatrixD inv(rowLwb,rowUpb,colLwb,colLwb+GetNrows()-1);
   inv.UnitMatrix();
   status = MultiSolve(inv);
   inv.ResizeTo(rowLwb,rowLwb+GetNcols()-1,colLwb,colLwb+GetNrows()-1);

   return inv;
}

//______________________________________________________________________________
void TDecompQRH::Print(Option_t *opt) const
{
// Print the class members

   TDecompBase::Print(opt);
   fQ.Print("fQ");
   fR.Print("fR");
   fUp.Print("fUp");
   fW.Print("fW");
}

//______________________________________________________________________________
TDecompQRH &TDecompQRH::operator=(const TDecompQRH &source)
{
// Assignment operator

   if (this != &source) {
      TDecompBase::operator=(source);
      fQ.ResizeTo(source.fQ);
      fR.ResizeTo(source.fR);
      fUp.ResizeTo(source.fUp);
      fW.ResizeTo(source.fW);
      fQ  = source.fQ;
      fR  = source.fR;
      fUp = source.fUp;
      fW  = source.fW;
   }
   return *this;
}
 TDecompQRH.cxx:1
 TDecompQRH.cxx:2
 TDecompQRH.cxx:3
 TDecompQRH.cxx:4
 TDecompQRH.cxx:5
 TDecompQRH.cxx:6
 TDecompQRH.cxx:7
 TDecompQRH.cxx:8
 TDecompQRH.cxx:9
 TDecompQRH.cxx:10
 TDecompQRH.cxx:11
 TDecompQRH.cxx:12
 TDecompQRH.cxx:13
 TDecompQRH.cxx:14
 TDecompQRH.cxx:15
 TDecompQRH.cxx:16
 TDecompQRH.cxx:17
 TDecompQRH.cxx:18
 TDecompQRH.cxx:19
 TDecompQRH.cxx:20
 TDecompQRH.cxx:21
 TDecompQRH.cxx:22
 TDecompQRH.cxx:23
 TDecompQRH.cxx:24
 TDecompQRH.cxx:25
 TDecompQRH.cxx:26
 TDecompQRH.cxx:27
 TDecompQRH.cxx:28
 TDecompQRH.cxx:29
 TDecompQRH.cxx:30
 TDecompQRH.cxx:31
 TDecompQRH.cxx:32
 TDecompQRH.cxx:33
 TDecompQRH.cxx:34
 TDecompQRH.cxx:35
 TDecompQRH.cxx:36
 TDecompQRH.cxx:37
 TDecompQRH.cxx:38
 TDecompQRH.cxx:39
 TDecompQRH.cxx:40
 TDecompQRH.cxx:41
 TDecompQRH.cxx:42
 TDecompQRH.cxx:43
 TDecompQRH.cxx:44
 TDecompQRH.cxx:45
 TDecompQRH.cxx:46
 TDecompQRH.cxx:47
 TDecompQRH.cxx:48
 TDecompQRH.cxx:49
 TDecompQRH.cxx:50
 TDecompQRH.cxx:51
 TDecompQRH.cxx:52
 TDecompQRH.cxx:53
 TDecompQRH.cxx:54
 TDecompQRH.cxx:55
 TDecompQRH.cxx:56
 TDecompQRH.cxx:57
 TDecompQRH.cxx:58
 TDecompQRH.cxx:59
 TDecompQRH.cxx:60
 TDecompQRH.cxx:61
 TDecompQRH.cxx:62
 TDecompQRH.cxx:63
 TDecompQRH.cxx:64
 TDecompQRH.cxx:65
 TDecompQRH.cxx:66
 TDecompQRH.cxx:67
 TDecompQRH.cxx:68
 TDecompQRH.cxx:69
 TDecompQRH.cxx:70
 TDecompQRH.cxx:71
 TDecompQRH.cxx:72
 TDecompQRH.cxx:73
 TDecompQRH.cxx:74
 TDecompQRH.cxx:75
 TDecompQRH.cxx:76
 TDecompQRH.cxx:77
 TDecompQRH.cxx:78
 TDecompQRH.cxx:79
 TDecompQRH.cxx:80
 TDecompQRH.cxx:81
 TDecompQRH.cxx:82
 TDecompQRH.cxx:83
 TDecompQRH.cxx:84
 TDecompQRH.cxx:85
 TDecompQRH.cxx:86
 TDecompQRH.cxx:87
 TDecompQRH.cxx:88
 TDecompQRH.cxx:89
 TDecompQRH.cxx:90
 TDecompQRH.cxx:91
 TDecompQRH.cxx:92
 TDecompQRH.cxx:93
 TDecompQRH.cxx:94
 TDecompQRH.cxx:95
 TDecompQRH.cxx:96
 TDecompQRH.cxx:97
 TDecompQRH.cxx:98
 TDecompQRH.cxx:99
 TDecompQRH.cxx:100
 TDecompQRH.cxx:101
 TDecompQRH.cxx:102
 TDecompQRH.cxx:103
 TDecompQRH.cxx:104
 TDecompQRH.cxx:105
 TDecompQRH.cxx:106
 TDecompQRH.cxx:107
 TDecompQRH.cxx:108
 TDecompQRH.cxx:109
 TDecompQRH.cxx:110
 TDecompQRH.cxx:111
 TDecompQRH.cxx:112
 TDecompQRH.cxx:113
 TDecompQRH.cxx:114
 TDecompQRH.cxx:115
 TDecompQRH.cxx:116
 TDecompQRH.cxx:117
 TDecompQRH.cxx:118
 TDecompQRH.cxx:119
 TDecompQRH.cxx:120
 TDecompQRH.cxx:121
 TDecompQRH.cxx:122
 TDecompQRH.cxx:123
 TDecompQRH.cxx:124
 TDecompQRH.cxx:125
 TDecompQRH.cxx:126
 TDecompQRH.cxx:127
 TDecompQRH.cxx:128
 TDecompQRH.cxx:129
 TDecompQRH.cxx:130
 TDecompQRH.cxx:131
 TDecompQRH.cxx:132
 TDecompQRH.cxx:133
 TDecompQRH.cxx:134
 TDecompQRH.cxx:135
 TDecompQRH.cxx:136
 TDecompQRH.cxx:137
 TDecompQRH.cxx:138
 TDecompQRH.cxx:139
 TDecompQRH.cxx:140
 TDecompQRH.cxx:141
 TDecompQRH.cxx:142
 TDecompQRH.cxx:143
 TDecompQRH.cxx:144
 TDecompQRH.cxx:145
 TDecompQRH.cxx:146
 TDecompQRH.cxx:147
 TDecompQRH.cxx:148
 TDecompQRH.cxx:149
 TDecompQRH.cxx:150
 TDecompQRH.cxx:151
 TDecompQRH.cxx:152
 TDecompQRH.cxx:153
 TDecompQRH.cxx:154
 TDecompQRH.cxx:155
 TDecompQRH.cxx:156
 TDecompQRH.cxx:157
 TDecompQRH.cxx:158
 TDecompQRH.cxx:159
 TDecompQRH.cxx:160
 TDecompQRH.cxx:161
 TDecompQRH.cxx:162
 TDecompQRH.cxx:163
 TDecompQRH.cxx:164
 TDecompQRH.cxx:165
 TDecompQRH.cxx:166
 TDecompQRH.cxx:167
 TDecompQRH.cxx:168
 TDecompQRH.cxx:169
 TDecompQRH.cxx:170
 TDecompQRH.cxx:171
 TDecompQRH.cxx:172
 TDecompQRH.cxx:173
 TDecompQRH.cxx:174
 TDecompQRH.cxx:175
 TDecompQRH.cxx:176
 TDecompQRH.cxx:177
 TDecompQRH.cxx:178
 TDecompQRH.cxx:179
 TDecompQRH.cxx:180
 TDecompQRH.cxx:181
 TDecompQRH.cxx:182
 TDecompQRH.cxx:183
 TDecompQRH.cxx:184
 TDecompQRH.cxx:185
 TDecompQRH.cxx:186
 TDecompQRH.cxx:187
 TDecompQRH.cxx:188
 TDecompQRH.cxx:189
 TDecompQRH.cxx:190
 TDecompQRH.cxx:191
 TDecompQRH.cxx:192
 TDecompQRH.cxx:193
 TDecompQRH.cxx:194
 TDecompQRH.cxx:195
 TDecompQRH.cxx:196
 TDecompQRH.cxx:197
 TDecompQRH.cxx:198
 TDecompQRH.cxx:199
 TDecompQRH.cxx:200
 TDecompQRH.cxx:201
 TDecompQRH.cxx:202
 TDecompQRH.cxx:203
 TDecompQRH.cxx:204
 TDecompQRH.cxx:205
 TDecompQRH.cxx:206
 TDecompQRH.cxx:207
 TDecompQRH.cxx:208
 TDecompQRH.cxx:209
 TDecompQRH.cxx:210
 TDecompQRH.cxx:211
 TDecompQRH.cxx:212
 TDecompQRH.cxx:213
 TDecompQRH.cxx:214
 TDecompQRH.cxx:215
 TDecompQRH.cxx:216
 TDecompQRH.cxx:217
 TDecompQRH.cxx:218
 TDecompQRH.cxx:219
 TDecompQRH.cxx:220
 TDecompQRH.cxx:221
 TDecompQRH.cxx:222
 TDecompQRH.cxx:223
 TDecompQRH.cxx:224
 TDecompQRH.cxx:225
 TDecompQRH.cxx:226
 TDecompQRH.cxx:227
 TDecompQRH.cxx:228
 TDecompQRH.cxx:229
 TDecompQRH.cxx:230
 TDecompQRH.cxx:231
 TDecompQRH.cxx:232
 TDecompQRH.cxx:233
 TDecompQRH.cxx:234
 TDecompQRH.cxx:235
 TDecompQRH.cxx:236
 TDecompQRH.cxx:237
 TDecompQRH.cxx:238
 TDecompQRH.cxx:239
 TDecompQRH.cxx:240
 TDecompQRH.cxx:241
 TDecompQRH.cxx:242
 TDecompQRH.cxx:243
 TDecompQRH.cxx:244
 TDecompQRH.cxx:245
 TDecompQRH.cxx:246
 TDecompQRH.cxx:247
 TDecompQRH.cxx:248
 TDecompQRH.cxx:249
 TDecompQRH.cxx:250
 TDecompQRH.cxx:251
 TDecompQRH.cxx:252
 TDecompQRH.cxx:253
 TDecompQRH.cxx:254
 TDecompQRH.cxx:255
 TDecompQRH.cxx:256
 TDecompQRH.cxx:257
 TDecompQRH.cxx:258
 TDecompQRH.cxx:259
 TDecompQRH.cxx:260
 TDecompQRH.cxx:261
 TDecompQRH.cxx:262
 TDecompQRH.cxx:263
 TDecompQRH.cxx:264
 TDecompQRH.cxx:265
 TDecompQRH.cxx:266
 TDecompQRH.cxx:267
 TDecompQRH.cxx:268
 TDecompQRH.cxx:269
 TDecompQRH.cxx:270
 TDecompQRH.cxx:271
 TDecompQRH.cxx:272
 TDecompQRH.cxx:273
 TDecompQRH.cxx:274
 TDecompQRH.cxx:275
 TDecompQRH.cxx:276
 TDecompQRH.cxx:277
 TDecompQRH.cxx:278
 TDecompQRH.cxx:279
 TDecompQRH.cxx:280
 TDecompQRH.cxx:281
 TDecompQRH.cxx:282
 TDecompQRH.cxx:283
 TDecompQRH.cxx:284
 TDecompQRH.cxx:285
 TDecompQRH.cxx:286
 TDecompQRH.cxx:287
 TDecompQRH.cxx:288
 TDecompQRH.cxx:289
 TDecompQRH.cxx:290
 TDecompQRH.cxx:291
 TDecompQRH.cxx:292
 TDecompQRH.cxx:293
 TDecompQRH.cxx:294
 TDecompQRH.cxx:295
 TDecompQRH.cxx:296
 TDecompQRH.cxx:297
 TDecompQRH.cxx:298
 TDecompQRH.cxx:299
 TDecompQRH.cxx:300
 TDecompQRH.cxx:301
 TDecompQRH.cxx:302
 TDecompQRH.cxx:303
 TDecompQRH.cxx:304
 TDecompQRH.cxx:305
 TDecompQRH.cxx:306
 TDecompQRH.cxx:307
 TDecompQRH.cxx:308
 TDecompQRH.cxx:309
 TDecompQRH.cxx:310
 TDecompQRH.cxx:311
 TDecompQRH.cxx:312
 TDecompQRH.cxx:313
 TDecompQRH.cxx:314
 TDecompQRH.cxx:315
 TDecompQRH.cxx:316
 TDecompQRH.cxx:317
 TDecompQRH.cxx:318
 TDecompQRH.cxx:319
 TDecompQRH.cxx:320
 TDecompQRH.cxx:321
 TDecompQRH.cxx:322
 TDecompQRH.cxx:323
 TDecompQRH.cxx:324
 TDecompQRH.cxx:325
 TDecompQRH.cxx:326
 TDecompQRH.cxx:327
 TDecompQRH.cxx:328
 TDecompQRH.cxx:329
 TDecompQRH.cxx:330
 TDecompQRH.cxx:331
 TDecompQRH.cxx:332
 TDecompQRH.cxx:333
 TDecompQRH.cxx:334
 TDecompQRH.cxx:335
 TDecompQRH.cxx:336
 TDecompQRH.cxx:337
 TDecompQRH.cxx:338
 TDecompQRH.cxx:339
 TDecompQRH.cxx:340
 TDecompQRH.cxx:341
 TDecompQRH.cxx:342
 TDecompQRH.cxx:343
 TDecompQRH.cxx:344
 TDecompQRH.cxx:345
 TDecompQRH.cxx:346
 TDecompQRH.cxx:347
 TDecompQRH.cxx:348
 TDecompQRH.cxx:349
 TDecompQRH.cxx:350
 TDecompQRH.cxx:351
 TDecompQRH.cxx:352
 TDecompQRH.cxx:353
 TDecompQRH.cxx:354
 TDecompQRH.cxx:355
 TDecompQRH.cxx:356
 TDecompQRH.cxx:357
 TDecompQRH.cxx:358
 TDecompQRH.cxx:359
 TDecompQRH.cxx:360
 TDecompQRH.cxx:361
 TDecompQRH.cxx:362
 TDecompQRH.cxx:363
 TDecompQRH.cxx:364
 TDecompQRH.cxx:365
 TDecompQRH.cxx:366
 TDecompQRH.cxx:367
 TDecompQRH.cxx:368
 TDecompQRH.cxx:369
 TDecompQRH.cxx:370
 TDecompQRH.cxx:371
 TDecompQRH.cxx:372
 TDecompQRH.cxx:373
 TDecompQRH.cxx:374
 TDecompQRH.cxx:375
 TDecompQRH.cxx:376
 TDecompQRH.cxx:377
 TDecompQRH.cxx:378
 TDecompQRH.cxx:379
 TDecompQRH.cxx:380
 TDecompQRH.cxx:381
 TDecompQRH.cxx:382
 TDecompQRH.cxx:383
 TDecompQRH.cxx:384
 TDecompQRH.cxx:385
 TDecompQRH.cxx:386
 TDecompQRH.cxx:387
 TDecompQRH.cxx:388
 TDecompQRH.cxx:389
 TDecompQRH.cxx:390
 TDecompQRH.cxx:391
 TDecompQRH.cxx:392
 TDecompQRH.cxx:393
 TDecompQRH.cxx:394
 TDecompQRH.cxx:395
 TDecompQRH.cxx:396
 TDecompQRH.cxx:397
 TDecompQRH.cxx:398
 TDecompQRH.cxx:399
 TDecompQRH.cxx:400
 TDecompQRH.cxx:401
 TDecompQRH.cxx:402
 TDecompQRH.cxx:403
 TDecompQRH.cxx:404
 TDecompQRH.cxx:405
 TDecompQRH.cxx:406
 TDecompQRH.cxx:407
 TDecompQRH.cxx:408
 TDecompQRH.cxx:409
 TDecompQRH.cxx:410
 TDecompQRH.cxx:411
 TDecompQRH.cxx:412
 TDecompQRH.cxx:413
 TDecompQRH.cxx:414
 TDecompQRH.cxx:415
 TDecompQRH.cxx:416
 TDecompQRH.cxx:417
 TDecompQRH.cxx:418
 TDecompQRH.cxx:419
 TDecompQRH.cxx:420
 TDecompQRH.cxx:421
 TDecompQRH.cxx:422
 TDecompQRH.cxx:423
 TDecompQRH.cxx:424
 TDecompQRH.cxx:425
 TDecompQRH.cxx:426
 TDecompQRH.cxx:427
 TDecompQRH.cxx:428
 TDecompQRH.cxx:429
 TDecompQRH.cxx:430
 TDecompQRH.cxx:431
 TDecompQRH.cxx:432
 TDecompQRH.cxx:433
 TDecompQRH.cxx:434
 TDecompQRH.cxx:435
 TDecompQRH.cxx:436
 TDecompQRH.cxx:437
 TDecompQRH.cxx:438
 TDecompQRH.cxx:439
 TDecompQRH.cxx:440
 TDecompQRH.cxx:441
 TDecompQRH.cxx:442
 TDecompQRH.cxx:443
 TDecompQRH.cxx:444
 TDecompQRH.cxx:445
 TDecompQRH.cxx:446
 TDecompQRH.cxx:447
 TDecompQRH.cxx:448
 TDecompQRH.cxx:449
 TDecompQRH.cxx:450
 TDecompQRH.cxx:451
 TDecompQRH.cxx:452
 TDecompQRH.cxx:453
 TDecompQRH.cxx:454
 TDecompQRH.cxx:455
 TDecompQRH.cxx:456
 TDecompQRH.cxx:457
 TDecompQRH.cxx:458
 TDecompQRH.cxx:459
 TDecompQRH.cxx:460
 TDecompQRH.cxx:461
 TDecompQRH.cxx:462
 TDecompQRH.cxx:463
 TDecompQRH.cxx:464
 TDecompQRH.cxx:465
 TDecompQRH.cxx:466
 TDecompQRH.cxx:467
 TDecompQRH.cxx:468
 TDecompQRH.cxx:469
 TDecompQRH.cxx:470
 TDecompQRH.cxx:471
 TDecompQRH.cxx:472
 TDecompQRH.cxx:473
 TDecompQRH.cxx:474
 TDecompQRH.cxx:475
 TDecompQRH.cxx:476
 TDecompQRH.cxx:477
 TDecompQRH.cxx:478
 TDecompQRH.cxx:479
 TDecompQRH.cxx:480
 TDecompQRH.cxx:481
 TDecompQRH.cxx:482
 TDecompQRH.cxx:483
 TDecompQRH.cxx:484
 TDecompQRH.cxx:485
 TDecompQRH.cxx:486
 TDecompQRH.cxx:487
 TDecompQRH.cxx:488
 TDecompQRH.cxx:489
 TDecompQRH.cxx:490
 TDecompQRH.cxx:491
 TDecompQRH.cxx:492
 TDecompQRH.cxx:493
 TDecompQRH.cxx:494
 TDecompQRH.cxx:495
 TDecompQRH.cxx:496
 TDecompQRH.cxx:497
 TDecompQRH.cxx:498
 TDecompQRH.cxx:499
 TDecompQRH.cxx:500
 TDecompQRH.cxx:501
 TDecompQRH.cxx:502
 TDecompQRH.cxx:503
 TDecompQRH.cxx:504
 TDecompQRH.cxx:505
 TDecompQRH.cxx:506
 TDecompQRH.cxx:507
 TDecompQRH.cxx:508
 TDecompQRH.cxx:509
 TDecompQRH.cxx:510
 TDecompQRH.cxx:511
 TDecompQRH.cxx:512
 TDecompQRH.cxx:513
 TDecompQRH.cxx:514
 TDecompQRH.cxx:515
 TDecompQRH.cxx:516
 TDecompQRH.cxx:517
 TDecompQRH.cxx:518
 TDecompQRH.cxx:519
 TDecompQRH.cxx:520
 TDecompQRH.cxx:521
 TDecompQRH.cxx:522
 TDecompQRH.cxx:523
 TDecompQRH.cxx:524
 TDecompQRH.cxx:525
 TDecompQRH.cxx:526
 TDecompQRH.cxx:527
 TDecompQRH.cxx:528
 TDecompQRH.cxx:529
 TDecompQRH.cxx:530
 TDecompQRH.cxx:531
 TDecompQRH.cxx:532
 TDecompQRH.cxx:533
 TDecompQRH.cxx:534
 TDecompQRH.cxx:535
 TDecompQRH.cxx:536
 TDecompQRH.cxx:537
 TDecompQRH.cxx:538
 TDecompQRH.cxx:539
 TDecompQRH.cxx:540
 TDecompQRH.cxx:541
 TDecompQRH.cxx:542
 TDecompQRH.cxx:543
 TDecompQRH.cxx:544
 TDecompQRH.cxx:545
 TDecompQRH.cxx:546
 TDecompQRH.cxx:547
 TDecompQRH.cxx:548
 TDecompQRH.cxx:549
 TDecompQRH.cxx:550
 TDecompQRH.cxx:551
 TDecompQRH.cxx:552
 TDecompQRH.cxx:553
 TDecompQRH.cxx:554
 TDecompQRH.cxx:555
 TDecompQRH.cxx:556
 TDecompQRH.cxx:557
 TDecompQRH.cxx:558
 TDecompQRH.cxx:559
 TDecompQRH.cxx:560
 TDecompQRH.cxx:561
 TDecompQRH.cxx:562
 TDecompQRH.cxx:563
 TDecompQRH.cxx:564