16 std::vector<float>
gV;
21 std::cout <<
"init smearing vector ";
24 gV.push_back( r.
Rndm() );
26 std::cout <<
" with size " << gV.size() << std::endl;
33 typename V::value_type sum = 0.0;
34 for (
typename V::const_iterator itr = v.begin(); itr != v.end(); ++itr) {
48 for (
int k = 0; k <
NLIST; k++) {
62 for (
int k = 0; k <
NLIST; k++) {
78 for (
int k = 0; k <
NLIST; k++) {
79 result[k] = v1[k] + v2[k];
92 for (
int k = 0; k <
NLIST; k++) {
102 template<
class V,
class T>
107 for (
int k = 0; k <
NLIST; k++) {
108 result[k] = a * v[k];
117 template<
class M,
class T>
122 for (
int k = 0; k <
NLIST; k++) {
123 result[k] = m1[k]; result[k] *=
a;
132 template<
class M,
class V>
137 for (
int k = 0; k <
NLIST; k++) {
138 result[k] = mat[k] * v[k];
146 template<
class M,
class V>
151 for (
int k = 0; k <
NLIST; k++) {
152 result[k] = mat[k] * v1[k] + v2[k];
161 template<
class A,
class B,
class C>
166 for (
int k = 0; k <
NLIST; k++) {
167 result[k] = a[k] * b[k] + c[k];
179 template<
class V,
class T>
183 for (
int l = 0;
l < 10*
NLOOP;
l++) {
184 for (
int k = 0; k <
NLIST; k++) {
185 result[k] =
Dot(v1[k],v2[k]);
187 tmp += result[NLIST-1];
205 template<
class M,
class V,
class T>
209 for (
int l = 0;
l < 10*
NLOOP;
l++) {
210 for (
int k = 0; k <
NLIST; k++) {
213 tmp += result[NLIST-1];
226 for (
int k = 0; k <
NLIST; k++) {
227 result[k] = m[k].Inverse(ifail);
245 for (
int k = 0; k <
NLIST; k++) {
246 result[k] = m[k].InverseFast(ifail);
264 for (
int k = 0; k <
NLIST; k++) {
265 result[k] = m[k].InverseChol(ifail);
278 template<
class A,
class B,
class C>
283 for (
int k = 0; k <
NLIST; k++) {
285 result[k] = a[k] * tmp;
293 template<
class A,
class B,
class C>
298 for (
int k = 0; k <
NLIST; k++) {
310 template<
class A,
class C>
315 for (
int k = 0; k <
NLIST; k++) {
331 template<
class M,
class V>
338 Add(result,0.0,mat,vtmp);
343 template<
class M,
class V>
350 memcpy(result.GetMatrixArray(),v2.GetMatrixArray(),v2.GetNoElements()*
sizeof(
Double_t));
351 Add(result,1.0,mat,vtmp);
356 template<
class A,
class B,
class C>
376 result.Plus(m1,mtmp);
380 template<
class A,
class B,
class C>
401 result =
Dot(v1,vtmp);
406 template<
class M,
class V>
413 result = a.Similarity(vtmp);
426 memcpy(result.GetMatrixArray(),mtmp.GetMatrixArray(),mtmp.GetNoElements()*
sizeof(
Double_t));
437 memcpy(result.GetMatrixArray(),mtmp.GetMatrixArray(),mtmp.GetNoElements()*
sizeof(
Double_t));
470 template<
class A,
class B,
class C>
477 memcpy(result.GetMatrixArray(),btmp.GetMatrixArray(),btmp.GetNoElements()*
sizeof(
Double_t));
478 result.Similarity(a);
496 template<
class A,
class C>
503 result.Transpose(atmp);
520 result =
dot(v1,vtmp);
525 template<
class M,
class V>
534 result =
dot(vtmp,tmp);
560 result = m1; result += mtmp;
579 template<
class A,
class B,
class C>
586 result = a * btmp +
c;
600 result = mtmp.inverse(ifail);
601 if (ifail) {std::cout <<
"error inverting" << mtmp << std::endl;
return; }
606 template<
class A,
class B,
class C>
614 result = a * btmp * a.T();
619 template<
class A,
class B,
class C>
626 result = btmp.similarity(a);
631 template<
class A,
class C>
T Dot(const SVector< T, D > &lhs, const SVector< T, D > &rhs)
Vector dot product.
T Similarity(const SMatrix< T, D, D, R > &lhs, const SVector< T, D > &rhs)
Similarity Vector - Matrix Product: v^T * A * v returning a scalar value of type T ...
void testVscale_T(const V &v1, double a, double &time, V &result)
void testATBA_S2(const A *a, const B *b, double &time, C *result)
Random number generator class based on M.
void Add(THist< DIMENSION, PRECISIONA > &to, THist< DIMENSION, PRECISIONB > &from)
void testMT_T(const A &a, double &time, C &result)
double testDot_C(const V &v1, const V &v2, double &time)
void testATBA_T2(const A &a, const B &b, double &time, C &result)
void testMT_S(const A *a, double &time, C *result)
Expr< TransposeOp< SMatrix< T, D1, D2, R >, T, D1, D2 >, T, D2, D1, typename TranspPolicy< T, D1, D2, R >::RepType > Transpose(const SMatrix< T, D1, D2, R > &rhs)
Matrix Transpose B(i,j) = A(j,i) returning a matrix expression.
V::value_type SumOfElements(const V &v)
void testGMV(const M *mat, const V *v1, const V *v2, double &time, V *result)
void testVeq(const V *v, double &time, V *result)
void testVscale(const V *v, T a, double &time, V *result)
void testDot_S(const V *v1, const V *v2, T *result, double &time)
void testMad(const M *m1, const M *m2, double &time, M *result)
void testMM_T(const A &a, const B &b, const C &c, double &time, C &result)
Double_t dot(const TVector2 &v1, const TVector2 &v2)
void testInv_T2(const M &m, double &time, M &result)
void testMV(const M *mat, const V *v, double &time, V *result)
void testInv_C(const M &a, double &time, M &result)
virtual Double_t Rndm(Int_t i=0)
Machine independent random number generator.
void testMscale_C(const M &m1, double a, double &time, M &result)
void testMT_C(const A &a, double &time, C &result)
void testATBA_S(const A *a, const B *b, double &time, C *result)
void testGMV_T(const M &mat, const V &v1, const V &v2, double &time, V &result)
RooCmdArg Timer(Bool_t flag=kTRUE)
void testInnerProd_S(const M *a, const V *v, T *result, double &time)
void testATBA_C2(const A &a, const B &b, double &time, C &result)
void testVad(const V *v1, const V *v2, double &time, V *result)
double testDot_T(const V &v1, const V &v2, double &time)
void testMeq(const M *m, double &time, M *result)
void testATBA_T(const A &a, const B &b, double &time, C &result)
void testMscale_T(const M &m1, double a, double &time, M &result)
void testATBA_C(const A &a, const B &b, double &time, C &result)
void testMV_T(const M &mat, const V &v, double &time, V &result)
void testInv_T(const M &m, double &time, M &result)
void testInvChol_S(const M *m, double &time, M *result)
double testInnerProd_T(const M &a, const V &v, double &time)
void testMeq_C(const M &m, double &time, M &result)
void testInvFast_S(const M *m, double &time, M *result)
void testMad_T(const M &m1, const M &m2, double &time, M &result)
void testMM_C(const A &a, const B &b, const C &c, double &time, C &result)
void testMM(const A *a, const B *b, const C *c, double &time, C *result)
void testVad_T(const V &v1, const V &v2, double &time, V &result)
double testInnerProd_C(const M &a, const V &v, double &time)
SMatrix< T, D2, D2, MatRepSym< T, D2 > > SimilarityT(const SMatrix< T, D1, D2, R > &lhs, const SMatrix< T, D1, D1, MatRepSym< T, D1 > > &rhs)
Transpose Similarity Matrix Product : B = U^T * A * U for A symmetric returning a symmetric matrix ex...
void testInv_S(const M *m, double &time, M *result)
void testMscale(const M *m1, T a, double &time, M *result)
void testMad_C(const M &m1, const M &m2, double &time, M &result)