41 #define SIMPLE_UOP(OPER) \
42 G4ErrorMatrixIter a=m.begin(); \
43 G4ErrorMatrixIter e=m.begin()+num_size(); \
44 for(;a<e; a++) (*a) OPER t;
46 #define SIMPLE_BOP(OPER) \
47 G4ErrorMatrixIter a=m.begin(); \
48 G4ErrorMatrixConstIter b=mat2.m.begin(); \
49 G4ErrorMatrixConstIter e=m.begin()+num_size(); \
50 for(;a<e; a++, b++) (*a) OPER (*b);
52 #define SIMPLE_TOP(OPER) \
53 G4ErrorMatrixConstIter a=mat1.m.begin(); \
54 G4ErrorMatrixConstIter b=mat2.m.begin(); \
55 G4ErrorMatrixIter t=mret.m.begin(); \
56 G4ErrorMatrixConstIter e=mat1.m.begin()+mat1.num_size(); \
57 for( ;a<e; a++, b++, t++) (*t) = (*a) OPER (*b);
59 #define CHK_DIM_2(r1,r2,c1,c2,fun) \
60 if (r1!=r2 || c1!=c2) { \
61 G4ErrorMatrix::error("Range error in Matrix function " #fun "(1)."); \
64 #define CHK_DIM_1(c1,r2,fun) \
66 G4ErrorMatrix::error("Range error in Matrix function " #fun "(2)."); \
72 :
m(p*(p+1)/2), nrow(p)
79 :
m(p*(p+1)/2), nrow(p)
113 :
m(mat1.size), nrow(mat1.nrow), size(mat1.size)
134 for(
G4int icol=1; icol<=irow; icol++)
138 b1 += irow+min_row-1;
153 for(
G4int icol=1; icol<=irow; icol++)
157 b1 += irow+min_row-1;
171 for(
G4int icol=1; icol<=irow; icol++)
203 for(;a<e; a++, b++) { (*b) = -(*a); }
294 for(mit1=mat1.
m.begin();
299 for(
int step=1;step<=mat2.
num_row();++step)
306 temp+=*(sp++)*(*(mit2++));
309 for(
int stept=step+1;stept<=mat2.
num_row();stept++)
311 temp+=*sp*(*(mit2++));
312 if(stept<mat2.
num_row()) sp+=stept;
329 for(step=1,snp=mat1.
m.begin();step<=mat1.
num_row();snp+=step++)
331 for(mit1=mat2.
m.begin();mit1<mat2.
m.begin()+mat2.
num_col();mit1++)
338 temp+=*mit2*(*(sp++));
342 for(stept=step+1;stept<=mat1.
num_row();stept++)
358 G4int step1,stept1,step2,stept2;
362 for(step1=1,snp1=mat1.
m.begin();step1<=mat1.
num_row();snp1+=step1++)
364 for(step2=1,snp2=mat2.
m.begin();step2<=mat2.
num_row();)
372 while(sp1<snp1+step1)
373 { temp+=(*(sp1++))*(*(sp2++)); }
375 for(stept1=step1+1;stept1!=step2+1;sp1+=stept1++)
376 { temp+=(*sp1)*(*(sp2++)); }
378 for(stept2=++step2;stept2<=mat2.
num_row();sp1+=stept1++,sp2+=stept2++)
379 { temp+=(*sp1)*(*sp2); }
384 { temp+=(*(sp1++))*(*(sp2++)); }
386 for(stept2=++step2;stept2!=step1+1;sp2+=stept2++)
387 { temp+=(*(sp1++))*(*sp2); }
389 for(stept1=step1+1;stept1<=mat1.
num_row();sp1+=stept1++,sp2+=stept2++)
390 { temp+=(*sp1)*(*sp2); }
414 for(
G4int k=1;k<=j;k++)
417 if(j!=k) *mkj += *sjk;
446 for(
G4int k=1;k<=j;k++)
449 if(j!=k) *mkj -= *sjk;
496 for(
G4int k=1;k<=j;k++)
499 if(j!=k) *mkj = *sjk;
511 if (&mat1 ==
this) {
return *
this; }
532 if(os.flags() & std::ios::fixed)
534 width = os.precision()+3;
538 width = os.precision()+7;
545 os << q(irow,icol) <<
" ";
560 for(
G4int ic=1;ic<=ir;ic++)
562 *(b++) = (*f)(*(a++), ir, ic);
581 for(
G4int c=1;c<=r;c++)
600 for(
G4int r=1;r<=mret.num_row();r++)
603 for(
G4int c=1;c<=r;c++)
610 tmp+=(*(tempri++))*(*(m1ci++));
627 for(
G4int r=1;r<=mret.num_row();r++)
639 tmp+=(*(tempri++))*(*(m1ci++));
643 tmp+=(*(tempri++))*(*(m1ci));
661 for(
G4int r=1;r<=mret.num_row();r++)
664 for(
G4int c=1;c<=r;c++)
669 for(
G4int i=1;i<=mat1.num_row();i++)
671 tmp+=(*(tempir))*(*(m1ic));
694 c11 = (*(
m.begin()+2)) * (*(
m.begin()+5))
695 - (*(
m.begin()+4)) * (*(
m.begin()+4));
696 c12 = (*(
m.begin()+4)) * (*(
m.begin()+3))
697 - (*(
m.begin()+1)) * (*(
m.begin()+5));
698 c13 = (*(
m.begin()+1)) * (*(
m.begin()+4))
699 - (*(
m.begin()+2)) * (*(
m.begin()+3));
700 c22 = (*(
m.begin()+5)) * (*
m.begin())
701 - (*(
m.begin()+3)) * (*(
m.begin()+3));
702 c23 = (*(
m.begin()+3)) * (*(
m.begin()+1))
703 - (*(
m.begin()+4)) * (*
m.begin());
704 c33 = (*
m.begin()) * (*(
m.begin()+2))
705 - (*(
m.begin()+1)) * (*(
m.begin()+1));
706 t1 = std::fabs(*
m.begin());
707 t2 = std::fabs(*(
m.begin()+1));
708 t3 = std::fabs(*(
m.begin()+3));
713 temp = *(
m.begin()+3);
714 det = c23*c12-c22*c13;
719 det = c22*c33-c23*c23;
724 temp = *(
m.begin()+3);
725 det = c23*c12-c22*c13;
729 temp = *(
m.begin()+1);
730 det = c13*c23-c12*c33;
752 det = (*
m.begin())*(*(
m.begin()+2)) - (*(
m.begin()+1))*(*(
m.begin()+1));
759 *(
m.begin()+1) *= -ss;
760 temp = ss*(*(
m.begin()+2));
761 *(
m.begin()+2) = ss*(*
m.begin());
772 *
m.begin() = 1.0/(*
m.begin());
801 static const G4int max_array = 20;
805 static std::vector<G4int> ir_vec (max_array+1);
806 if (ir_vec.size() <=
static_cast<unsigned int>(
nrow))
808 ir_vec.resize(
nrow+1);
810 G4int * ir = &ir_vec[0];
815 if(i==0) {
return det; }
823 { t += *(
m.begin() + (i+3)*i/2); }
846 static const G4int max_array = 25;
848 if (!xvec) xvec =
new std::vector<G4double> (max_array) ;
850 if (!pivv) pivv =
new std::vector<G4int> (max_array) ;
851 typedef std::vector<G4int>::iterator pivIter;
852 if (xvec->size() <
static_cast<unsigned int>(
nrow)) xvec->resize(
nrow);
853 if (pivv->size() <
static_cast<unsigned int>(
nrow)) pivv->resize(
nrow);
860 pivIter piv = pivv->begin();
873 for (i = 0; i <
nrow; i++)
884 for (j=1; j <
nrow; j+=ss)
886 mjj =
m.begin() + j*(j-1)/2 + j-1;
889 ip =
m.begin() + (j+1)*j/2 + j-1;
890 for (i=j+1; i <=
nrow ; ip += i++)
892 if (std::fabs(*ip) >
lambda)
894 lambda = std::fabs(*ip);
910 if (std::fabs(*mjj) >= lambda*alpha)
918 ip =
m.begin() + pivrow*(pivrow-1)/2+j-1;
919 for (k=j; k < pivrow; k++)
921 if (std::fabs(*ip) > sigma)
922 sigma = std::fabs(*ip);
925 if (sigma * std::fabs(*mjj) >= alpha * lambda *
lambda)
930 else if (std::fabs(*(
m.begin()+pivrow*(pivrow-1)/2+pivrow-1))
944 temp2 = *mjj = 1./ *mjj;
947 for (i=j+1; i <=
nrow; i++)
949 temp1 = *(
m.begin() + i*(i-1)/2 + j-1) * temp2;
950 ip =
m.begin()+i*(i-1)/2+j;
951 for (k=j+1; k<=i; k++)
953 *ip -= temp1 * *(
m.begin() + k*(k-1)/2 + j-1);
954 if (std::fabs(*ip) <= epsilon)
960 ip =
m.begin() + (j+1)*j/2 + j-1;
961 for (i=j+1; i <=
nrow; ip += i++)
972 ip =
m.begin() + pivrow*(pivrow-1)/2 + j;
973 for (i=j+1; i < pivrow; i++, ip++)
975 temp1 = *(
m.begin() + i*(i-1)/2 + j-1);
976 *(
m.begin() + i*(i-1)/2 + j-1)= *ip;
980 *mjj = *(
m.begin()+pivrow*(pivrow-1)/2+pivrow-1);
981 *(
m.begin()+pivrow*(pivrow-1)/2+pivrow-1) = temp1;
982 ip =
m.begin() + (pivrow+1)*pivrow/2 + j-1;
984 for (i = pivrow+1; i <=
nrow; ip += i, iq += i++)
996 temp2 = *mjj = 1./ *mjj;
999 for (i = j+1; i <=
nrow; i++)
1001 temp1 = *(
m.begin() + i*(i-1)/2 + j-1) * temp2;
1002 ip =
m.begin()+i*(i-1)/2+j;
1003 for (k=j+1; k<=i; k++)
1005 *ip -= temp1 * *(
m.begin() + k*(k-1)/2 + j-1);
1006 if (std::fabs(*ip) <= epsilon)
1012 ip =
m.begin() + (j+1)*j/2 + j-1;
1013 for (i=j+1; i<=
nrow; ip += i++)
1027 ip =
m.begin() + pivrow*(pivrow-1)/2 + j+1;
1028 for (i=j+2; i < pivrow; i++, ip++)
1030 temp1 = *(
m.begin() + i*(i-1)/2 + j);
1031 *(
m.begin() + i*(i-1)/2 + j) = *ip;
1034 temp1 = *(mjj + j + 1);
1036 *(
m.begin() + pivrow*(pivrow-1)/2 + pivrow-1);
1037 *(
m.begin() + pivrow*(pivrow-1)/2 + pivrow-1) = temp1;
1039 *(mjj + j) = *(
m.begin() + pivrow*(pivrow-1)/2 + j-1);
1040 *(
m.begin() + pivrow*(pivrow-1)/2 + j-1) = temp1;
1041 ip =
m.begin() + (pivrow+1)*pivrow/2 + j;
1042 iq = ip + pivrow-(j+1);
1043 for (i = pivrow+1; i <=
nrow; ip += i, iq += i++)
1051 temp2 = *mjj * *(mjj + j + 1) - *(mjj + j) * *(mjj + j);
1055 <<
"G4ErrorSymMatrix::bunch_invert: error in pivot choice"
1064 *mjj = *(mjj + j + 1) * temp2;
1065 *(mjj + j + 1) = temp1 * temp2;
1066 *(mjj + j) = - *(mjj + j) * temp2;
1071 for (i=j+2; i <=
nrow ; i++)
1073 ip =
m.begin() + i*(i-1)/2 + j-1;
1074 temp1 = *ip * *mjj + *(ip + 1) * *(mjj + j);
1075 if (std::fabs(temp1 ) <= epsilon)
1077 temp2 = *ip * *(mjj + j) + *(ip + 1) * *(mjj + j + 1);
1078 if (std::fabs(temp2 ) <= epsilon)
1080 for (k = j+2; k <= i ; k++)
1082 ip =
m.begin() + i*(i-1)/2 + k-1;
1083 iq =
m.begin() + k*(k-1)/2 + j-1;
1084 *ip -= temp1 * *iq + temp2 * *(iq+1);
1085 if (std::fabs(*ip) <= epsilon)
1090 for (i=j+2; i <=
nrow ; i++)
1092 ip =
m.begin() + i*(i-1)/2 + j-1;
1093 temp1 = *ip * *mjj + *(ip+1) * *(mjj + j);
1094 if (std::fabs(temp1) <= epsilon)
1096 *(ip+1) = *ip * *(mjj + j) + *(ip+1) * *(mjj + j + 1);
1097 if (std::fabs(*(ip+1)) <= epsilon)
1108 mjj =
m.begin() + j*(j-1)/2 + j-1;
1122 for (j = nrow ; j >= 1 ; j -= ss)
1124 mjj =
m.begin() + j*(j-1)/2 + j-1;
1130 ip =
m.begin() + (j+1)*j/2 + j-1;
1131 for (i=0; i < nrow-j; ip += 1+j+i++)
1135 for (i=j+1; i<=
nrow ; i++)
1138 ip =
m.begin() + i*(i-1)/2 + j;
1139 for (k=0; k <= i-j-1; k++)
1140 { temp2 += *ip++ * x[k]; }
1141 for (ip += i-1; k < nrow-j; ip += 1+j+k++)
1142 { temp2 += *ip * x[k]; }
1143 *(
m.begin()+ i*(i-1)/2 + j-1) = -temp2;
1146 ip =
m.begin() + (j+1)*j/2 + j-1;
1147 for (k=0; k < nrow-j; ip += 1+j+k++)
1148 { temp2 += x[k] * *ip; }
1159 ip =
m.begin() + (j+1)*j/2 + j-1;
1160 for (i=0; i < nrow-j; ip += 1+j+i++)
1164 for (i=j+1; i<=
nrow ; i++)
1167 ip =
m.begin() + i*(i-1)/2 + j;
1168 for (k=0; k <= i-j-1; k++)
1169 { temp2 += *ip++ * x[k]; }
1170 for (ip += i-1; k < nrow-j; ip += 1+j+k++)
1171 { temp2 += *ip * x[k]; }
1172 *(
m.begin()+ i*(i-1)/2 + j-1) = -temp2;
1175 ip =
m.begin() + (j+1)*j/2 + j-1;
1176 for (k=0; k < nrow-j; ip += 1+j+k++)
1177 { temp2 += x[k] * *ip; }
1180 ip =
m.begin() + (j+1)*j/2 + j-2;
1181 for (i=j+1; i <=
nrow; ip += i++)
1182 { temp2 += *ip * *(ip+1); }
1184 ip =
m.begin() + (j+1)*j/2 + j-2;
1185 for (i=0; i < nrow-j; ip += 1+j+i++)
1189 for (i=j+1; i <=
nrow ; i++)
1192 ip =
m.begin() + i*(i-1)/2 + j;
1193 for (k=0; k <= i-j-1; k++)
1194 { temp2 += *ip++ * x[k]; }
1195 for (ip += i-1; k < nrow-j; ip += 1+j+k++)
1196 { temp2 += *ip * x[k]; }
1197 *(
m.begin()+ i*(i-1)/2 + j-2)= -temp2;
1200 ip =
m.begin() + (j+1)*j/2 + j-2;
1201 for (k=0; k < nrow-j; ip += 1+j+k++)
1202 { temp2 += x[k] * *ip; }
1210 pivrow = (piv[j-1]==0)? -piv[j-2] : piv[j-1];
1211 ip =
m.begin() + pivrow*(pivrow-1)/2 + j;
1212 for (i=j+1;i < pivrow; i++, ip++)
1214 temp1 = *(
m.begin() + i*(i-1)/2 + j-1);
1215 *(
m.begin() + i*(i-1)/2 + j-1) = *ip;
1219 *mjj = *(
m.begin() + pivrow*(pivrow-1)/2 + pivrow-1);
1220 *(
m.begin() + pivrow*(pivrow-1)/2 + pivrow-1) = temp1;
1224 *(mjj-1) = *(
m.begin() + pivrow*(pivrow-1)/2 + j-2);
1225 *(
m.begin() + pivrow*(pivrow-1)/2 + j-2) = temp1;
1228 ip =
m.begin() + (pivrow+1)*pivrow/2 + j-1;
1230 for (i = pivrow+1; i <=
nrow; ip += i, iq += i++)
1395 + m[
A12]*Det2_23_01;
1397 + m[
A13]*Det2_23_01;
1399 + m[
A13]*Det2_23_02;
1401 + m[
A13]*Det2_23_12;
1403 + m[
A12]*Det2_24_01;
1405 + m[
A13]*Det2_24_01;
1407 + m[
A14]*Det2_24_01;
1409 + m[
A13]*Det2_24_02;
1411 + m[
A14]*Det2_24_02;
1413 + m[
A13]*Det2_24_12;
1415 + m[
A14]*Det2_24_12;
1417 + m[
A12]*Det2_34_01;
1419 + m[
A13]*Det2_34_01;
1421 + m[
A14]*Det2_34_01;
1423 + m[
A13]*Det2_34_02;
1425 + m[
A14]*Det2_34_02;
1427 + m[
A14]*Det2_34_03;
1429 + m[
A13]*Det2_34_12;
1431 + m[
A14]*Det2_34_12;
1433 + m[
A14]*Det2_34_13;
1435 + m[
A22]*Det2_34_01;
1437 + m[
A23]*Det2_34_01;
1439 + m[
A24]*Det2_34_01;
1441 + m[
A23]*Det2_34_02;
1443 + m[
A24]*Det2_34_02;
1445 + m[
A24]*Det2_34_03;
1447 + m[
A23]*Det2_34_12;
1449 + m[
A24]*Det2_34_12;
1451 + m[
A24]*Det2_34_13;
1453 + m[
A24]*Det2_34_23;
1457 G4double Det4_0123_0123 = m[
A00]*Det3_123_123 - m[
A01]*Det3_123_023
1458 + m[
A02]*Det3_123_013 - m[
A03]*Det3_123_012;
1459 G4double Det4_0124_0123 = m[
A00]*Det3_124_123 - m[
A01]*Det3_124_023
1460 + m[
A02]*Det3_124_013 - m[
A03]*Det3_124_012;
1461 G4double Det4_0124_0124 = m[
A00]*Det3_124_124 - m[
A01]*Det3_124_024
1462 + m[
A02]*Det3_124_014 - m[
A04]*Det3_124_012;
1463 G4double Det4_0134_0123 = m[
A00]*Det3_134_123 - m[
A01]*Det3_134_023
1464 + m[
A02]*Det3_134_013 - m[
A03]*Det3_134_012;
1465 G4double Det4_0134_0124 = m[
A00]*Det3_134_124 - m[
A01]*Det3_134_024
1466 + m[
A02]*Det3_134_014 - m[
A04]*Det3_134_012;
1467 G4double Det4_0134_0134 = m[
A00]*Det3_134_134 - m[
A01]*Det3_134_034
1468 + m[
A03]*Det3_134_014 - m[
A04]*Det3_134_013;
1469 G4double Det4_0234_0123 = m[
A00]*Det3_234_123 - m[
A01]*Det3_234_023
1470 + m[
A02]*Det3_234_013 - m[
A03]*Det3_234_012;
1471 G4double Det4_0234_0124 = m[
A00]*Det3_234_124 - m[
A01]*Det3_234_024
1472 + m[
A02]*Det3_234_014 - m[
A04]*Det3_234_012;
1473 G4double Det4_0234_0134 = m[
A00]*Det3_234_134 - m[
A01]*Det3_234_034
1474 + m[
A03]*Det3_234_014 - m[
A04]*Det3_234_013;
1475 G4double Det4_0234_0234 = m[
A00]*Det3_234_234 - m[
A02]*Det3_234_034
1476 + m[
A03]*Det3_234_024 - m[
A04]*Det3_234_023;
1477 G4double Det4_1234_0123 = m[
A10]*Det3_234_123 - m[
A11]*Det3_234_023
1478 + m[
A12]*Det3_234_013 - m[
A13]*Det3_234_012;
1479 G4double Det4_1234_0124 = m[
A10]*Det3_234_124 - m[
A11]*Det3_234_024
1480 + m[
A12]*Det3_234_014 - m[
A14]*Det3_234_012;
1481 G4double Det4_1234_0134 = m[
A10]*Det3_234_134 - m[
A11]*Det3_234_034
1482 + m[
A13]*Det3_234_014 - m[
A14]*Det3_234_013;
1483 G4double Det4_1234_0234 = m[
A10]*Det3_234_234 - m[
A12]*Det3_234_034
1484 + m[
A13]*Det3_234_024 - m[
A14]*Det3_234_023;
1485 G4double Det4_1234_1234 = m[
A11]*Det3_234_234 - m[
A12]*Det3_234_134
1486 + m[
A13]*Det3_234_124 - m[
A14]*Det3_234_123;
1491 - m[
A01]*Det4_1234_0234
1492 + m[
A02]*Det4_1234_0134
1493 - m[
A03]*Det4_1234_0124
1494 + m[
A04]*Det4_1234_0123;
1503 G4double mn1OverDet = - oneOverDet;
1505 m[
A00] = Det4_1234_1234 * oneOverDet;
1506 m[
A01] = Det4_1234_0234 * mn1OverDet;
1507 m[
A02] = Det4_1234_0134 * oneOverDet;
1508 m[
A03] = Det4_1234_0124 * mn1OverDet;
1509 m[
A04] = Det4_1234_0123 * oneOverDet;
1511 m[
A11] = Det4_0234_0234 * oneOverDet;
1512 m[
A12] = Det4_0234_0134 * mn1OverDet;
1513 m[
A13] = Det4_0234_0124 * oneOverDet;
1514 m[
A14] = Det4_0234_0123 * mn1OverDet;
1516 m[
A22] = Det4_0134_0134 * oneOverDet;
1517 m[
A23] = Det4_0134_0124 * mn1OverDet;
1518 m[
A24] = Det4_0134_0123 * oneOverDet;
1520 m[
A33] = Det4_0124_0124 * oneOverDet;
1521 m[
A34] = Det4_0124_0123 * mn1OverDet;
1523 m[
A44] = Det4_0123_0123 * oneOverDet;
1577 + m[
A22]*Det2_34_01;
1579 + m[
A23]*Det2_34_01;
1581 + m[
A24]*Det2_34_01;
1583 + m[
A23]*Det2_34_02;
1585 + m[
A24]*Det2_34_02;
1587 + m[
A24]*Det2_34_03;
1589 + m[
A23]*Det2_34_12;
1591 + m[
A24]*Det2_34_12;
1593 + m[
A24]*Det2_34_13;
1595 + m[
A24]*Det2_34_23;
1597 + m[
A22]*Det2_35_01;
1599 + m[
A23]*Det2_35_01;
1601 + m[
A24]*Det2_35_01;
1603 + m[
A25]*Det2_35_01;
1605 + m[
A23]*Det2_35_02;
1607 + m[
A24]*Det2_35_02;
1609 + m[
A25]*Det2_35_02;
1611 + m[
A24]*Det2_35_03;
1613 + m[
A25]*Det2_35_03;
1615 + m[
A23]*Det2_35_12;
1617 + m[
A24]*Det2_35_12;
1619 + m[
A25]*Det2_35_12;
1621 + m[
A24]*Det2_35_13;
1623 + m[
A25]*Det2_35_13;
1625 + m[
A24]*Det2_35_23;
1627 + m[
A25]*Det2_35_23;
1629 + m[
A22]*Det2_45_01;
1631 + m[
A23]*Det2_45_01;
1633 + m[
A24]*Det2_45_01;
1635 + m[
A25]*Det2_45_01;
1637 + m[
A23]*Det2_45_02;
1639 + m[
A24]*Det2_45_02;
1641 + m[
A25]*Det2_45_02;
1643 + m[
A24]*Det2_45_03;
1645 + m[
A25]*Det2_45_03;
1647 + m[
A25]*Det2_45_04;
1649 + m[
A23]*Det2_45_12;
1651 + m[
A24]*Det2_45_12;
1653 + m[
A25]*Det2_45_12;
1655 + m[
A24]*Det2_45_13;
1657 + m[
A25]*Det2_45_13;
1659 + m[
A25]*Det2_45_14;
1661 + m[
A24]*Det2_45_23;
1663 + m[
A25]*Det2_45_23;
1665 + m[
A25]*Det2_45_24;
1667 + m[
A32]*Det2_45_01;
1669 + m[
A33]*Det2_45_01;
1671 + m[
A34]*Det2_45_01;
1673 + m[
A35]*Det2_45_01;
1675 + m[
A33]*Det2_45_02;
1677 + m[
A34]*Det2_45_02;
1679 + m[
A35]*Det2_45_02;
1681 + m[
A34]*Det2_45_03;
1683 + m[
A35]*Det2_45_03;
1685 + m[
A35]*Det2_45_04;
1687 + m[
A33]*Det2_45_12;
1689 + m[
A34]*Det2_45_12;
1691 + m[
A35]*Det2_45_12;
1693 + m[
A34]*Det2_45_13;
1695 + m[
A35]*Det2_45_13;
1697 + m[
A35]*Det2_45_14;
1699 + m[
A34]*Det2_45_23;
1701 + m[
A35]*Det2_45_23;
1703 + m[
A35]*Det2_45_24;
1705 + m[
A35]*Det2_45_34;
1709 G4double Det4_1234_0123 = m[
A10]*Det3_234_123 - m[
A11]*Det3_234_023
1710 + m[
A12]*Det3_234_013 - m[
A13]*Det3_234_012;
1711 G4double Det4_1234_0124 = m[
A10]*Det3_234_124 - m[
A11]*Det3_234_024
1712 + m[
A12]*Det3_234_014 - m[
A14]*Det3_234_012;
1713 G4double Det4_1234_0134 = m[
A10]*Det3_234_134 - m[
A11]*Det3_234_034
1714 + m[
A13]*Det3_234_014 - m[
A14]*Det3_234_013;
1715 G4double Det4_1234_0234 = m[
A10]*Det3_234_234 - m[
A12]*Det3_234_034
1716 + m[
A13]*Det3_234_024 - m[
A14]*Det3_234_023;
1717 G4double Det4_1234_1234 = m[
A11]*Det3_234_234 - m[
A12]*Det3_234_134
1718 + m[
A13]*Det3_234_124 - m[
A14]*Det3_234_123;
1719 G4double Det4_1235_0123 = m[
A10]*Det3_235_123 - m[
A11]*Det3_235_023
1720 + m[
A12]*Det3_235_013 - m[
A13]*Det3_235_012;
1721 G4double Det4_1235_0124 = m[
A10]*Det3_235_124 - m[
A11]*Det3_235_024
1722 + m[
A12]*Det3_235_014 - m[
A14]*Det3_235_012;
1723 G4double Det4_1235_0125 = m[
A10]*Det3_235_125 - m[
A11]*Det3_235_025
1724 + m[
A12]*Det3_235_015 - m[
A15]*Det3_235_012;
1725 G4double Det4_1235_0134 = m[
A10]*Det3_235_134 - m[
A11]*Det3_235_034
1726 + m[
A13]*Det3_235_014 - m[
A14]*Det3_235_013;
1727 G4double Det4_1235_0135 = m[
A10]*Det3_235_135 - m[
A11]*Det3_235_035
1728 + m[
A13]*Det3_235_015 - m[
A15]*Det3_235_013;
1729 G4double Det4_1235_0234 = m[
A10]*Det3_235_234 - m[
A12]*Det3_235_034
1730 + m[
A13]*Det3_235_024 - m[
A14]*Det3_235_023;
1731 G4double Det4_1235_0235 = m[
A10]*Det3_235_235 - m[
A12]*Det3_235_035
1732 + m[
A13]*Det3_235_025 - m[
A15]*Det3_235_023;
1733 G4double Det4_1235_1234 = m[
A11]*Det3_235_234 - m[
A12]*Det3_235_134
1734 + m[
A13]*Det3_235_124 - m[
A14]*Det3_235_123;
1735 G4double Det4_1235_1235 = m[
A11]*Det3_235_235 - m[
A12]*Det3_235_135
1736 + m[
A13]*Det3_235_125 - m[
A15]*Det3_235_123;
1737 G4double Det4_1245_0123 = m[
A10]*Det3_245_123 - m[
A11]*Det3_245_023
1738 + m[
A12]*Det3_245_013 - m[
A13]*Det3_245_012;
1739 G4double Det4_1245_0124 = m[
A10]*Det3_245_124 - m[
A11]*Det3_245_024
1740 + m[
A12]*Det3_245_014 - m[
A14]*Det3_245_012;
1741 G4double Det4_1245_0125 = m[
A10]*Det3_245_125 - m[
A11]*Det3_245_025
1742 + m[
A12]*Det3_245_015 - m[
A15]*Det3_245_012;
1743 G4double Det4_1245_0134 = m[
A10]*Det3_245_134 - m[
A11]*Det3_245_034
1744 + m[
A13]*Det3_245_014 - m[
A14]*Det3_245_013;
1745 G4double Det4_1245_0135 = m[
A10]*Det3_245_135 - m[
A11]*Det3_245_035
1746 + m[
A13]*Det3_245_015 - m[
A15]*Det3_245_013;
1747 G4double Det4_1245_0145 = m[
A10]*Det3_245_145 - m[
A11]*Det3_245_045
1748 + m[
A14]*Det3_245_015 - m[
A15]*Det3_245_014;
1749 G4double Det4_1245_0234 = m[
A10]*Det3_245_234 - m[
A12]*Det3_245_034
1750 + m[
A13]*Det3_245_024 - m[
A14]*Det3_245_023;
1751 G4double Det4_1245_0235 = m[
A10]*Det3_245_235 - m[
A12]*Det3_245_035
1752 + m[
A13]*Det3_245_025 - m[
A15]*Det3_245_023;
1753 G4double Det4_1245_0245 = m[
A10]*Det3_245_245 - m[
A12]*Det3_245_045
1754 + m[
A14]*Det3_245_025 - m[
A15]*Det3_245_024;
1755 G4double Det4_1245_1234 = m[
A11]*Det3_245_234 - m[
A12]*Det3_245_134
1756 + m[
A13]*Det3_245_124 - m[
A14]*Det3_245_123;
1757 G4double Det4_1245_1235 = m[
A11]*Det3_245_235 - m[
A12]*Det3_245_135
1758 + m[
A13]*Det3_245_125 - m[
A15]*Det3_245_123;
1759 G4double Det4_1245_1245 = m[
A11]*Det3_245_245 - m[
A12]*Det3_245_145
1760 + m[
A14]*Det3_245_125 - m[
A15]*Det3_245_124;
1761 G4double Det4_1345_0123 = m[
A10]*Det3_345_123 - m[
A11]*Det3_345_023
1762 + m[
A12]*Det3_345_013 - m[
A13]*Det3_345_012;
1763 G4double Det4_1345_0124 = m[
A10]*Det3_345_124 - m[
A11]*Det3_345_024
1764 + m[
A12]*Det3_345_014 - m[
A14]*Det3_345_012;
1765 G4double Det4_1345_0125 = m[
A10]*Det3_345_125 - m[
A11]*Det3_345_025
1766 + m[
A12]*Det3_345_015 - m[
A15]*Det3_345_012;
1767 G4double Det4_1345_0134 = m[
A10]*Det3_345_134 - m[
A11]*Det3_345_034
1768 + m[
A13]*Det3_345_014 - m[
A14]*Det3_345_013;
1769 G4double Det4_1345_0135 = m[
A10]*Det3_345_135 - m[
A11]*Det3_345_035
1770 + m[
A13]*Det3_345_015 - m[
A15]*Det3_345_013;
1771 G4double Det4_1345_0145 = m[
A10]*Det3_345_145 - m[
A11]*Det3_345_045
1772 + m[
A14]*Det3_345_015 - m[
A15]*Det3_345_014;
1773 G4double Det4_1345_0234 = m[
A10]*Det3_345_234 - m[
A12]*Det3_345_034
1774 + m[
A13]*Det3_345_024 - m[
A14]*Det3_345_023;
1775 G4double Det4_1345_0235 = m[
A10]*Det3_345_235 - m[
A12]*Det3_345_035
1776 + m[
A13]*Det3_345_025 - m[
A15]*Det3_345_023;
1777 G4double Det4_1345_0245 = m[
A10]*Det3_345_245 - m[
A12]*Det3_345_045
1778 + m[
A14]*Det3_345_025 - m[
A15]*Det3_345_024;
1779 G4double Det4_1345_0345 = m[
A10]*Det3_345_345 - m[
A13]*Det3_345_045
1780 + m[
A14]*Det3_345_035 - m[
A15]*Det3_345_034;
1781 G4double Det4_1345_1234 = m[
A11]*Det3_345_234 - m[
A12]*Det3_345_134
1782 + m[
A13]*Det3_345_124 - m[
A14]*Det3_345_123;
1783 G4double Det4_1345_1235 = m[
A11]*Det3_345_235 - m[
A12]*Det3_345_135
1784 + m[
A13]*Det3_345_125 - m[
A15]*Det3_345_123;
1785 G4double Det4_1345_1245 = m[
A11]*Det3_345_245 - m[
A12]*Det3_345_145
1786 + m[
A14]*Det3_345_125 - m[
A15]*Det3_345_124;
1787 G4double Det4_1345_1345 = m[
A11]*Det3_345_345 - m[
A13]*Det3_345_145
1788 + m[
A14]*Det3_345_135 - m[
A15]*Det3_345_134;
1789 G4double Det4_2345_0123 = m[
A20]*Det3_345_123 - m[
A21]*Det3_345_023
1790 + m[
A22]*Det3_345_013 - m[
A23]*Det3_345_012;
1791 G4double Det4_2345_0124 = m[
A20]*Det3_345_124 - m[
A21]*Det3_345_024
1792 + m[
A22]*Det3_345_014 - m[
A24]*Det3_345_012;
1793 G4double Det4_2345_0125 = m[
A20]*Det3_345_125 - m[
A21]*Det3_345_025
1794 + m[
A22]*Det3_345_015 - m[
A25]*Det3_345_012;
1795 G4double Det4_2345_0134 = m[
A20]*Det3_345_134 - m[
A21]*Det3_345_034
1796 + m[
A23]*Det3_345_014 - m[
A24]*Det3_345_013;
1797 G4double Det4_2345_0135 = m[
A20]*Det3_345_135 - m[
A21]*Det3_345_035
1798 + m[
A23]*Det3_345_015 - m[
A25]*Det3_345_013;
1799 G4double Det4_2345_0145 = m[
A20]*Det3_345_145 - m[
A21]*Det3_345_045
1800 + m[
A24]*Det3_345_015 - m[
A25]*Det3_345_014;
1801 G4double Det4_2345_0234 = m[
A20]*Det3_345_234 - m[
A22]*Det3_345_034
1802 + m[
A23]*Det3_345_024 - m[
A24]*Det3_345_023;
1803 G4double Det4_2345_0235 = m[
A20]*Det3_345_235 - m[
A22]*Det3_345_035
1804 + m[
A23]*Det3_345_025 - m[
A25]*Det3_345_023;
1805 G4double Det4_2345_0245 = m[
A20]*Det3_345_245 - m[
A22]*Det3_345_045
1806 + m[
A24]*Det3_345_025 - m[
A25]*Det3_345_024;
1807 G4double Det4_2345_0345 = m[
A20]*Det3_345_345 - m[
A23]*Det3_345_045
1808 + m[
A24]*Det3_345_035 - m[
A25]*Det3_345_034;
1809 G4double Det4_2345_1234 = m[
A21]*Det3_345_234 - m[
A22]*Det3_345_134
1810 + m[
A23]*Det3_345_124 - m[
A24]*Det3_345_123;
1811 G4double Det4_2345_1235 = m[
A21]*Det3_345_235 - m[
A22]*Det3_345_135
1812 + m[
A23]*Det3_345_125 - m[
A25]*Det3_345_123;
1813 G4double Det4_2345_1245 = m[
A21]*Det3_345_245 - m[
A22]*Det3_345_145
1814 + m[
A24]*Det3_345_125 - m[
A25]*Det3_345_124;
1815 G4double Det4_2345_1345 = m[
A21]*Det3_345_345 - m[
A23]*Det3_345_145
1816 + m[
A24]*Det3_345_135 - m[
A25]*Det3_345_134;
1817 G4double Det4_2345_2345 = m[
A22]*Det3_345_345 - m[
A23]*Det3_345_245
1818 + m[
A24]*Det3_345_235 - m[
A25]*Det3_345_234;
1822 G4double Det5_01234_01234 = m[
A00]*Det4_1234_1234 - m[
A01]*Det4_1234_0234
1823 + m[
A02]*Det4_1234_0134 - m[
A03]*Det4_1234_0124 + m[
A04]*Det4_1234_0123;
1824 G4double Det5_01235_01234 = m[
A00]*Det4_1235_1234 - m[
A01]*Det4_1235_0234
1825 + m[
A02]*Det4_1235_0134 - m[
A03]*Det4_1235_0124 + m[
A04]*Det4_1235_0123;
1826 G4double Det5_01235_01235 = m[
A00]*Det4_1235_1235 - m[
A01]*Det4_1235_0235
1827 + m[
A02]*Det4_1235_0135 - m[
A03]*Det4_1235_0125 + m[
A05]*Det4_1235_0123;
1828 G4double Det5_01245_01234 = m[
A00]*Det4_1245_1234 - m[
A01]*Det4_1245_0234
1829 + m[
A02]*Det4_1245_0134 - m[
A03]*Det4_1245_0124 + m[
A04]*Det4_1245_0123;
1830 G4double Det5_01245_01235 = m[
A00]*Det4_1245_1235 - m[
A01]*Det4_1245_0235
1831 + m[
A02]*Det4_1245_0135 - m[
A03]*Det4_1245_0125 + m[
A05]*Det4_1245_0123;
1832 G4double Det5_01245_01245 = m[
A00]*Det4_1245_1245 - m[
A01]*Det4_1245_0245
1833 + m[
A02]*Det4_1245_0145 - m[
A04]*Det4_1245_0125 + m[
A05]*Det4_1245_0124;
1834 G4double Det5_01345_01234 = m[
A00]*Det4_1345_1234 - m[
A01]*Det4_1345_0234
1835 + m[
A02]*Det4_1345_0134 - m[
A03]*Det4_1345_0124 + m[
A04]*Det4_1345_0123;
1836 G4double Det5_01345_01235 = m[
A00]*Det4_1345_1235 - m[
A01]*Det4_1345_0235
1837 + m[
A02]*Det4_1345_0135 - m[
A03]*Det4_1345_0125 + m[
A05]*Det4_1345_0123;
1838 G4double Det5_01345_01245 = m[
A00]*Det4_1345_1245 - m[
A01]*Det4_1345_0245
1839 + m[
A02]*Det4_1345_0145 - m[
A04]*Det4_1345_0125 + m[
A05]*Det4_1345_0124;
1840 G4double Det5_01345_01345 = m[
A00]*Det4_1345_1345 - m[
A01]*Det4_1345_0345
1841 + m[
A03]*Det4_1345_0145 - m[
A04]*Det4_1345_0135 + m[
A05]*Det4_1345_0134;
1842 G4double Det5_02345_01234 = m[
A00]*Det4_2345_1234 - m[
A01]*Det4_2345_0234
1843 + m[
A02]*Det4_2345_0134 - m[
A03]*Det4_2345_0124 + m[
A04]*Det4_2345_0123;
1844 G4double Det5_02345_01235 = m[
A00]*Det4_2345_1235 - m[
A01]*Det4_2345_0235
1845 + m[
A02]*Det4_2345_0135 - m[
A03]*Det4_2345_0125 + m[
A05]*Det4_2345_0123;
1846 G4double Det5_02345_01245 = m[
A00]*Det4_2345_1245 - m[
A01]*Det4_2345_0245
1847 + m[
A02]*Det4_2345_0145 - m[
A04]*Det4_2345_0125 + m[
A05]*Det4_2345_0124;
1848 G4double Det5_02345_01345 = m[
A00]*Det4_2345_1345 - m[
A01]*Det4_2345_0345
1849 + m[
A03]*Det4_2345_0145 - m[
A04]*Det4_2345_0135 + m[
A05]*Det4_2345_0134;
1850 G4double Det5_02345_02345 = m[
A00]*Det4_2345_2345 - m[
A02]*Det4_2345_0345
1851 + m[
A03]*Det4_2345_0245 - m[
A04]*Det4_2345_0235 + m[
A05]*Det4_2345_0234;
1852 G4double Det5_12345_01234 = m[
A10]*Det4_2345_1234 - m[
A11]*Det4_2345_0234
1853 + m[
A12]*Det4_2345_0134 - m[
A13]*Det4_2345_0124 + m[
A14]*Det4_2345_0123;
1854 G4double Det5_12345_01235 = m[
A10]*Det4_2345_1235 - m[
A11]*Det4_2345_0235
1855 + m[
A12]*Det4_2345_0135 - m[
A13]*Det4_2345_0125 + m[
A15]*Det4_2345_0123;
1856 G4double Det5_12345_01245 = m[
A10]*Det4_2345_1245 - m[
A11]*Det4_2345_0245
1857 + m[
A12]*Det4_2345_0145 - m[
A14]*Det4_2345_0125 + m[
A15]*Det4_2345_0124;
1858 G4double Det5_12345_01345 = m[
A10]*Det4_2345_1345 - m[
A11]*Det4_2345_0345
1859 + m[
A13]*Det4_2345_0145 - m[
A14]*Det4_2345_0135 + m[
A15]*Det4_2345_0134;
1860 G4double Det5_12345_02345 = m[
A10]*Det4_2345_2345 - m[
A12]*Det4_2345_0345
1861 + m[
A13]*Det4_2345_0245 - m[
A14]*Det4_2345_0235 + m[
A15]*Det4_2345_0234;
1862 G4double Det5_12345_12345 = m[
A11]*Det4_2345_2345 - m[
A12]*Det4_2345_1345
1863 + m[
A13]*Det4_2345_1245 - m[
A14]*Det4_2345_1235 + m[
A15]*Det4_2345_1234;
1868 - m[
A01]*Det5_12345_02345
1869 + m[
A02]*Det5_12345_01345
1870 - m[
A03]*Det5_12345_01245
1871 + m[
A04]*Det5_12345_01235
1872 - m[
A05]*Det5_12345_01234;
1881 G4double mn1OverDet = - oneOverDet;
1883 m[
A00] = Det5_12345_12345*oneOverDet;
1884 m[
A01] = Det5_12345_02345*mn1OverDet;
1885 m[
A02] = Det5_12345_01345*oneOverDet;
1886 m[
A03] = Det5_12345_01245*mn1OverDet;
1887 m[
A04] = Det5_12345_01235*oneOverDet;
1888 m[
A05] = Det5_12345_01234*mn1OverDet;
1890 m[
A11] = Det5_02345_02345*oneOverDet;
1891 m[
A12] = Det5_02345_01345*mn1OverDet;
1892 m[
A13] = Det5_02345_01245*oneOverDet;
1893 m[
A14] = Det5_02345_01235*mn1OverDet;
1894 m[
A15] = Det5_02345_01234*oneOverDet;
1896 m[
A22] = Det5_01345_01345*oneOverDet;
1897 m[
A23] = Det5_01345_01245*mn1OverDet;
1898 m[
A24] = Det5_01345_01235*oneOverDet;
1899 m[
A25] = Det5_01345_01234*mn1OverDet;
1901 m[
A33] = Det5_01245_01245*oneOverDet;
1902 m[
A34] = Det5_01245_01235*mn1OverDet;
1903 m[
A35] = Det5_01245_01234*oneOverDet;
1905 m[
A44] = Det5_01235_01235*oneOverDet;
1906 m[
A45] = Det5_01235_01234*mn1OverDet;
1908 m[
A55] = Det5_01234_01234*oneOverDet;
1947 if (h00 <= 0) {
return; }
1948 h00 = 1.0 / std::sqrt(h00);
1957 h11 =
m[
A11] - (g10 * g10);
1958 if (h11 <= 0) {
return; }
1959 h11 = 1.0 / std::sqrt(h11);
1964 g21 = (
m[
A21] - (g10 * g20)) * h11;
1965 g31 = (
m[
A31] - (g10 * g30)) * h11;
1966 g41 = (
m[
A41] - (g10 * g40)) * h11;
1970 h22 =
m[
A22] - (g20 * g20) - (g21 * g21);
1971 if (h22 <= 0) {
return; }
1972 h22 = 1.0 / std::sqrt(h22);
1977 g32 = (
m[
A32] - (g20 * g30) - (g21 * g31)) * h22;
1978 g42 = (
m[
A42] - (g20 * g40) - (g21 * g41)) * h22;
1982 h33 =
m[
A33] - (g30 * g30) - (g31 * g31) - (g32 * g32);
1983 if (h33 <= 0) {
return; }
1984 h33 = 1.0 / std::sqrt(h33);
1988 g43 = (
m[
A43] - (g30 * g40) - (g31 * g41) - (g32 * g42)) * h33;
1992 h44 =
m[
A44] - (g40 * g40) - (g41 * g41) - (g42 * g42) - (g43 * g43);
1993 if (h44 <= 0) {
return; }
1994 h44 = 1.0 / std::sqrt(h44);
2001 h43 = -h33 * g43 * h44;
2002 h32 = -h22 * g32 * h33;
2003 h42 = -h22 * (g32 * h43 + g42 * h44);
2004 h21 = -h11 * g21 * h22;
2005 h31 = -h11 * (g21 * h32 + g31 * h33);
2006 h41 = -h11 * (g21 * h42 + g31 * h43 + g41 * h44);
2007 h10 = -h00 * g10 * h11;
2008 h20 = -h00 * (g10 * h21 + g20 * h22);
2009 h30 = -h00 * (g10 * h31 + g20 * h32 + g30 * h33);
2010 h40 = -h00 * (g10 * h41 + g20 * h42 + g30 * h43 + g40 * h44);
2015 m[
A00] = h00 * h00 + h10 * h10 + h20 * h20 + h30 * h30 + h40 * h40;
2016 m[
A01] = h10 * h11 + h20 * h21 + h30 * h31 + h40 * h41;
2017 m[
A11] = h11 * h11 + h21 * h21 + h31 * h31 + h41 * h41;
2018 m[
A02] = h20 * h22 + h30 * h32 + h40 * h42;
2019 m[
A12] = h21 * h22 + h31 * h32 + h41 * h42;
2020 m[
A22] = h22 * h22 + h32 * h32 + h42 * h42;
2021 m[
A03] = h30 * h33 + h40 * h43;
2022 m[
A13] = h31 * h33 + h41 * h43;
2023 m[
A23] = h32 * h33 + h42 * h43;
2024 m[
A33] = h33 * h33 + h43 * h43;
2053 G4double h00, h11, h22, h33, h44, h55;
2070 if (h00 <= 0) {
return; }
2071 h00 = 1.0 / std::sqrt(h00);
2081 h11 =
m[
A11] - (g10 * g10);
2082 if (h11 <= 0) {
return; }
2083 h11 = 1.0 / std::sqrt(h11);
2088 g21 = (
m[
A21] - (g10 * g20)) * h11;
2089 g31 = (
m[
A31] - (g10 * g30)) * h11;
2090 g41 = (
m[
A41] - (g10 * g40)) * h11;
2091 g51 = (
m[
A51] - (g10 * g50)) * h11;
2095 h22 =
m[
A22] - (g20 * g20) - (g21 * g21);
2096 if (h22 <= 0) {
return; }
2097 h22 = 1.0 / std::sqrt(h22);
2102 g32 = (
m[
A32] - (g20 * g30) - (g21 * g31)) * h22;
2103 g42 = (
m[
A42] - (g20 * g40) - (g21 * g41)) * h22;
2104 g52 = (
m[
A52] - (g20 * g50) - (g21 * g51)) * h22;
2108 h33 =
m[
A33] - (g30 * g30) - (g31 * g31) - (g32 * g32);
2109 if (h33 <= 0) {
return; }
2110 h33 = 1.0 / std::sqrt(h33);
2115 g43 = (
m[
A43] - (g30 * g40) - (g31 * g41) - (g32 * g42)) * h33;
2116 g53 = (
m[
A53] - (g30 * g50) - (g31 * g51) - (g32 * g52)) * h33;
2120 h44 =
m[
A44] - (g40 * g40) - (g41 * g41) - (g42 * g42) - (g43 * g43);
2121 if (h44 <= 0) {
return; }
2122 h44 = 1.0 / std::sqrt(h44);
2126 g54 = (
m[
A54] - (g40 * g50) - (g41 * g51) - (g42 * g52) - (g43 * g53)) * h44;
2130 h55 =
m[
A55] - (g50*g50) - (g51*g51) - (g52*g52) - (g53*g53) - (g54*g54);
2131 if (h55 <= 0) {
return; }
2132 h55 = 1.0 / std::sqrt(h55);
2139 h54 = -h44 * g54 * h55;
2140 h43 = -h33 * g43 * h44;
2141 h53 = -h33 * (g43 * h54 + g53 * h55);
2142 h32 = -h22 * g32 * h33;
2143 h42 = -h22 * (g32 * h43 + g42 * h44);
2144 h52 = -h22 * (g32 * h53 + g42 * h54 + g52 * h55);
2145 h21 = -h11 * g21 * h22;
2146 h31 = -h11 * (g21 * h32 + g31 * h33);
2147 h41 = -h11 * (g21 * h42 + g31 * h43 + g41 * h44);
2148 h51 = -h11 * (g21 * h52 + g31 * h53 + g41 * h54 + g51 * h55);
2149 h10 = -h00 * g10 * h11;
2150 h20 = -h00 * (g10 * h21 + g20 * h22);
2151 h30 = -h00 * (g10 * h31 + g20 * h32 + g30 * h33);
2152 h40 = -h00 * (g10 * h41 + g20 * h42 + g30 * h43 + g40 * h44);
2153 h50 = -h00 * (g10 * h51 + g20 * h52 + g30 * h53 + g40 * h54 + g50 * h55);
2158 m[
A00] = h00 * h00 + h10 * h10 + h20 * h20 + h30 * h30 + h40 * h40 + h50*h50;
2159 m[
A01] = h10 * h11 + h20 * h21 + h30 * h31 + h40 * h41 + h50 * h51;
2160 m[
A11] = h11 * h11 + h21 * h21 + h31 * h31 + h41 * h41 + h51 * h51;
2161 m[
A02] = h20 * h22 + h30 * h32 + h40 * h42 + h50 * h52;
2162 m[
A12] = h21 * h22 + h31 * h32 + h41 * h42 + h51 * h52;
2163 m[
A22] = h22 * h22 + h32 * h32 + h42 * h42 + h52 * h52;
2164 m[
A03] = h30 * h33 + h40 * h43 + h50 * h53;
2165 m[
A13] = h31 * h33 + h41 * h43 + h51 * h53;
2166 m[
A23] = h32 * h33 + h42 * h43 + h52 * h53;
2167 m[
A33] = h33 * h33 + h43 * h43 + h53 * h53;
2168 m[
A04] = h40 * h44 + h50 * h54;
2169 m[
A14] = h41 * h44 + h51 * h54;
2170 m[
A24] = h42 * h44 + h52 * h54;
2171 m[
A34] = h43 * h44 + h53 * h54;
2172 m[
A44] = h44 * h44 + h54 * h54;
2208 + m[
A02]*Det2_12_01;
2210 + m[
A02]*Det2_13_01;
2212 + m[
A03]*Det2_13_01;
2214 + m[
A02]*Det2_23_01;
2216 + m[
A03]*Det2_23_01;
2218 + m[
A03]*Det2_23_02;
2220 + m[
A12]*Det2_23_01;
2222 + m[
A13]*Det2_23_01;
2224 + m[
A13]*Det2_23_02;
2226 + m[
A13]*Det2_23_12;
2231 - m[
A01]*Det3_123_023
2232 + m[
A02]*Det3_123_013
2233 - m[
A03]*Det3_123_012;
2242 G4double mn1OverDet = - oneOverDet;
2244 m[
A00] = Det3_123_123 * oneOverDet;
2245 m[
A01] = Det3_123_023 * mn1OverDet;
2246 m[
A02] = Det3_123_013 * oneOverDet;
2247 m[
A03] = Det3_123_012 * mn1OverDet;
2250 m[
A11] = Det3_023_023 * oneOverDet;
2251 m[
A12] = Det3_023_013 * mn1OverDet;
2252 m[
A13] = Det3_023_012 * oneOverDet;
2254 m[
A22] = Det3_013_013 * oneOverDet;
2255 m[
A23] = Det3_013_012 * mn1OverDet;
2257 m[
A33] = Det3_012_012 * oneOverDet;
static G4ThreadLocal G4double adjustment6x6
static G4ThreadLocal G4double posDefFraction6x6
virtual G4int num_row() const
G4ErrorSymMatrix operator/(const G4ErrorSymMatrix &mat1, G4double t)
G4ErrorSymMatrix similarity(const G4ErrorMatrix &m1) const
void invert5(G4int &ifail)
virtual G4int num_col() const
G4ErrorSymMatrix apply(G4double(*f)(G4double, G4int, G4int)) const
G4ErrorSymMatrix & operator=(const G4ErrorSymMatrix &m2)
static const G4double CHOLESKY_THRESHOLD_5x5
G4ErrorSymMatrix sub(G4int min_row, G4int max_row) const
void invertHaywood6(G4int &ifail)
void invertBunchKaufman(G4int &ifail)
void invertHaywood5(G4int &ifail)
G4ErrorSymMatrix & operator-=(const G4ErrorSymMatrix &m2)
static const G4double CHOLESKY_THRESHOLD_6x6
G4ErrorSymMatrix dsum(const G4ErrorSymMatrix &mat1, const G4ErrorSymMatrix &mat2)
G4ErrorMatrix & operator=(const G4ErrorMatrix &m2)
void invert(G4int &ifail)
G4ErrorMatrix operator-(const G4ErrorMatrix &mat1, const G4ErrorSymMatrix &mat2)
std::vector< G4double >::const_iterator G4ErrorMatrixConstIter
G4ErrorMatrix operator+(const G4ErrorMatrix &mat1, const G4ErrorSymMatrix &mat2)
G4ErrorSymMatrix operator*(const G4ErrorSymMatrix &mat1, G4double t)
void invertCholesky6(G4int &ifail)
std::vector< G4double > m
static const G4double CHOLESKY_CREEP_6x6
G4ErrorSymMatrix & operator/=(G4double t)
#define CHK_DIM_1(c1, r2, fun)
G4ErrorSymMatrix operator-() const
std::vector< G4double > m
G4int dfact_matrix(G4double &det, G4int *ir)
G4ErrorSymMatrix & operator+=(const G4ErrorSymMatrix &m2)
static void error(const char *s)
void invert4(G4int &ifail)
std::vector< G4double >::iterator G4ErrorMatrixIter
void invertHaywood4(G4int &ifail)
#define CHK_DIM_2(r1, r2, c1, c2, fun)
static const G4double CHOLESKY_CREEP_5x5
static G4ThreadLocal G4double posDefFraction5x5
std::ostream & operator<<(std::ostream &os, const G4ErrorSymMatrix &q)
virtual ~G4ErrorSymMatrix()
G4ErrorMatrix & operator+=(const G4ErrorMatrix &m2)
G4ErrorMatrix & operator-=(const G4ErrorMatrix &m2)
void invert6(G4int &ifail)
static const G4double alpha
G4ErrorSymMatrix similarityT(const G4ErrorMatrix &m1) const
G4ErrorSymMatrix & operator*=(G4double t)
G4double determinant() const
void invertCholesky5(G4int &ifail)
void assign(const G4ErrorMatrix &m2)
G4GLOB_DLL std::ostream G4cerr
static G4ThreadLocal G4double adjustment5x5