12 #ifndef ROOT_TDecompQRH
13 #define ROOT_TDecompQRH
25 class TDecompQRH :
public TDecompBase
35 static Bool_t QRH(TMatrixD &q,TVectorD &diagR,TVectorD &up,TVectorD &w,Double_t tol);
37 virtual const TMatrixDBase &GetDecompMatrix()
const {
return fR; }
41 enum {kWorkMax = 100};
44 TDecompQRH(Int_t nrows,Int_t ncols);
45 TDecompQRH(Int_t row_lwb,Int_t row_upb,Int_t col_lwb,Int_t col_upb);
46 TDecompQRH(
const TMatrixD &m,Double_t tol = 0.0);
47 TDecompQRH(
const TDecompQRH &another);
48 virtual ~TDecompQRH() {}
50 virtual Int_t GetNrows ()
const {
return fQ.GetNrows(); }
51 virtual Int_t GetNcols ()
const {
return fQ.GetNcols(); }
52 virtual const TMatrixD &GetQ () {
if ( !TestBit(kDecomposed) ) Decompose();
54 virtual const TMatrixD &GetR () {
if ( !TestBit(kDecomposed) ) Decompose();
56 virtual const TVectorD &GetUp () {
if ( !TestBit(kDecomposed) ) Decompose();
58 virtual const TVectorD &GetW () {
if ( !TestBit(kDecomposed) ) Decompose();
61 virtual void SetMatrix(
const TMatrixD &a);
63 virtual Bool_t Decompose ();
64 virtual Bool_t Solve ( TVectorD &b);
65 virtual TVectorD Solve (
const TVectorD& b,Bool_t &ok) { TVectorD x = b; ok = Solve(x);
return x; }
66 virtual Bool_t Solve ( TMatrixDColumn &b);
67 virtual Bool_t TransSolve ( TVectorD &b);
68 virtual TVectorD TransSolve (
const TVectorD& b,Bool_t &ok) { TVectorD x = b; ok = TransSolve(x);
return x; }
69 virtual Bool_t TransSolve ( TMatrixDColumn &b);
70 virtual void Det (Double_t &d1,Double_t &d2);
72 Bool_t Invert (TMatrixD &inv);
73 TMatrixD Invert (Bool_t &status);
74 TMatrixD Invert () { Bool_t status;
return Invert(status); }
76 void Print(Option_t *opt =
"")
const;
78 TDecompQRH &operator= (
const TDecompQRH &source);
80 ClassDef(TDecompQRH,1)