Go to the source code of this file.
|
| template<class Matrix , unsigned int n, unsigned int idim> |
| bool | Dfactir (Matrix &rhs, typename Matrix::value_type &det, unsigned int *ir) |
| |
◆ Dfactir()
template<class Matrix , unsigned int n, unsigned int idim>
| bool Dfactir |
( |
Matrix & |
rhs, |
|
|
typename Matrix::value_type & |
det, |
|
|
unsigned int * |
ir |
|
) |
| |
Dfactir. Function to compute the determinant from a square matrix ($\det(A)$) of dimension $idim$ and order $n$. A working area $ir$ is returned which is needed by the Dfinv routine.
- Author
- T. Glebe
41 if (idim < n || n <= 0) {
48 typename Matrix::value_type*
a = rhs.Array();
51 static unsigned int nxch, i, j, k, l;
52 static typename Matrix::value_type
p,
q, tf;
63 for (j = 1; j <= n; ++j) {
64 const unsigned int ji = j * idim;
65 const unsigned int jj = j + ji;
71 for (i = j + 1; i <= n; ++i) {
80 for (l = 1; l <= n; ++l) {
81 const unsigned int li = l*idim;
82 const unsigned int jli = j + li;
83 const unsigned int kli = k + li;
89 ir[nxch] = (j << 12) + k;
101 if (t < 1e-19 || t > 1e19) {
112 const unsigned int jm1 = j - 1;
113 const unsigned int jpi = (j + 1) * idim;
114 const unsigned int jjpi = j + jpi;
116 for (k = j + 1; k <= n; ++k) {
117 const unsigned int ki = k * idim;
118 const unsigned int jki = j + ki;
119 const unsigned int kji = k + jpi;
121 for (i = 1; i <= jm1; ++i) {
122 const unsigned int ii = i * idim;
123 a[jki] -=
a[i + ki] *
a[j + ii];
124 a[kji] -=
a[i + jpi] *
a[k + ii];
128 a[kji] -=
a[jjpi] *
a[k + ji];
Expr< UnaryOp< Fabs< T >, Expr< A, T, D >, T >, T, D > fabs(const Expr< A, T, D > &rhs)
Definition: UnaryOperators.hh:96
void a()
Definition: check_aligned.C:59
TTree * t
Definition: check_shower.C:4
q
Definition: testBGReduction_AllMethods.C:55
p
Definition: testBGReduction_AllMethods.C:8