Skip to content
Snippets Groups Projects
Commit b2dc4f4d authored by Lorenzo Moneta's avatar Lorenzo Moneta
Browse files

move the virtual functions GetNCols and GetNrows in the impelmentation file....

move the virtual functions GetNCols and GetNrows in the impelmentation file. No need to have them inlined


git-svn-id: http://root.cern.ch/svn/root/trunk@39525 27541ba8-7e3a-0410-8455-c3a389f83636
parent cf2b73fe
No related branches found
No related tags found
No related merge requests found
......@@ -52,8 +52,8 @@ public :
virtual ~TDecompSVD() {}
const TMatrixD GetMatrix ();
Int_t GetNrows () const { return fU.GetNrows(); }
Int_t GetNcols () const { return fV.GetNcols(); }
virtual Int_t GetNrows () const;
virtual Int_t GetNcols () const;
const TMatrixD &GetU () { if ( !TestBit(kDecomposed) ) Decompose();
return fU; }
const TMatrixD &GetV () { if ( !TestBit(kDecomposed) ) Decompose();
......
......@@ -854,6 +854,17 @@ void TDecompSVD::Det(Double_t &d1,Double_t &d2)
d2 = fDet2;
}
//______________________________________________________________________________
Int_t TDecompSVD::GetNrows () const
{
return fU.GetNrows();
}
Int_t TDecompSVD::GetNcols () const
{
return fV.GetNcols();
}
//______________________________________________________________________________
Bool_t TDecompSVD::Invert(TMatrixD &inv)
{
......@@ -864,7 +875,7 @@ Bool_t TDecompSVD::Invert(TMatrixD &inv)
const Int_t rowLwb = GetRowLwb();
const Int_t colLwb = GetColLwb();
const Int_t nRows = GetNrows();
const Int_t nRows = fU.GetNrows();
if (inv.GetNrows() != nRows || inv.GetNcols() != nRows ||
inv.GetRowLwb() != rowLwb || inv.GetColLwb() != colLwb) {
......@@ -886,11 +897,11 @@ TMatrixD TDecompSVD::Invert(Bool_t &status)
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);
const Int_t rowUpb = rowLwb+fU.GetNrows()-1;
TMatrixD inv(rowLwb,rowUpb,colLwb,colLwb+fU.GetNrows()-1);
inv.UnitMatrix();
status = MultiSolve(inv);
inv.ResizeTo(rowLwb,rowLwb+GetNcols()-1,colLwb,colLwb+GetNrows()-1);
inv.ResizeTo(rowLwb,rowLwb+fV.GetNcols()-1,colLwb,colLwb+fU.GetNrows()-1);
return inv;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment