Bridge++  Ver. 2.0.2
mat_SU_N.h
Go to the documentation of this file.
1 
15 #ifndef MAT_SU_N_INCLUDED
16 #define MAT_SU_N_INCLUDED
17 
18 #include <cassert>
19 #include <valarray>
20 
21 #include "decompose_QR_Cmplx.h"
22 #include "eigen_QR_Cmplx.h"
23 
24 #include "randomNumbers.h"
25 
26 class RandomNumbers;
27 
28 namespace SU_N {
36  class Mat_SU_N {
37  private:
38  int m_Nc;
39  std::valarray<double> va;
43 
44  public:
45 
46  explicit
47  Mat_SU_N(int Nc, double r = 0.0) : m_Nc(Nc)
48  {
49  va.resize(2 * m_Nc * m_Nc, r);
50 
51  if (m_Nc == 3) {
54  } else if (m_Nc == 2) {
57  } else {
60  }
61  }
62 
63  Mat_SU_N& dag();
64  Mat_SU_N& ht();
65  Mat_SU_N& ah();
66  Mat_SU_N& at();
67  Mat_SU_N& unit();
68  Mat_SU_N& zero();
69  Mat_SU_N& xI();
70 
71  // Mat_SU_N& reunit();
72  Mat_SU_N& reunit() { return (this->*m_reunit)(); }
76 
78  {
79  return (this->*m_set_random)(rand);
80  }
81 
82  // H.Matsufuru added (original version for SU(3)) [15 Mar 2012].
86 
87  int nc() const { return m_Nc; }
88 
90 
91  Mat_SU_N& operator=(const double&);
92 
93  // Mat_SU_N& operator=(const std::complex<double>&);
94 
95  Mat_SU_N& operator+=(const Mat_SU_N&);
96  Mat_SU_N& operator+=(const double&);
97 
98  // Mat_SU_N& operator+=(const std::complex<double>&);
99 
100  Mat_SU_N& operator-=(const Mat_SU_N&);
101  Mat_SU_N& operator-=(const double&);
102 
103  // Mat_SU_N& operator-=(const std::complex<double>&);
104 
105  Mat_SU_N& operator*=(const Mat_SU_N&);
106  Mat_SU_N& operator*=(const double&);
107 
108  // Mat_SU_N& operator*=(const std::complex<double>&);
109 
110  Mat_SU_N& operator/=(const double&);
111 
112  // Mat_SU_N& operator/=(const std::complex<double>&);
113 
114  int size() const { return va.size(); }
115  double r(int c) const { return va[2 * c]; }
116  double i(int c) const { return va[2 * c + 1]; }
117  dcomplex c(int c) const { return cmplx(va[2 * c], va[2 * c + 1]); }
118 
119  double r(int c1, int c2) const { return r(m_Nc * c1 + c2); }
120  double i(int c1, int c2) const { return i(m_Nc * c1 + c2); }
121  dcomplex c(int c1, int c2) const { return c(m_Nc * c1 + c2); }
122 
123  void set_r(int c, const double& re) { va[2 * c] = re; }
124  void set_i(int c, const double& im) { va[2 * c + 1] = im; }
125  void set_c(int c, const dcomplex& z) { va[2 * c] = real(z); va[2 * c + 1] = imag(z); }
126 
127  void set_r(int c1, int c2, const double& re)
128  {
129  set_r(m_Nc * c1 + c2, re);
130  }
131 
132  void set_i(int c1, int c2, const double& im)
133  {
134  set_i(m_Nc * c1 + c2, im);
135  }
136 
137  void set(int c, const double& re, const double& im)
138  {
139  va[2 * c] = re;
140  va[2 * c + 1] = im;
141  }
142 
143  void set(int c1, int c2, const double& re, const double& im)
144  {
145  set(m_Nc * c1 + c2, re, im);
146  }
147 
148  void set(int c, const dcomplex& z)
149  {
150  va[2 * c] = real(z);
151  va[2 * c + 1] = imag(z);
152  }
153 
154  void set(int c1, int c2, const dcomplex& z)
155  {
156  set(m_Nc * c1 + c2, z);
157  }
158 
159  void add(int c, const double& re, const double& im)
160  {
161  va[2 * c] += re;
162  va[2 * c + 1] += im;
163  }
164 
165  void add(int c1, int c2, const double& re, const double& im)
166  {
167  add(m_Nc * c1 + c2, re, im);
168  }
169 
170  void add(int c, const dcomplex& z)
171  {
172  va[2 * c] += real(z);
173  va[2 * c + 1] += imag(z);
174  }
175 
176  void add(int c1, int c2, const dcomplex& z)
177  {
178  add(m_Nc * c1 + c2, z);
179  }
180 
181  double norm2() // H.Matsufuru added [15 Mar 2012]
182  {
183  double t = 0.0;
184 
185  for (int i = 0; i < 2 * m_Nc * m_Nc; ++i) { t += va[i] * va[i]; }
186  return t;
187  }
188 
189  void mult_nn(const Mat_SU_N& u1, const Mat_SU_N& u2)
190  {
191  for (int a = 0; a < m_Nc; ++a) {
192  for (int b = 0; b < m_Nc; ++b) {
193  va[2 * (b + m_Nc * a)] = 0.0;
194  va[2 * (b + m_Nc * a) + 1] = 0.0;
195  for (int c = 0; c < m_Nc; ++c) {
196  va[2 * (b + m_Nc * a)] +=
197  u1.va[2 * (c + m_Nc * a)] * u2.va[2 * (b + m_Nc * c)]
198  - u1.va[2 * (c + m_Nc * a) + 1] * u2.va[2 * (b + m_Nc * c) + 1];
199  va[2 * (b + m_Nc * a) + 1] +=
200  u1.va[2 * (c + m_Nc * a) + 1] * u2.va[2 * (b + m_Nc * c)]
201  + u1.va[2 * (c + m_Nc * a)] * u2.va[2 * (b + m_Nc * c) + 1];
202  }
203  }
204  }
205  }
206 
207  void multadd_nn(const Mat_SU_N& u1, const Mat_SU_N& u2)
208  {
209  for (int a = 0; a < m_Nc; ++a) {
210  for (int b = 0; b < m_Nc; ++b) {
211  for (int c = 0; c < m_Nc; ++c) {
212  va[2 * (b + m_Nc * a)] +=
213  u1.va[2 * (c + m_Nc * a)] * u2.va[2 * (b + m_Nc * c)]
214  - u1.va[2 * (c + m_Nc * a) + 1] * u2.va[2 * (b + m_Nc * c) + 1];
215  va[2 * (b + m_Nc * a) + 1] +=
216  u1.va[2 * (c + m_Nc * a) + 1] * u2.va[2 * (b + m_Nc * c)]
217  + u1.va[2 * (c + m_Nc * a)] * u2.va[2 * (b + m_Nc * c) + 1];
218  }
219  }
220  }
221  }
222 
223  void mult_nd(const Mat_SU_N& u1, const Mat_SU_N& u2)
224  {
225  for (int a = 0; a < m_Nc; ++a) {
226  for (int b = 0; b < m_Nc; ++b) {
227  va[2 * (b + m_Nc * a)] = 0.0;
228  va[2 * (b + m_Nc * a) + 1] = 0.0;
229  for (int c = 0; c < m_Nc; ++c) {
230  va[2 * (b + m_Nc * a)] +=
231  u1.va[2 * (c + m_Nc * a)] * u2.va[2 * (c + m_Nc * b)]
232  + u1.va[2 * (c + m_Nc * a) + 1] * u2.va[2 * (c + m_Nc * b) + 1];
233  va[2 * (b + m_Nc * a) + 1] +=
234  u1.va[2 * (c + m_Nc * a) + 1] * u2.va[2 * (c + m_Nc * b)]
235  - u1.va[2 * (c + m_Nc * a)] * u2.va[2 * (c + m_Nc * b) + 1];
236  }
237  }
238  }
239  }
240 
241  void multadd_nd(const Mat_SU_N& u1, const Mat_SU_N& u2)
242  {
243  for (int a = 0; a < m_Nc; ++a) {
244  for (int b = 0; b < m_Nc; ++b) {
245  for (int c = 0; c < m_Nc; ++c) {
246  va[2 * (b + m_Nc * a)] +=
247  u1.va[2 * (c + m_Nc * a)] * u2.va[2 * (c + m_Nc * b)]
248  + u1.va[2 * (c + m_Nc * a) + 1] * u2.va[2 * (c + m_Nc * b) + 1];
249  va[2 * (b + m_Nc * a) + 1] +=
250  u1.va[2 * (c + m_Nc * a) + 1] * u2.va[2 * (c + m_Nc * b)]
251  - u1.va[2 * (c + m_Nc * a)] * u2.va[2 * (c + m_Nc * b) + 1];
252  }
253  }
254  }
255  }
256 
257  void mult_dn(const Mat_SU_N& u1, const Mat_SU_N& u2)
258  {
259  for (int a = 0; a < m_Nc; ++a) {
260  for (int b = 0; b < m_Nc; ++b) {
261  va[2 * (b + m_Nc * a)] = 0.0;
262  va[2 * (b + m_Nc * a) + 1] = 0.0;
263  for (int c = 0; c < m_Nc; ++c) {
264  va[2 * (b + m_Nc * a)] +=
265  u1.va[2 * (a + m_Nc * c)] * u2.va[2 * (b + m_Nc * c)]
266  + u1.va[2 * (a + m_Nc * c) + 1] * u2.va[2 * (b + m_Nc * c) + 1];
267  va[2 * (b + m_Nc * a) + 1] -=
268  u1.va[2 * (a + m_Nc * c) + 1] * u2.va[2 * (b + m_Nc * c)]
269  - u1.va[2 * (a + m_Nc * c)] * u2.va[2 * (b + m_Nc * c) + 1];
270  }
271  }
272  }
273  }
274 
275  void multadd_dn(const Mat_SU_N& u1, const Mat_SU_N& u2)
276  {
277  for (int a = 0; a < m_Nc; ++a) {
278  for (int b = 0; b < m_Nc; ++b) {
279  for (int c = 0; c < m_Nc; ++c) {
280  va[2 * (b + m_Nc * a)] +=
281  u1.va[2 * (a + m_Nc * c)] * u2.va[2 * (b + m_Nc * c)]
282  + u1.va[2 * (a + m_Nc * c) + 1] * u2.va[2 * (b + m_Nc * c) + 1];
283  va[2 * (b + m_Nc * a) + 1] -=
284  u1.va[2 * (a + m_Nc * c) + 1] * u2.va[2 * (b + m_Nc * c)]
285  - u1.va[2 * (a + m_Nc * c)] * u2.va[2 * (b + m_Nc * c) + 1];
286  }
287  }
288  }
289  }
290 
291  void zcopy(double re, double im, const Mat_SU_N& v)
292  {
293  for (int cc = 0; cc < m_Nc * m_Nc; ++cc) {
294  va[2 * cc] = re * v.va[2 * cc] - im * v.va[2 * cc + 1];
295  va[2 * cc + 1] = re * v.va[2 * cc + 1] + im * v.va[2 * cc];
296  }
297  }
298 
299  void zcopy(dcomplex z, const Mat_SU_N& v)
300  {
301  const double re = real(z);
302  const double im = imag(z);
303  for (int cc = 0; cc < m_Nc * m_Nc; ++cc) {
304  va[2 * cc] = re * v.va[2 * cc] - im * v.va[2 * cc + 1];
305  va[2 * cc + 1] = re * v.va[2 * cc + 1] + im * v.va[2 * cc];
306  }
307  }
308 
309  void zaxpy(double re, double im, const Mat_SU_N& v)
310  {
311  for (int cc = 0; cc < m_Nc * m_Nc; ++cc) {
312  va[2 * cc] += re * v.va[2 * cc] - im * v.va[2 * cc + 1];
313  va[2 * cc + 1] += re * v.va[2 * cc + 1] + im * v.va[2 * cc];
314  }
315  }
316 
317  void zaxpy(dcomplex z, const Mat_SU_N& v)
318  {
319  const double re = real(z);
320  const double im = imag(z);
321  for (int cc = 0; cc < m_Nc * m_Nc; ++cc) {
322  va[2 * cc] += re * v.va[2 * cc] - im * v.va[2 * cc + 1];
323  va[2 * cc + 1] += re * v.va[2 * cc + 1] + im * v.va[2 * cc];
324  }
325  }
326  }; // end of class definition.
327 
328 
330  {
331  for (int a = 0; a < m_Nc; ++a) {
332  for (int b = a; b < m_Nc; ++b) {
333  double re = va[2 * (m_Nc * a + b)];
334  double im = va[2 * (m_Nc * a + b) + 1];
335 
336  va[2 * (m_Nc * a + b)] = va[2 * (m_Nc * b + a)];
337  va[2 * (m_Nc * a + b) + 1] = -va[2 * (m_Nc * b + a) + 1];
338 
339  va[2 * (m_Nc * b + a)] = re;
340  va[2 * (m_Nc * b + a) + 1] = -im;
341  }
342  }
343  return *this;
344  }
345 
346 
347  inline Mat_SU_N& Mat_SU_N::ht() // hermitian traceless
348  {
349  for (int a = 0; a < m_Nc; ++a) {
350  for (int b = a + 1; b < m_Nc; ++b) {
351  double re = va[2 * (m_Nc * a + b)] + va[2 * (m_Nc * b + a)];
352  double im = va[2 * (m_Nc * a + b) + 1] - va[2 * (m_Nc * b + a) + 1];
353 
354  va[2 * (m_Nc * a + b)] = 0.5 * re;
355  va[2 * (m_Nc * a + b) + 1] = 0.5 * im;
356 
357  va[2 * (m_Nc * b + a)] = 0.5 * re;
358  va[2 * (m_Nc * b + a) + 1] = -0.5 * im;
359  }
360  }
361  double tr = 0.0;
362  for (int cc = 0; cc < m_Nc; ++cc) {
363  tr += va[2 * (m_Nc * cc + cc)];
364  }
365  tr = tr / m_Nc;
366  for (int cc = 0; cc < m_Nc; ++cc) {
367  va[2 * (m_Nc * cc + cc)] -= tr;
368  va[2 * (m_Nc * cc + cc) + 1] = 0.0;
369  }
370  return *this;
371  }
372 
373 
376  {
377  for (int a = 0; a < m_Nc; ++a) {
378  for (int b = a + 1; b < m_Nc; ++b) {
379  double re = va[2 * (m_Nc * a + b)] - va[2 * (m_Nc * b + a)];
380  double im = va[2 * (m_Nc * a + b) + 1] + va[2 * (m_Nc * b + a) + 1];
381 
382  va[2 * (m_Nc * a + b)] = 0.5 * re;
383  va[2 * (m_Nc * a + b) + 1] = 0.5 * im;
384 
385  va[2 * (m_Nc * b + a)] = -0.5 * re;
386  va[2 * (m_Nc * b + a) + 1] = 0.5 * im;
387  }
388  }
389  double tr = 0.0;
390  for (int cc = 0; cc < m_Nc; ++cc) {
391  tr += va[2 * (m_Nc * cc + cc) + 1];
392  }
393  tr = tr / m_Nc;
394  for (int cc = 0; cc < m_Nc; ++cc) {
395  va[2 * (m_Nc * cc + cc)] = 0.0;
396  va[2 * (m_Nc * cc + cc) + 1] -= tr;
397  }
398  return *this;
399  }
400 
401 
404  {
405  for (int a = 0; a < m_Nc; ++a) {
406  for (int b = a; b < m_Nc; ++b) {
407  double re = va[2 * (m_Nc * a + b)] - va[2 * (m_Nc * b + a)];
408  double im = va[2 * (m_Nc * a + b) + 1] + va[2 * (m_Nc * b + a) + 1];
409  va[2 * (m_Nc * a + b)] = 0.5 * re;
410  va[2 * (m_Nc * a + b) + 1] = 0.5 * im;
411  va[2 * (m_Nc * b + a)] = -0.5 * re;
412  va[2 * (m_Nc * b + a) + 1] = 0.5 * im;
413  }
414  }
415  return *this;
416  }
417 
418 
420  {
421  va = 0.0;
422  for (int c = 0; c < m_Nc; ++c) {
423  va[2 * (m_Nc + 1) * c] = 1.0;
424  }
425  return *this;
426  }
427 
428 
430  {
431  va = 0.0;
432  return *this;
433  }
434 
435 
437  {
438  for (int c = 0; c < va.size() / 2; ++c) {
439  double tmp = va[2 * c];
440  va[2 * c] = -va[2 * c + 1];
441  va[2 * c + 1] = tmp;
442  }
443  return *this;
444  }
445 
446 
448  {
449  va = -va;
450  return *this;
451  }
452 
453 
455  {
456  va += rhs.va;
457  return *this;
458  }
459 
460 
462  {
463  va -= rhs.va;
464  return *this;
465  }
466 
467 
468  inline Mat_SU_N& Mat_SU_N::operator=(const double& rhs)
469  {
470  va = rhs;
471  return *this;
472  }
473 
474 
475  inline Mat_SU_N& Mat_SU_N::operator+=(const double& rhs)
476  {
477  va += rhs;
478  return *this;
479  }
480 
481 
482  inline Mat_SU_N& Mat_SU_N::operator-=(const double& rhs)
483  {
484  va -= rhs;
485  return *this;
486  }
487 
488 
490  {
491  std::valarray<double> tmp(2 * m_Nc * m_Nc);
492 
493  for (int a = 0; a < m_Nc; ++a) {
494  for (int b = 0; b < m_Nc; ++b) {
495  tmp[2 * (m_Nc * a + b)] = 0.0;
496  tmp[2 * (m_Nc * a + b) + 1] = 0.0;
497  for (int c = 0; c < m_Nc; ++c) {
498  tmp[2 * (m_Nc * a + b)] += va[2 * (m_Nc * a + c)] * rhs.va[2 * (m_Nc * c + b)]
499  - va[2 * (m_Nc * a + c) + 1] * rhs.va[2 * (m_Nc * c + b) + 1];
500  tmp[2 * (m_Nc * a + b) + 1] += va[2 * (m_Nc * a + c) + 1] * rhs.va[2 * (m_Nc * c + b)]
501  + va[2 * (m_Nc * a + c)] * rhs.va[2 * (m_Nc * c + b) + 1];
502  }
503  }
504  }
505  va = tmp;
506  return *this;
507  }
508 
509 
510  inline Mat_SU_N& Mat_SU_N::operator*=(const double& rhs)
511  {
512  va *= rhs;
513  return *this;
514  }
515 
516 
517 /*
518 inline Mat_SU_N& Mat_SU_N::operator*=(const std::complex<double>& rhs){
519  std::valarray<double> tmp = va;
520  for(int c = 0; c < va.size()/2; ++c){
521  va[2*c ] = (tmp[2*c]*real(rhs) -tmp[2*c+1]*imag(rhs));
522  va[2*c+1] = (tmp[2*c]*imag(rhs) +tmp[2*c+1]*real(rhs));
523  }
524  return *this;
525 }
526 */
527  inline Mat_SU_N& Mat_SU_N::operator/=(const double& rhs)
528  {
529  va /= rhs;
530  return *this;
531  }
532 
533 
534  inline double ReTr(const Mat_SU_N& m)
535  {
536  int Nc = m.nc();
537  double tr = 0.0;
538 
539  for (int c = 0; c < Nc; ++c) {
540  tr += m.r(c, c);
541  }
542  return tr;
543  }
544 
545 
546  inline double ImTr(const Mat_SU_N& m)
547  {
548  int Nc = m.nc();
549  double tr = 0.0;
550 
551  for (int c = 0; c < Nc; ++c) {
552  tr += m.i(c, c);
553  }
554  return tr;
555  }
556 
557 
558  inline dcomplex Tr(const Mat_SU_N& m)
559  {
560  int Nc = m.nc();
561  double tr_r = 0.0;
562  double tr_i = 0.0;
563 
564  for (int c = 0; c < Nc; ++c) {
565  tr_r += m.r(c, c);
566  tr_i += m.i(c, c);
567  }
568  return cmplx(tr_r, tr_i);
569  }
570 
571 
572  inline Mat_SU_N dag(const Mat_SU_N& u)
573  {
574  int Nc = u.nc();
575  Mat_SU_N tmp(Nc);
576 
577  for (int a = 0; a < Nc; a++) {
578  for (int b = 0; b < Nc; b++) {
579  tmp.set(a, b, u.r(b, a), -u.i(b, a));
580  }
581  }
582  return tmp;
583  }
584 
585 
586  inline Mat_SU_N xI(const Mat_SU_N& u)
587  {
588  int Nc = u.nc();
589  Mat_SU_N tmp(Nc);
590 
591  for (int c = 0; c < u.size() / 2; ++c) {
592  tmp.set(c, -u.i(c), u.r(c));
593  }
594  return tmp;
595  }
596 
597 
598  inline Mat_SU_N operator+(const Mat_SU_N& m1, const Mat_SU_N& m2)
599  {
600  return Mat_SU_N(m1) += m2;
601  }
602 
603 
604  inline Mat_SU_N operator-(const Mat_SU_N& m1, const Mat_SU_N& m2)
605  {
606  return Mat_SU_N(m1) -= m2;
607  }
608 
609 
610  inline Mat_SU_N operator*(const Mat_SU_N& m1, const Mat_SU_N& m2)
611  {
612  return Mat_SU_N(m1) *= m2;
613  }
614 
615 
616  inline Mat_SU_N operator*(const Mat_SU_N& m, double a)
617  {
618  return Mat_SU_N(m) *= a;
619  }
620 
621 
622  inline Mat_SU_N operator*(double a, const Mat_SU_N& m)
623  {
624  return Mat_SU_N(m) *= a;
625  }
626 
627 
628  inline Mat_SU_N reunit(const Mat_SU_N& m)
629  {
630  Mat_SU_N tmp = m;
631 
632  tmp.reunit();
633  return tmp;
634  }
635 
636 
637  inline Mat_SU_N mat_exp(double alpha, const Mat_SU_N& iv, const Mat_SU_N& u, int Nprec)
638  {
639  // w = exp(alpha * iv) * u
640  // = (u + alpha * iv * (u + alpha/2 * iv * ( ... (u + alpha/n * iv * u) ... )
641 
642  Mat_SU_N p(u), tmp(u);
643 
644  tmp = u;
645 
646  for (int iprec = 0; iprec < Nprec; ++iprec) {
647  double exp_factor = alpha / (Nprec - iprec);
648 
649  p = iv * tmp;
650  p *= exp_factor;
651  tmp = p;
652  tmp += u; // w' = u + alpha/(n-k) alpha iv ( w )
653  }
654 
655  return tmp.reunit();
656  }
657 } // namespace SU_N
658 #endif
SU_N::Mat_SU_N::set_i
void set_i(int c1, int c2, const double &im)
Definition: mat_SU_N.h:132
SU_N::Mat_SU_N::ah
Mat_SU_N & ah()
antihermitian
Definition: mat_SU_N.h:403
SU_N::Mat_SU_N::i
double i(int c1, int c2) const
Definition: mat_SU_N.h:120
SU_N::Mat_SU_N::multadd_dn
void multadd_dn(const Mat_SU_N &u1, const Mat_SU_N &u2)
Definition: mat_SU_N.h:275
SU_N::Mat_SU_N::add
void add(int c, const double &re, const double &im)
Definition: mat_SU_N.h:159
SU_N::Mat_SU_N::zaxpy
void zaxpy(dcomplex z, const Mat_SU_N &v)
Definition: mat_SU_N.h:317
randomNumbers.h
SU_N::ImTr
double ImTr(const Mat_SU_N &m)
Definition: mat_SU_N.h:546
SU_N::Mat_SU_N::va
std::valarray< double > va
Definition: mat_SU_N.h:39
SU_N::Mat_SU_N::c
dcomplex c(int c1, int c2) const
Definition: mat_SU_N.h:121
SU_N::Mat_SU_N::nc
int nc() const
Definition: mat_SU_N.h:87
SU_N::operator*
Mat_SU_N operator*(const Mat_SU_N &m1, const Mat_SU_N &m2)
Definition: mat_SU_N.h:610
SU_N::Mat_SU_N::operator+=
Mat_SU_N & operator+=(const Mat_SU_N &)
Definition: mat_SU_N.h:454
SU_N::Mat_SU_N::set
void set(int c, const dcomplex &z)
Definition: mat_SU_N.h:148
SU_N::Mat_SU_N::operator*=
Mat_SU_N & operator*=(const Mat_SU_N &)
Definition: mat_SU_N.h:489
SU_N::Mat_SU_N::size
int size() const
Definition: mat_SU_N.h:114
RandomNumbers
Base class of random number generators.
Definition: randomNumbers.h:43
SU_N::Mat_SU_N::reunit
Mat_SU_N & reunit()
Definition: mat_SU_N.h:72
SU_N::Mat_SU_N::multadd_nn
void multadd_nn(const Mat_SU_N &u1, const Mat_SU_N &u2)
Definition: mat_SU_N.h:207
SU_N::Mat_SU_N::unit
Mat_SU_N & unit()
Definition: mat_SU_N.h:419
SU_N::Mat_SU_N::ht
Mat_SU_N & ht()
Definition: mat_SU_N.h:347
SU_N::Mat_SU_N::add
void add(int c1, int c2, const dcomplex &z)
Definition: mat_SU_N.h:176
SU_N::operator-
Mat_SU_N operator-(const Mat_SU_N &m1, const Mat_SU_N &m2)
Definition: mat_SU_N.h:604
SU_N::Mat_SU_N::set_random_SU3
Mat_SU_N & set_random_SU3(RandomNumbers *)
Definition: mat_SU_N.cpp:148
SU_N
Definition: mat_SU_N.h:28
SU_N::Mat_SU_N::set
void set(int c, const double &re, const double &im)
Definition: mat_SU_N.h:137
SU_N::Mat_SU_N::add
void add(int c1, int c2, const double &re, const double &im)
Definition: mat_SU_N.h:165
SU_N::Mat_SU_N::reunit_SU3
Mat_SU_N & reunit_SU3()
Definition: mat_SU_N.cpp:18
SU_N::Mat_SU_N::reunit_general
Mat_SU_N & reunit_general()
Definition: mat_SU_N.cpp:117
SU_N::mat_exp
Mat_SU_N mat_exp(double alpha, const Mat_SU_N &iv, const Mat_SU_N &u, int Nprec)
Definition: mat_SU_N.h:637
SU_N::Mat_SU_N::add
void add(int c, const dcomplex &z)
Definition: mat_SU_N.h:170
SU_N::Tr
dcomplex Tr(const Mat_SU_N &m)
Definition: mat_SU_N.h:558
SU_N::Mat_SU_N::zcopy
void zcopy(dcomplex z, const Mat_SU_N &v)
Definition: mat_SU_N.h:299
SU_N::Mat_SU_N::zero
Mat_SU_N & zero()
Definition: mat_SU_N.h:429
SU_N::Mat_SU_N
Definition: mat_SU_N.h:36
SU_N::Mat_SU_N::reunit_SU2
Mat_SU_N & reunit_SU2()
Definition: mat_SU_N.cpp:91
SU_N::Mat_SU_N::mult_dn
void mult_dn(const Mat_SU_N &u1, const Mat_SU_N &u2)
Definition: mat_SU_N.h:257
eigen_QR_Cmplx.h
SU_N::Mat_SU_N::at
Mat_SU_N & at()
antihermitian traceless
Definition: mat_SU_N.h:375
SU_N::Mat_SU_N::r
double r(int c) const
Definition: mat_SU_N.h:115
SU_N::Mat_SU_N::mult_nn
void mult_nn(const Mat_SU_N &u1, const Mat_SU_N &u2)
Definition: mat_SU_N.h:189
SU_N::Mat_SU_N::zaxpy
void zaxpy(double re, double im, const Mat_SU_N &v)
Definition: mat_SU_N.h:309
SU_N::Mat_SU_N::set_random_SU2
Mat_SU_N & set_random_SU2(RandomNumbers *)
Definition: mat_SU_N.cpp:186
SU_N::xI
Mat_SU_N xI(const Mat_SU_N &u)
Definition: mat_SU_N.h:586
decompose_QR_Cmplx.h
SU_N::Mat_SU_N::r
double r(int c1, int c2) const
Definition: mat_SU_N.h:119
SU_N::Mat_SU_N::operator-
Mat_SU_N & operator-()
Definition: mat_SU_N.h:447
SU_N::Mat_SU_N::zcopy
void zcopy(double re, double im, const Mat_SU_N &v)
Definition: mat_SU_N.h:291
SU_N::Mat_SU_N::operator=
Mat_SU_N & operator=(const double &)
Definition: mat_SU_N.h:468
SU_N::Mat_SU_N::set_i
void set_i(int c, const double &im)
Definition: mat_SU_N.h:124
SU_N::Mat_SU_N::set_random
Mat_SU_N & set_random(RandomNumbers *rand)
Definition: mat_SU_N.h:77
SU_N::Mat_SU_N::set_r
void set_r(int c, const double &re)
Definition: mat_SU_N.h:123
SU_N::Mat_SU_N::set_random_general
Mat_SU_N & set_random_general(RandomNumbers *)
Definition: mat_SU_N.cpp:196
SU_N::Mat_SU_N::xI
Mat_SU_N & xI()
Definition: mat_SU_N.h:436
SU_N::Mat_SU_N::m_Nc
int m_Nc
Definition: mat_SU_N.h:38
SU_N::Mat_SU_N::multadd_nd
void multadd_nd(const Mat_SU_N &u1, const Mat_SU_N &u2)
Definition: mat_SU_N.h:241
SU_N::Mat_SU_N::i
double i(int c) const
Definition: mat_SU_N.h:116
SU_N::Mat_SU_N::Mat_SU_N
Mat_SU_N(int Nc, double r=0.0)
Definition: mat_SU_N.h:47
SU_N::reunit
Mat_SU_N reunit(const Mat_SU_N &m)
Definition: mat_SU_N.h:628
SU_N::Mat_SU_N::c
dcomplex c(int c) const
Definition: mat_SU_N.h:117
SU_N::operator+
Mat_SU_N operator+(const Mat_SU_N &m1, const Mat_SU_N &m2)
Definition: mat_SU_N.h:598
SU_N::Mat_SU_N::set_r
void set_r(int c1, int c2, const double &re)
Definition: mat_SU_N.h:127
SU_N::Mat_SU_N::dag
Mat_SU_N & dag()
Definition: mat_SU_N.h:329
SU_N::Mat_SU_N::set_c
void set_c(int c, const dcomplex &z)
Definition: mat_SU_N.h:125
SU_N::Mat_SU_N::set
void set(int c1, int c2, const double &re, const double &im)
Definition: mat_SU_N.h:143
SU_N::dag
Mat_SU_N dag(const Mat_SU_N &u)
Definition: mat_SU_N.h:572
SU_N::ReTr
double ReTr(const Mat_SU_N &m)
Definition: mat_SU_N.h:534
SU_N::Mat_SU_N::mult_nd
void mult_nd(const Mat_SU_N &u1, const Mat_SU_N &u2)
Definition: mat_SU_N.h:223
SU_N::Mat_SU_N::operator-=
Mat_SU_N & operator-=(const Mat_SU_N &)
Definition: mat_SU_N.h:461
SU_N::Mat_SU_N::operator/=
Mat_SU_N & operator/=(const double &)
Definition: mat_SU_N.h:527
SU_N::Mat_SU_N::m_reunit
Mat_SU_N &(Mat_SU_N::* m_reunit)()
Definition: mat_SU_N.h:40
SU_N::Mat_SU_N::set
void set(int c1, int c2, const dcomplex &z)
Definition: mat_SU_N.h:154
SU_N::Mat_SU_N::m_set_random
Mat_SU_N &(SU_N::Mat_SU_N::* m_set_random)(RandomNumbers *)
pointer to reunitalization.
Definition: mat_SU_N.h:41
SU_N::Mat_SU_N::norm2
double norm2()
Definition: mat_SU_N.h:181