6 #include "RecoTracker/RoadSearchHelixMaker/interface/Dcxmatinv.hh"
13 extern int Dcxmatinv(
double *array,
int *norder,
double *det){
22 edm::LogInfo(
"RoadSearch") <<
"In Dcxmatinv, norder ( = " << *norder <<
" ) > nmax ( = "
23 << nmax <<
" ); error" ;
return 1000;
25 static double amax, save;
26 static int i,
j,
k,
l, ik[nmax], jk[nmax];
33 for (k = 1; k <= *norder; ++
k) {
39 for (i = k; i <= *norder; ++
i) {
40 for (j = k; j <= *norder; ++
j) {
41 d__1 = array[i + j * nmax];
42 if ((fabs(amax)-fabs(d__1)) <= 0.) {
43 amax = array[i + j * nmax];
52 if (amax == 0.) {*det = (double)0.;
return 1001;}
55 if ((i__3 = i - k) < 0) {
57 }
else if (i__3 == 0) {
63 for (j = 1; j <= *norder; ++
j) {
64 save = array[k + j * nmax];
65 array[k + j * nmax] = array[i + j * nmax];
66 array[i + j * nmax] = -save;
70 if ((i__3 = j - k) < 0) {
72 }
else if (i__3 == 0) {
78 for (i = 1; i <= *norder; ++
i) {
79 save = array[i + k * nmax];
80 array[i + k * nmax] = array[i + j * nmax];
81 array[i + j * nmax] = -save;
87 for (i = 1; i <= *norder; ++
i) {
89 array[i + k * nmax] = -array[i + k * nmax] / amax;
92 for (i = 1; i <= *norder; ++
i) {
93 for (j = 1; j <= *norder; ++
j) {
106 array[i+j*nmax] += array[i+k*nmax] * array[k+j*nmax];
111 for (j = 1; j <= *norder; ++
j) {
113 array[k + j * nmax] /= amax;
116 array[k + k * nmax] = (double)1. / amax;
122 for (l = 1; l <= *norder; ++
l) {
131 for (i = 1; i <= *norder; ++
i) {
132 save = array[i + k * nmax];
133 array[i + k * nmax] = -array[i + j * nmax];
134 array[i + j * nmax] = save;
144 for (j = 1; j <= *norder; ++
j) {
145 save = array[k + j * nmax];
146 array[k + j * nmax] = -array[i + j * nmax];
147 array[i + j * nmax] = save;
int Dcxmatinv(double *array, int *norder, double *det)