Dear ROOTers
In my code, I have to calculate A’WA where W is symmetric. In order to do this, I found the method ROOT::Math::SimilarityT.
Using the following minimalized code:
typedef double value_t;
ROOT::Math::SMatrix<value_t,8,4> A;
... fill A ...
ROOT::Math::MatRepSym<value_t,8> W;
... fill W ...
and then
ATWA = ROOT::Math::SimilarityT(A,W);
where ATWA is MatRepSym<value_t,4> as well.
When I try to compile this, I get
[code]lxplus303:SurveyAnalysis/src> scramv1 b
Reading cached build data
Local Products Rules … started
Local Products Rules … done
Compiling {snip}CMSSW_3_5_0/src/Alignment/SurveyAnalysis/src/SurveyPxbImageLocalFit.cc
{snip}/CMSSW_3_5_0/src/Alignment/SurveyAnalysis/src/SurveyPxbImageLocalFit.cc: In member function ‘void SurveyPxbImageLocalFit::doFit()’:
{snip}/CMSSW_3_5_0/src/Alignment/SurveyAnalysis/src/SurveyPxbImageLocalFit.cc:81: error: no matching function for call to ‘Similarity(ROOT::Math::SMatrix<double, 8u, 4u, ROOT::Math::MatRepStd<double, 8u, 4u> >&, ROOT::Math::MatRepSym<double, 8u>&)’
gmake: *** [tmp/slc5_ia32_gcc434/src/Alignment/SurveyAnalysis/src/AlignmentSurveyAnalysis/SurveyPxbImageLocalFit.o] Error 1[/code]
(As you can see, I use the incarnation of ROOT in CMSSW, tf. scramv1 as build tool and ROOT in version 5.22/00d (branches/v5-22-00-patches@29532, Jan 27 2010, 15:18:00 on linux))
Doing the same thing using normal matrices and writing the expression as ATWA = ROOT::Math::Transpose(A) * W * A; works fine. I can live with this, but assume that it is less efficient than SimilarityT (this will be calculated several hundred times per call of my routine).
Any help is appreciated.
Kind regards,
Frank