CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
DiagMatrix.cc
Go to the documentation of this file.
1// -*- C++ -*-
2// ---------------------------------------------------------------------------
3//
4// This file is a part of the CLHEP - a Class Library for High Energy Physics.
5//
6
7#include <iostream>
8#include <string.h>
9#include <cmath>
10
11#include "CLHEP/Matrix/defs.h"
12#include "CLHEP/Random/Random.h"
13#include "CLHEP/Matrix/DiagMatrix.h"
14#include "CLHEP/Matrix/Matrix.h"
15#include "CLHEP/Matrix/SymMatrix.h"
16#include "CLHEP/Matrix/Vector.h"
17
18#ifdef HEP_DEBUG_INLINE
19#include "CLHEP/Matrix/DiagMatrix.icc"
20#endif
21
22namespace CLHEP {
23
24// Simple operation for all elements
25
26#define SIMPLE_UOP(OPER) \
27 HepMatrix::mIter a=m.begin(); \
28 HepMatrix::mIter e=m.begin()+num_size(); \
29 for(;a<e; a++) (*a) OPER t;
30
31#define SIMPLE_BOP(OPER) \
32 HepMatrix::mIter a=m.begin(); \
33 HepMatrix::mcIter b=hm2.m.begin(); \
34 HepMatrix::mIter e=m.begin()+num_size(); \
35 for(;a<e; a++, b++) (*a) OPER (*b);
36
37#define SIMPLE_TOP(OPER) \
38 HepMatrix::mcIter a=hm1.m.begin(); \
39 HepMatrix::mcIter b=hm2.m.begin(); \
40 HepMatrix::mIter t=mret.m.begin(); \
41 HepMatrix::mcIter e=hm1.m.begin()+hm1.nrow; \
42 for( ;a<e; a++, b++, t++) (*t) = (*a) OPER (*b);
43
44#define CHK_DIM_2(r1,r2,c1,c2,fun) \
45 if (r1!=r2 || c1!=c2) { \
46 HepGenMatrix::error("Range error in DiagMatrix function " #fun "(1)."); \
47 }
48
49#define CHK_DIM_1(c1,r2,fun) \
50 if (c1!=r2) { \
51 HepGenMatrix::error("Range error in DiagMatrix function " #fun "(2)."); \
52 }
53
54// static constant
55
56#if defined(__sun) || !defined(__GNUG__)
57//
58// Sun CC 4.0.1 has this bug.
59//
60double HepDiagMatrix::zero = 0;
61#else
62const double HepDiagMatrix::zero = 0;
63#endif
64
65// Constructors. (Default constructors are inlined and in .icc file)
66
68 : m(p), nrow(p)
69{
70}
71
73 : m(p), nrow(p)
74{
75 switch(init)
76 {
77 case 0:
78 m.assign(nrow,0);
79 break;
80
81 case 1:
82 {
83 HepMatrix::mIter a=m.begin();
84 HepMatrix::mIter b=m.begin() + p;
85 for( ; a<b; a++) *a = 1.0;
86 break;
87 }
88 default:
89 error("DiagMatrix: initialization must be either 0 or 1.");
90 }
91}
92
94 : m(p), nrow(p)
95{
96 HepMatrix::mIter a = m.begin();
97 HepMatrix::mIter b = m.begin() + num_size();
98 for(;a<b;a++) *a = r();
99}
100//
101// Destructor
102//
104}
105
107 : HepGenMatrix(hm1), m(hm1.nrow), nrow(hm1.nrow)
108{
109 m = hm1.m;
110}
111
112//
113//
114// Sub matrix
115//
116//
117
118HepDiagMatrix HepDiagMatrix::sub(int min_row, int max_row) const
119#ifdef HEP_GNU_OPTIMIZED_RETURN
120return mret(max_row-min_row+1);
121{
122#else
123{
124 HepDiagMatrix mret(max_row-min_row+1);
125#endif
126 if(max_row > num_row())
127 error("HepDiagMatrix::sub: Index out of range");
128 HepMatrix::mIter a = mret.m.begin();
129 HepMatrix::mcIter b = m.begin() + min_row - 1;
130 HepMatrix::mIter e = mret.m.begin() + mret.num_row();
131 for(;a<e;) *(a++) = *(b++);
132 return mret;
133}
134
135HepDiagMatrix HepDiagMatrix::sub(int min_row, int max_row)
136{
137 HepDiagMatrix mret(max_row-min_row+1);
138 if(max_row > num_row())
139 error("HepDiagMatrix::sub: Index out of range");
140 HepMatrix::mIter a = mret.m.begin();
141 HepMatrix::mIter b = m.begin() + min_row - 1;
142 HepMatrix::mIter e = mret.m.begin() + mret.num_row();
143 for(;a<e;) *(a++) = *(b++);
144 return mret;
145}
146
147void HepDiagMatrix::sub(int row,const HepDiagMatrix &hm1)
148{
149 if(row <1 || row+hm1.num_row()-1 > num_row() )
150 error("HepDiagMatrix::sub: Index out of range");
151 HepMatrix::mcIter a = hm1.m.begin();
152 HepMatrix::mIter b = m.begin() + row - 1;
153 HepMatrix::mcIter e = hm1.m.begin() + hm1.num_row();
154 for(;a<e;) *(b++) = *(a++);
155}
156
157//
158// Direct sum of two matricies
159//
160
162 const HepDiagMatrix &hm2)
163#ifdef HEP_GNU_OPTIMIZED_RETURN
164 return mret(hm1.num_row() + hm2.num_row(), 0);
165{
166#else
167{
168 HepDiagMatrix mret(hm1.num_row() + hm2.num_row(),
169 0);
170#endif
171 mret.sub(1,hm1);
172 mret.sub(hm1.num_row()+1,hm2);
173 return mret;
174}
175
177#ifdef HEP_GNU_OPTIMIZED_RETURN
178 return hm2(nrow);
179{
180#else
181{
182 HepDiagMatrix hm2(nrow);
183#endif
184 HepMatrix::mcIter a=m.begin();
185 HepMatrix::mIter b=hm2.m.begin();
186 HepMatrix::mcIter e=m.begin()+num_size();
187 for(;a<e; a++, b++) (*b) = -(*a);
188 return hm2;
189}
190
191
192
194#ifdef HEP_GNU_OPTIMIZED_RETURN
195 return mret(hm1);
196{
197#else
198{
199 HepMatrix mret(hm1);
200#endif
201 CHK_DIM_2(hm1.num_row(),hm2.num_row(),
202 hm1.num_col(),hm2.num_col(),+);
203 mret += hm2;
204 return mret;
205}
206
208#ifdef HEP_GNU_OPTIMIZED_RETURN
209 return mret(hm2);
210{
211#else
212{
213 HepMatrix mret(hm2);
214#endif
215 CHK_DIM_2(hm1.num_row(),hm2.num_row(),
216 hm1.num_col(),hm2.num_col(),+);
217 mret += hm1;
218 return mret;
219}
220
222#ifdef HEP_GNU_OPTIMIZED_RETURN
223 return mret(hm1.nrow);
224{
225#else
226{
227 HepDiagMatrix mret(hm1.nrow);
228#endif
229 CHK_DIM_1(hm1.nrow,hm2.nrow,+);
230 SIMPLE_TOP(+)
231 return mret;
232}
233
234HepSymMatrix operator+(const HepDiagMatrix &hm1,const HepSymMatrix &hm2)
235#ifdef HEP_GNU_OPTIMIZED_RETURN
236 return mret(hm2);
237{
238#else
239{
240 HepSymMatrix mret(hm2);
241#endif
242 CHK_DIM_1(hm1.num_row(),hm2.num_row(),+);
243 mret += hm1;
244 return mret;
245}
246
248#ifdef HEP_GNU_OPTIMIZED_RETURN
249 return mret(hm2);
250{
251#else
252{
253 HepSymMatrix mret(hm2);
254#endif
255 CHK_DIM_1(hm1.num_row(),hm2.num_row(),+);
256 mret += hm1;
257 return mret;
258}
259
260//
261// operator -
262//
263
265#ifdef HEP_GNU_OPTIMIZED_RETURN
266 return mret(hm1);
267{
268#else
269{
270 HepMatrix mret(hm1);
271#endif
272 CHK_DIM_2(hm1.num_row(),hm2.num_row(),
273 hm1.num_col(),hm2.num_col(),-);
274 mret -= hm2;
275 return mret;
276}
278#ifdef HEP_GNU_OPTIMIZED_RETURN
279 return mret(hm1);
280{
281#else
282{
283 HepMatrix mret(hm1);
284#endif
285 CHK_DIM_2(hm1.num_row(),hm2.num_row(),
286 hm1.num_col(),hm2.num_col(),-);
287 mret -= hm2;
288 return mret;
289}
290
292#ifdef HEP_GNU_OPTIMIZED_RETURN
293 return mret(hm1.nrow);
294{
295#else
296{
297 HepDiagMatrix mret(hm1.nrow);
298#endif
299 CHK_DIM_1(hm1.num_row(),hm2.num_row(),-);
300 SIMPLE_TOP(-)
301 return mret;
302}
303HepSymMatrix operator-(const HepDiagMatrix &hm1,const HepSymMatrix &hm2)
304#ifdef HEP_GNU_OPTIMIZED_RETURN
305 return mret(hm1);
306{
307#else
308{
309 HepSymMatrix mret(hm1);
310#endif
311 CHK_DIM_1(hm1.num_row(),hm2.num_row(),-);
312 mret -= hm2;
313 return mret;
314}
315
317#ifdef HEP_GNU_OPTIMIZED_RETURN
318 return mret(hm1);
319{
320#else
321{
322 HepSymMatrix mret(hm1);
323#endif
324 CHK_DIM_1(hm1.num_row(),hm2.num_row(),-);
325 mret -= hm2;
326 return mret;
327}
328
329/* -----------------------------------------------------------------------
330 This section contains support routines for matrix.h. This file contains
331 The two argument functions *,/. They call copy constructor and then /=,*=.
332 Also contains v_times_vT(const HepVector &v).
333 ----------------------------------------------------------------------- */
334
336const HepDiagMatrix &hm1,double t)
337#ifdef HEP_GNU_OPTIMIZED_RETURN
338 return mret(hm1);
339{
340#else
341{
342 HepDiagMatrix mret(hm1);
343#endif
344 mret /= t;
345 return mret;
346}
347
349#ifdef HEP_GNU_OPTIMIZED_RETURN
350 return mret(hm1);
351{
352#else
353{
354 HepDiagMatrix mret(hm1);
355#endif
356 mret *= t;
357 return mret;
358}
359
361#ifdef HEP_GNU_OPTIMIZED_RETURN
362 return mret(hm1);
363{
364#else
365{
366 HepDiagMatrix mret(hm1);
367#endif
368 mret *= t;
369 return mret;
370}
371
373#ifdef HEP_GNU_OPTIMIZED_RETURN
374 return mret(hm1.num_row(),hm2.num_col());
375{
376#else
377 {
378 HepMatrix mret(hm1.num_row(),hm2.num_col());
379#endif
380 CHK_DIM_1(hm1.num_col(),hm2.num_row(),*);
381 HepMatrix::mcIter mit1=hm1.m.begin();
382 HepMatrix::mIter mir=mret.m.begin();
383 for(int irow=1;irow<=hm1.num_row();irow++) {
384 HepMatrix::mcIter mcc = hm2.m.begin();
385 for(int icol=1;icol<=hm1.num_col();icol++) {
386 *(mir++) = *(mit1++) * (*(mcc++));
387 }
388 }
389 return mret;
390 }
391
393#ifdef HEP_GNU_OPTIMIZED_RETURN
394 return mret(hm1.num_row(),hm2.num_col());
395{
396#else
397{
398 HepMatrix mret(hm1.num_row(),hm2.num_col());
399#endif
400 CHK_DIM_1(hm1.num_col(),hm2.num_row(),*);
401 HepMatrix::mcIter mit1=hm2.m.begin();
402 HepMatrix::mIter mir=mret.m.begin();
403 HepMatrix::mcIter mrr = hm1.m.begin();
404 for(int irow=1;irow<=hm2.num_row();irow++) {
405 for(int icol=1;icol<=hm2.num_col();icol++) {
406 *(mir++) = *(mit1++) * (*mrr);
407 }
408 mrr++;
409 }
410 return mret;
411}
412
414#ifdef HEP_GNU_OPTIMIZED_RETURN
415 return mret(hm1.num_row());
416{
417#else
418{
419 HepDiagMatrix mret(hm1.num_row());
420#endif
421 CHK_DIM_1(hm1.num_col(),hm2.num_row(),*);
422 HepMatrix::mIter a = mret.m.begin();
423 HepMatrix::mcIter b = hm1.m.begin();
424 HepMatrix::mcIter c = hm2.m.begin();
425 HepMatrix::mIter e = mret.m.begin() + hm1.num_col();
426 for(;a<e;) *(a++) = *(b++) * (*(c++));
427 return mret;
428}
429
431#ifdef HEP_GNU_OPTIMIZED_RETURN
432 return mret(hm1.num_row());
433{
434#else
435{
436 HepVector mret(hm1.num_row());
437#endif
438 CHK_DIM_1(hm1.num_col(),hm2.num_row(),*);
439 HepGenMatrix::mIter mir=mret.m.begin();
440 HepGenMatrix::mcIter mi1 = hm1.m.begin(), mi2 = hm2.m.begin();
441 for(int icol=1;icol<=hm1.num_col();icol++) {
442 *(mir++) = *(mi1++) * *(mi2++);
443 }
444 return mret;
445}
446
447/* -----------------------------------------------------------------------
448 This section contains the assignment and inplace operators =,+=,-=,*=,/=.
449 ----------------------------------------------------------------------- */
450
452{
453 CHK_DIM_2(num_row(),hm2.num_row(),num_col(),hm2.num_col(),+=);
454 int n = num_row();
455 mIter mrr = m.begin();
456 HepMatrix::mcIter mr = hm2.m.begin();
457 for(int r=1;r<=n;r++) {
458 *mrr += *(mr++);
459 if(r<n) mrr += (n+1);
460 }
461 return (*this);
462}
463
465{
466 CHK_DIM_2(num_row(),hm2.num_row(),num_col(),hm2.num_col(),+=);
467 HepMatrix::mIter a=m.begin();
468 HepMatrix::mcIter b=hm2.m.begin();
469 for(int i=1;i<=num_row();i++) {
470 *a += *(b++);
471 if(i<num_row()) a += (i+1);
472 }
473 return (*this);
474}
475
477{
478 CHK_DIM_2(num_row(),hm2.num_row(),num_col(),hm2.num_col(),+=);
479 SIMPLE_BOP(+=)
480 return (*this);
481}
482
484{
485 CHK_DIM_2(num_row(),hm2.num_row(),num_col(),hm2.num_col(),-=);
486 int n = num_row();
487 mIter mrr = m.begin();
488 HepMatrix::mcIter mr = hm2.m.begin();
489 for(int r=1;r<=n;r++) {
490 *mrr -= *(mr++);
491 if(r<n) mrr += (n+1);
492 }
493 return (*this);
494}
495
497{
498 CHK_DIM_2(num_row(),hm2.num_row(),num_col(),hm2.num_col(),+=);
499 HepMatrix::mIter a=m.begin();
500 HepMatrix::mcIter b=hm2.m.begin();
501 for(int i=1;i<=num_row();i++) {
502 *a -= *(b++);
503 if(i<num_row()) a += (i+1);
504 }
505 return (*this);
506}
507
509{
510 CHK_DIM_2(num_row(),hm2.num_row(),num_col(),hm2.num_col(),-=);
511 SIMPLE_BOP(-=)
512 return (*this);
513}
514
516{
517 SIMPLE_UOP(/=)
518 return (*this);
519}
520
522{
523 SIMPLE_UOP(*=)
524 return (*this);
525}
526
528{
529 if(hm1.nrow*hm1.nrow != size_)
530 {
531 size_ = hm1.nrow * hm1.nrow;
532 m.resize(size_);
533 }
534 nrow = hm1.nrow;
535 ncol = hm1.nrow;
536 int n = nrow;
537 m.assign(size_,0);
538 mIter mrr = m.begin();
539 HepMatrix::mcIter mr = hm1.m.begin();
540 for(int r=1;r<=n;r++) {
541 *mrr = *(mr++);
542 if(r<n) mrr += (n+1);
543 }
544 return (*this);
545}
546
548{
549 if(hm1.nrow != nrow)
550 {
551 nrow = hm1.nrow;
552 m.resize(nrow);
553 }
554 m=hm1.m;
555 return (*this);
556}
557
558// Print the Matrix.
559
560std::ostream& operator<<(std::ostream &os, const HepDiagMatrix &q)
561{
562 os << "\n";
563/* Fixed format needs 3 extra characters for field, while scientific needs 7 */
564 long width;
565 if(os.flags() & std::ios::fixed)
566 width = os.precision()+3;
567 else
568 width = os.precision()+7;
569 for(int irow = 1; irow<= q.num_row(); irow++)
570 {
571 for(int icol = 1; icol <= q.num_col(); icol++)
572 {
573 os.width(width);
574 os << q(irow,icol) << " ";
575 }
576 os << std::endl;
577 }
578 return os;
579}
580
582apply(double (*f)(double, int, int)) const
583#ifdef HEP_GNU_OPTIMIZED_RETURN
584return mret(num_row());
585{
586#else
587{
588 HepDiagMatrix mret(num_row());
589#endif
590 HepMatrix::mcIter a = m.begin();
591 HepMatrix::mIter b = mret.m.begin();
592 for(int ir=1;ir<=num_row();ir++) {
593 *(b++) = (*f)(*(a++), ir, ir);
594 }
595 return mret;
596}
597
599{
600 if(hm1.num_row()!=nrow)
601 {
602 nrow = hm1.num_row();
603 m.resize(nrow);
604 }
605 HepMatrix::mcIter a = hm1.m.begin();
606 HepMatrix::mIter b = m.begin();
607 for(int r=1;r<=nrow;r++) {
608 *(b++) = *a;
609 if(r<nrow) a += (nrow+1);
610 }
611}
612
614{
615 if(hm1.num_row()!=nrow)
616 {
617 nrow = hm1.num_row();
618 m.resize(nrow);
619 }
620 HepMatrix::mcIter a = hm1.m.begin();
621 HepMatrix::mIter b = m.begin();
622 for(int r=1;r<=nrow;r++) {
623 *(b++) = *a;
624 if(r<nrow) a += (r+1);
625 }
626}
627
629#ifdef HEP_GNU_OPTIMIZED_RETURN
630 return mret(hm1.num_row());
631{
632#else
633{
634 HepSymMatrix mret(hm1.num_row());
635#endif
636 CHK_DIM_1(num_row(),hm1.num_col(),"similarity");
637// HepMatrix temp = hm1*(*this);
638// If hm1*(*this) has correct dimensions, then so will the hm1.T multiplication.
639// So there is no need to check dimensions again.
640 HepMatrix::mIter mrc = mret.m.begin();
641 for(int r=1;r<=mret.num_row();r++) {
642 HepMatrix::mcIter mrr = hm1.m.begin()+(r-1)*hm1.num_col();
643 HepMatrix::mcIter mc = hm1.m.begin();
644 for(int c=1;c<=r;c++) {
645 HepMatrix::mcIter mi = m.begin();
646 double tmp = 0;
647 HepMatrix::mcIter mr = mrr;
648 for(int i=0;i<hm1.num_col();i++)
649 tmp+=*(mr++) * *(mc++) * *(mi++);
650 *(mrc++) = tmp;
651 }
652 }
653 return mret;
654}
655
656double HepDiagMatrix::similarity(const HepVector &hm1) const
657{
658 double mret;
660 HepMatrix::mcIter mi = m.begin();
661 HepMatrix::mcIter mv = hm1.m.begin();
662 mret = *(mv)* *(mv)* *(mi++);
663 mv++;
664 for(int i=2;i<=hm1.num_row();i++) {
665 mret+=*(mv)* *(mv)* *(mi++);
666 mv++;
667 }
668 return mret;
669}
670
672#ifdef HEP_GNU_OPTIMIZED_RETURN
673 return mret(hm1.num_col());
674{
675#else
676{
677 HepSymMatrix mret(hm1.num_col());
678#endif
679 CHK_DIM_1(num_col(),hm1.num_row(),similarityT);
680// Matrix temp = (*this)*hm1;
681// If hm1*(*this) has correct dimensions, then so will the hm1.T multiplication.
682// So there is no need to check dimensions again.
683 for(int r=1;r<=mret.num_row();r++)
684 for(int c=1;c<=r;c++)
685 {
686 HepMatrix::mcIter mi = m.begin();
687 double tmp = hm1(1,r)*hm1(1,c)* *(mi++);
688 for(int i=2;i<=hm1.num_row();i++)
689 tmp+=hm1(i,r)*hm1(i,c)* *(mi++);
690 mret.fast(r,c) = tmp;
691 }
692 return mret;
693}
694
695void HepDiagMatrix::invert(int &ierr) {
696 int n = num_row();
697 ierr = 1;
698 HepMatrix::mIter hmm = m.begin();
699 int i;
700 for(i=0;i<n;i++) {
701 if(*(hmm++)==0) return;
702 }
703 ierr = 0;
704 hmm = m.begin();
705 for(i=0;i<n;i++) {
706 *hmm = 1.0 / *hmm;
707 hmm++;
708 }
709}
710
712 double d = 1.0;
713 HepMatrix::mcIter end = m.begin() + nrow;
714 for (HepMatrix::mcIter p=m.begin(); p < end; p++)
715 d *= *p;
716 return d;
717}
718
719double HepDiagMatrix::trace() const {
720 double d = 0.0;
721 HepMatrix::mcIter end = m.begin() + nrow;
722 for (HepMatrix::mcIter p=m.begin(); p < end; p++)
723 d += *p;
724 return d;
725}
726
727} // namespace CLHEP
#define CHK_DIM_2(r1, r2, c1, c2, fun)
Definition: DiagMatrix.cc:44
#define SIMPLE_BOP(OPER)
Definition: DiagMatrix.cc:31
#define SIMPLE_UOP(OPER)
Definition: DiagMatrix.cc:26
#define SIMPLE_TOP(OPER)
Definition: DiagMatrix.cc:37
#define CHK_DIM_1(c1, r2, fun)
Definition: DiagMatrix.cc:49
double & fast(int row, int col)
double determinant() const
Definition: DiagMatrix.cc:711
HepDiagMatrix & operator*=(double t)
Definition: DiagMatrix.cc:521
HepDiagMatrix sub(int min_row, int max_row) const
Definition: DiagMatrix.cc:118
HepDiagMatrix & operator/=(double t)
Definition: DiagMatrix.cc:515
HepDiagMatrix & operator+=(const HepDiagMatrix &hm2)
Definition: DiagMatrix.cc:476
virtual ~HepDiagMatrix()
Definition: DiagMatrix.cc:103
void assign(const HepMatrix &hm2)
Definition: DiagMatrix.cc:598
HepDiagMatrix operator-() const
Definition: DiagMatrix.cc:176
HepSymMatrix similarityT(const HepMatrix &hm1) const
Definition: DiagMatrix.cc:671
HepSymMatrix similarity(const HepMatrix &hm1) const
Definition: DiagMatrix.cc:628
HepDiagMatrix & operator-=(const HepDiagMatrix &hm2)
Definition: DiagMatrix.cc:508
double trace() const
Definition: DiagMatrix.cc:719
HepDiagMatrix & operator=(const HepDiagMatrix &hm2)
Definition: DiagMatrix.cc:547
HepDiagMatrix apply(double(*f)(double, int, int)) const
Definition: DiagMatrix.cc:582
int num_size() const
std::vector< double, Alloc< double, 25 > >::const_iterator mcIter
Definition: GenMatrix.h:74
std::vector< double, Alloc< double, 25 > >::iterator mIter
Definition: GenMatrix.h:73
static void error(const char *s)
Definition: GenMatrix.cc:70
HepMatrix & operator=(const HepMatrix &)
Definition: Matrix.cc:415
virtual int num_col() const
Definition: Matrix.cc:120
virtual int num_row() const
Definition: Matrix.cc:118
HepMatrix & operator+=(const HepMatrix &)
Definition: Matrix.cc:389
HepMatrix & operator-=(const HepMatrix &)
Definition: Matrix.cc:396
int num_row() const
HepSymMatrix & operator+=(const HepSymMatrix &hm2)
Definition: SymMatrix.cc:575
int num_col() const
HepSymMatrix & operator-=(const HepSymMatrix &hm2)
Definition: SymMatrix.cc:598
virtual int num_row() const
Definition: Vector.cc:116
void f(void g())
Definition: excDblThrow.cc:38
std::ostream & operator<<(std::ostream &s, const HepDiagMatrix &q)
Definition: DiagMatrix.cc:560
HepMatrix operator+(const HepMatrix &hm1, const HepDiagMatrix &d2)
Definition: DiagMatrix.cc:193
HepMatrix operator-(const HepMatrix &hm1, const HepDiagMatrix &d2)
Definition: DiagMatrix.cc:264
HepDiagMatrix operator/(const HepDiagMatrix &hm1, double t)
Definition: DiagMatrix.cc:335
HepMatrix operator*(const HepMatrix &hm1, const HepDiagMatrix &hm2)
Definition: DiagMatrix.cc:372
HepDiagMatrix dsum(const HepDiagMatrix &s1, const HepDiagMatrix &s2)
Definition: DiagMatrix.cc:161
void init()
Definition: testRandom.cc:29