Warning, file /include/root/TDecompLU.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TDecompLU
0013 #define ROOT_TDecompLU
0014
0015
0016
0017
0018
0019
0020
0021 #include "TDecompBase.h"
0022
0023 class TDecompLU : public TDecompBase
0024 {
0025 protected :
0026
0027 Int_t fImplicitPivot;
0028
0029 Int_t fNIndex;
0030 Int_t *fIndex;
0031 Double_t fSign;
0032 TMatrixD fLU;
0033
0034
0035 static Bool_t DecomposeLUCrout(TMatrixD &lu,Int_t *index,Double_t &sign,Double_t tol,Int_t &nrZeros);
0036 static Bool_t DecomposeLUGauss(TMatrixD &lu,Int_t *index,Double_t &sign,Double_t tol,Int_t &nrZeros);
0037
0038 const TMatrixDBase &GetDecompMatrix() const override { return fLU; }
0039
0040 public :
0041
0042 TDecompLU();
0043 explicit TDecompLU(Int_t nrows);
0044 TDecompLU(Int_t row_lwb,Int_t row_upb);
0045 TDecompLU(const TMatrixD &m,Double_t tol = 0.0,Int_t implicit = 1);
0046 TDecompLU(const TDecompLU &another);
0047 ~TDecompLU() override {if (fIndex) delete [] fIndex; fIndex = nullptr; }
0048
0049 const TMatrixD GetMatrix ();
0050 Int_t GetNrows () const override { return fLU.GetNrows(); }
0051 Int_t GetNcols () const override { return fLU.GetNcols(); }
0052 const TMatrixD &GetLU () { if ( !TestBit(kDecomposed) ) Decompose();
0053 return fLU; }
0054
0055 virtual void SetMatrix (const TMatrixD &a);
0056
0057 Bool_t Decompose () override;
0058 Bool_t Solve ( TVectorD &b) override;
0059 TVectorD Solve (const TVectorD& b,Bool_t &ok) override { TVectorD x = b; ok = Solve(x); return x; }
0060 Bool_t Solve ( TMatrixDColumn &b) override;
0061 Bool_t TransSolve ( TVectorD &b) override;
0062 TVectorD TransSolve (const TVectorD& b,Bool_t &ok) override { TVectorD x = b; ok = TransSolve(x); return x; }
0063 Bool_t TransSolve ( TMatrixDColumn &b) override;
0064 void Det (Double_t &d1,Double_t &d2) override;
0065
0066 static Bool_t InvertLU (TMatrixD &a,Double_t tol,Double_t *det = nullptr);
0067 Bool_t Invert (TMatrixD &inv);
0068 TMatrixD Invert (Bool_t &status);
0069 TMatrixD Invert () { Bool_t status; return Invert(status); }
0070
0071 void Print(Option_t *opt ="") const override;
0072
0073 TDecompLU &operator= (const TDecompLU &source);
0074
0075 ClassDefOverride(TDecompLU,1)
0076 };
0077
0078 #endif