Skip to content

Commit d3beebf

Browse files
authored
[math] properly check for symmetry when constructing TSym
Fixes #19568
1 parent a535d37 commit d3beebf

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

math/matrix/src/TMatrixTSym.cxx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ TMatrixTSym<Element>::TMatrixTSym(Int_t no_rows,const Element *elements,Option_t
6666
{
6767
Allocate(no_rows,no_rows);
6868
SetMatrixArray(elements,option);
69-
if (!this->IsSymmetric()) {
70-
Error("TMatrixTSym(Int_t,Element*,Option_t*)","matrix not symmetric");
71-
}
7269
}
7370

7471
////////////////////////////////////////////////////////////////////////////////
@@ -80,9 +77,6 @@ TMatrixTSym<Element>::TMatrixTSym(Int_t row_lwb,Int_t row_upb,const Element *ele
8077
const Int_t no_rows = row_upb-row_lwb+1;
8178
Allocate(no_rows,no_rows,row_lwb,row_lwb);
8279
SetMatrixArray(elements,option);
83-
if (!this->IsSymmetric()) {
84-
Error("TMatrixTSym(Int_t,Int_t,Element*,Option_t*)","matrix not symmetric");
85-
}
8680
}
8781

8882
////////////////////////////////////////////////////////////////////////////////
@@ -203,7 +197,7 @@ TMatrixTSym<Element>::TMatrixTSym(const TMatrixTSymLazy<Element> &lazy_construct
203197
lazy_constructor.GetRowUpb()-lazy_constructor.GetRowLwb()+1,
204198
lazy_constructor.GetRowLwb(),lazy_constructor.GetRowLwb(),1);
205199
lazy_constructor.FillIn(*this);
206-
if (!this->IsSymmetric()) {
200+
if (!this->TMatrixTBase<Element>::IsSymmetric()) {
207201
Error("TMatrixTSym(TMatrixTSymLazy)","matrix not symmetric");
208202
}
209203
}
@@ -743,7 +737,7 @@ template<class Element>
743737
TMatrixTBase<Element> &TMatrixTSym<Element>::SetMatrixArray(const Element *data,Option_t *option)
744738
{
745739
TMatrixTBase<Element>::SetMatrixArray(data,option);
746-
if (!this->IsSymmetric()) {
740+
if (!this->TMatrixTBase<Element>::IsSymmetric()) {
747741
Error("SetMatrixArray","Matrix is not symmetric after Set");
748742
}
749743

0 commit comments

Comments
 (0)