library: libMatrix #include "TDecompBK.h" |
Inheritance Chart: | |||||||||||||
|
protected:
virtual const TMatrixDBase& GetDecompMatrix() const public:
TDecompBK() TDecompBK(Int_t nrows) TDecompBK(Int_t row_lwb, Int_t row_upb) TDecompBK(const TMatrixDSym& m, Double_t tol = 0.0) TDecompBK(const TDecompBK& another) virtual ~TDecompBK() static TClass* Class() virtual Bool_t Decompose() virtual void Det(Double_t&, Double_t&) virtual Int_t GetNcols() const virtual Int_t GetNrows() const const TMatrixD& GetU() void Invert(TMatrixDSym& inv) TMatrixDSym Invert() virtual TClass* IsA() const TDecompBK& operator=(const TDecompBK& source) virtual void Print(Option_t* opt = "") const virtual void SetMatrix(const TMatrixDSym& a) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual Bool_t Solve(TVectorD& b) virtual TVectorD Solve(const TVectorD& b, Bool_t& ok) virtual Bool_t Solve(TMatrixDColumn& b) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual Bool_t TransSolve(TVectorD& b) virtual TVectorD TransSolve(const TVectorD& b, Bool_t& ok) virtual Bool_t TransSolve(TMatrixDColumn& b)
protected:
Int_t fNIpiv size of row permutation index Int_t* fIpiv [fNIpiv] row permutation index TMatrixD fU decomposed matrix so that a = u d u^T
The Bunch-Kaufman diagonal pivoting method decomposes a real symmetric matrix A using A = U*D*U^T where U is a product of permutation and unit upper triangular matrices, U^T is the transpose of U, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. U = P(n-1)*U(n-1)* ... *P(k)U(k)* ..., i.e., U is a product of terms P(k)*U(k), where k decreases from n-1 to 0 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and U(k) is a unit upper triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then ( I v 0 ) k-s U(k) = ( 0 I 0 ) s ( 0 0 I ) n-k k-s s n-k If s = 1, D(k) overwrites A(k,k), and v overwrites A(0:k-1,k). If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), and A(k,k), and v overwrites A(0:k-2,k-1:k). fU contains on entry the symmetric matrix A of which only the upper triangular part is referenced . On exit fU contains the block diagonal matrix D and the multipliers used to obtain the factor U, see above . fIpiv if dimension n contains details of the interchanges and the the block structure of D . If (fIPiv(k) > 0, then rows and columns k and fIPiv(k) were interchanged and D(k,k) is a 1-by-1 diagonal block. If IPiv(k) = fIPiv(k-1) < 0, rows and columns k-1 and -IPiv(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2 diagonal block.
Constructor for ([row_lwb..row_upb] x [row_lwb..row_upb]) symmetric matrix
Matrix A is decomposed in components U and D so that A = U*D*U^T If the decomposition succeeds, bit kDecomposed is set , otherwise kSingular
Set the matrix to be decomposed, decomposition status is reset.
Solve Ax=b assuming the BK form of A is stored in fU . Solution returned in b.
Solve Ax=b assuming the BK form of A is stored in fU . Solution returned in b.