We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See https://root-forum.cern.ch/t/shift-of-row-index-in-tmatrixtsparse/56525
According to Eddy it's a bug in the initialization of a sparse matrix with a row index not starting at 0.
void testSparse(Int_t msize=5) { TMatrixDSparse m1(1,4,0,msize-1); { Int_t nr = 4*msize; Int_t *irow = new Int_t[nr]; Int_t *icol = new Int_t[nr]; Double_t *val = new Double_t[nr]; Int_t n = 0; for (UInt_t i = m1.GetRowLwb(); i <= m1.GetRowUpb(); i++) { for (UInt_t j = m1.GetColLwb(); j <= m1.GetColUpb(); j++) { irow[n] = i; icol[n] = j; val[n] = TMath::Pi()*i+TMath::E()*j; n++; } } m1.SetMatrixArray(nr,irow,icol,val); delete [] irow; delete [] icol; delete [] val; } m1.Print(); TMatrixD m2(1,4,0,msize-1); for (UInt_t i = m2.GetRowLwb(); i <= m2.GetRowUpb(); i++) for (UInt_t j = m2.GetColLwb(); j <= m2.GetColUpb(); j++) m2(i,j) = TMath::Pi()*i+TMath::E()*j; m2.Print(); std::cout << "matrices identical " << ((m1 == m2) ? "OK" : "FAILED") << std::endl; }
master
any
No response
The text was updated successfully, but these errors were encountered:
[matrix] Fix TMatrixTSparse::SetMatrixArray for RowLwb!=0:
323c7e4
Addresses root-project#13848 Thanks, Eddy!
25d6d5f
9ff6706
ba64765
Addresses #13848 Thanks, Eddy!
4cbfb0e
9560f03
Axel-Naumann
Successfully merging a pull request may close this issue.
Check duplicate issues.
Description
See https://root-forum.cern.ch/t/shift-of-row-index-in-tmatrixtsparse/56525
According to Eddy it's a bug in the initialization of a sparse matrix with a row index not starting at 0.
Reproducer
ROOT version
master
Installation method
any
Operating system
any
Additional context
No response
The text was updated successfully, but these errors were encountered: