ROOT logo
ROOT » MATH » MATRIX » TDecompBK

class TDecompBK: public TDecompBase


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.


Function Members (Methods)

public:
TDecompBK()
TDecompBK(Int_t nrows)
TDecompBK(const TDecompBK& another)
TDecompBK(Int_t row_lwb, Int_t row_upb)
TDecompBK(const TMatrixDSym& m, Double_t tol = 0.0)
virtual~TDecompBK()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual Double_tTDecompBase::Condition()
virtual voidTObject::Copy(TObject& object) const
virtual Bool_tDecompose()
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual voidDet(Double_t&, Double_t&)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Int_tTDecompBase::GetColLwb() const
Double_tTDecompBase::GetCondition() const
Double_tTDecompBase::GetDet1() const
Double_tTDecompBase::GetDet2() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual Int_tGetNcols() const
virtual Int_tGetNrows() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tTDecompBase::GetRowLwb() const
virtual const char*TObject::GetTitle() const
Double_tTDecompBase::GetTol() const
const TMatrixD&GetU()
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
TMatrixDSymInvert()
Bool_tInvert(TMatrixDSym& inv)
TMatrixDSymInvert(Bool_t& status)
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTDecompBase::MultiSolve(TMatrixD& B)
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TDecompBK&operator=(const TDecompBK& source)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* opt = "") constMENU
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidSetMatrix(const TMatrixDSym& a)
static voidTObject::SetObjectStat(Bool_t stat)
Double_tTDecompBase::SetTol(Double_t newTol)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Bool_tSolve(TVectorD& b)
virtual Bool_tSolve(TMatrixDColumn& b)
virtual TVectorDSolve(const TVectorD& b, Bool_t& ok)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual Bool_tTransSolve(TVectorD& b)
virtual Bool_tTransSolve(TMatrixDColumn& b)
virtual TVectorDTransSolve(const TVectorD& b, Bool_t& ok)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
static voidTDecompBase::DiagProd(const TVectorD& diag, Double_t tol, Double_t& d1, Double_t& d2)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual const TMatrixDBase&GetDecompMatrix() const
Int_tTDecompBase::Hager(Double_t& est, Int_t iter = 5)
voidTObject::MakeZombie()
voidTDecompBase::ResetStatus()

Data Members

public:
enum TDecompBase::EMatrixDecompStat { kInit
kPatternSet
kValuesSet
kMatrixSet
kDecomposed
kDetermined
kCondition
kSingular
};
enum TDecompBase::[unnamed] { kWorkMax
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Int_tTDecompBase::fColLwbColumn lower bound of decomposed matrix
Double_tTDecompBase::fConditionmatrix condition number
Double_tTDecompBase::fDet1determinant mantissa
Double_tTDecompBase::fDet2determinant exponent for powers of 2
Int_t*fIpiv[fNIpiv] row permutation index
Int_tfNIpivsize of row permutation index
Int_tTDecompBase::fRowLwbRow lower bound of decomposed matrix
Double_tTDecompBase::fTolsqrt(epsilon); epsilon is smallest number number so that 1+epsilon > 1
TMatrixDfUdecomposed matrix so that a = u d u^T

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TDecompBK()
 Default constructor
TDecompBK(Int_t nrows)
 Constructor for (nrows x nrows) symmetric matrix
TDecompBK(Int_t row_lwb,Int_t row_upb)
 Constructor for ([row_lwb..row_upb] x [row_lwb..row_upb]) symmetric matrix
TDecompBK(const TMatrixDSym &a,Double_t tol)
 Constructor for symmetric matrix A
TDecompBK(const TDecompBK &another)
 Copy constructor
Bool_t Decompose()
 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
void SetMatrix(const TMatrixDSym& a)
 Set the matrix to be decomposed, decomposition status is reset.
Bool_t Solve(TVectorD &b)
 Solve Ax=b assuming the BK form of A is stored in fU . Solution returned in b.
Bool_t Solve(TMatrixDColumn &cb)
 Solve Ax=b assuming the BK form of A is stored in fU . Solution returned in b.
Bool_t Invert(TMatrixDSym &inv)
 For a symmetric matrix A(m,m), its inverse A_inv(m,m) is returned .
TMatrixDSym Invert(Bool_t &status)
 For a symmetric matrix A(m,m), its inverse A_inv(m,m) is returned .
void Print(Option_t* opt = "") const
 Print the class members
TDecompBK & operator=(const TDecompBK& source)
 Assigment operator
const TMatrixDBase & GetDecompMatrix() const
{ return fU; }
virtual ~TDecompBK()
{if (fIpiv) delete [] fIpiv; fIpiv = 0; }
Int_t GetNrows() const
{ return fU.GetNrows(); }
Int_t GetNcols() const
{ return fU.GetNcols(); }
const TMatrixD & GetU()
Bool_t Solve( TVectorD &b)
Bool_t TransSolve( TVectorD &b)
{ return Solve(b); }
TVectorD TransSolve(const TVectorD& b, Bool_t& ok)
{ TVectorD x = b; ok = Solve(x); return x; }
Bool_t TransSolve( TMatrixDColumn &b)
{ return Solve(b); }
void Det(Double_t& , Double_t& )
{ MayNotUse("Det(Double_t&,Double_t&)"); }
Bool_t Invert(TMatrixDSym &inv)