4 #ifndef ROOT_Math_Dfactir 5 #define ROOT_Math_Dfactir 45 template <
class Matrix,
unsigned int n,
unsigned int idim>
46 bool Dfactir(Matrix& rhs,
typename Matrix::value_type& det,
unsigned int* ir)
51 if (idim < n || n <= 0) {
58 typename Matrix::value_type* a = rhs.Array();
61 unsigned int nxch, i, j, k, l;
62 typename Matrix::value_type p, q, tf;
73 for (j = 1; j <= n; ++j) {
74 const unsigned int ji = j * idim;
75 const unsigned int jj = j + ji;
81 for (i = j + 1; i <= n; ++i) {
82 q = std::abs(a[i + ji]);
90 for (l = 1; l <= n; ++l) {
91 const unsigned int li = l*idim;
92 const unsigned int jli = j + li;
93 const unsigned int kli = k + li;
99 ir[nxch] = (j << 12) + k;
111 if (t < 1e-19 || t > 1e19) {
122 const unsigned int jm1 = j - 1;
123 const unsigned int jpi = (j + 1) * idim;
124 const unsigned int jjpi = j + jpi;
126 for (k = j + 1; k <= n; ++k) {
127 const unsigned int ki = k * idim;
128 const unsigned int jki = j + ki;
129 const unsigned int kji = k + jpi;
131 for (i = 1; i <= jm1; ++i) {
132 const unsigned int ii = i * idim;
133 a[jki] -= a[i + ki] * a[j + ii];
134 a[kji] -= a[i + jpi] * a[k + ii];
138 a[kji] -= a[jjpi] * a[k + ji];
Namespace for new ROOT classes and functions.
bool Dfactir(Matrix &rhs, typename Matrix::value_type &det, unsigned int *ir)
Dfactir.
Namespace for new Math classes and functions.