16 int& szero,
int& serr,
int s_stop) {
17 mfunname(
"void inverse_DynArr_prot(const DynArr<DoubleAc>& mi, "
18 "DynArr<DoubleAc>& mr, int& s_zero, int& serr, int s_stop)");
30 if (mi.
ac(0, 0).get() == 0.0) {
35 mr.
ac(0, 0) = 1.0 / mi.
ac(0, 0);
45 for (n = 0; n < q; n++)
50 for (nr = 0; nr < q; nr++) {
54 for (nr1 = nr; nr1 < q; nr1++) {
55 if (
fabs(mii.
ac(nr1, nr)) > d) {
70 if (s_stop == 1)
return;
73 for (nc = nr; nc < q; nc++) {
75 mii.
ac(nr, nc) = mii.
ac(nmax, nc);
78 for (nc = 0; nc < q; nc++) {
80 mr.
ac(nr, nc) = mr.
ac(nmax, nc);
88 for (nr1 = 0; nr1 < q; nr1++) {
93 for (nc = nr; nc < q; nc++) {
94 mii.
ac(nr1, nc) -= k * mii.
ac(nr, nc);
96 for (nc = 0; nc < q; nc++) {
97 mr.
ac(nr1, nc) -= k * mr.
ac(nr, nc);
101 for (nc = nr; nc < q; nc++) {
104 for (nc = 0; nc < q; nc++) {
114 mfunname(
"void inverse_DynArr(const DynArr<double>& mi, DynArr<double>& mr, "
124 if (mi.
ac(0, 0) == 0.0) {
128 mr.
ac(0, 0) = 1.0 / mi.
ac(0, 0);
136 for (n = 0; n < miqel[0]; n++)
145 mfunname(
"void inverse_DynArr(const DynArr<DoubleAc>& mi, DynArr<DoubleAc>& "
146 "mr1, int& szero, int& serr1, DynArr<DoubleAc>& mr2, int& serr2)");
156 if (mi.
ac(0, 0).get() == 0.0) {
162 mr1.
ac(0, 0) = 1.0 / mi.
ac(0, 0).get();
177 for (n1 = 0; n1 < q; n1++) {
178 for (n2 = 0; n2 < q; n2++) {
179 mii.
ac(n1, n2) = double(mi.
ac(n1, n2));
185 for (n = 0; n < q; n++)
190 if (szero != 0)
return;
194 for (n = 0; n < q; n++)
207 mfunname(
"void inverse_DynArr(const DynArr<double>& mi, const "
208 "DynLinArr<long>& s_var, DynArr<double>& mr, int& serr)");
221 for (n = 0; n < q; n++) {
235 for (n1 = 0; n1 < q; n1++) {
236 if (s_var[n1] == 1) {
238 for (n2 = 0; n2 < q; n2++) {
239 if (s_var[n2] == 1) {
240 mi1.
ac(nv1, nv2) = mi.
ac(n1, n2);
252 for (n1 = 0; n1 < q; n1++) {
253 if (s_var[n1] == 1) {
255 for (n2 = 0; n2 < q; n2++) {
256 if (s_var[n2] == 1) {
257 mr.
ac(n1, n2) = mr1.
ac(nv1, nv2);
271 mfunname(
"void inverse_DynArr_prot(const DynArr<DoubleAc>& mi, const "
272 "DynLinArr<long>& s_var, DynArr<DoubleAc>& mr, int& szero, int& "
273 "serr, int s_stop=1)");
286 for (n = 0; n < q; n++) {
300 for (n1 = 0; n1 < q; n1++) {
301 if (s_var[n1] == 1) {
303 for (n2 = 0; n2 < q; n2++) {
304 if (s_var[n2] == 1) {
305 mi1.
ac(nv1, nv2) = mi.
ac(n1, n2);
317 for (n1 = 0; n1 < q; n1++) {
318 if (s_var[n1] == 1) {
320 for (n2 = 0; n2 < q; n2++) {
321 if (s_var[n2] == 1) {
322 mr.
ac(n1, n2) = mr1.
ac(nv1, nv2);
336 mfunname(
"void inverse_DynArr(const DynArr<DoubleAc>& mi, const "
337 "DynLinArr<long>& s_var, DynArr<DoubleAc>& mr1, int& szero, int& "
338 "serr1, DynArr<DoubleAc>& mr2, int& serr2 )");
351 for (n = 0; n < q; n++) {
365 for (n1 = 0; n1 < q; n1++) {
366 if (s_var[n1] == 1) {
368 for (n2 = 0; n2 < q; n2++) {
369 if (s_var[n2] == 1) {
370 mi1.
ac(nv1, nv2) = mi.
ac(n1, n2);
386 for (n1 = 0; n1 < q; n1++) {
387 if (s_var[n1] == 1) {
389 for (n2 = 0; n2 < q; n2++) {
390 if (s_var[n2] == 1) {
391 mr1.
ac(n1, n2) = mrr1.
ac(nv1, nv2);
393 mr2.
ac(n1, n2) = mrr2.
ac(nv1, nv2);
405 mfunname(
"DoubleAc determinant_DynArr(const DynArr<DoubleAc>& mi, long q)");
418#ifndef ALWAYS_USE_TEMPLATE_PAR_AS_FUN_PAR
419 return abstract_determinant<DynArr<DoubleAc>,
DoubleAc>(mii, q);
429 mfunname(
"DoubleAc determinant_DynArr(...)");
443 long miq =
find_min(miqel[0], miqel[1]);
447 for (n = 0; n < s_var.
get_qel(); n++) {
452 if (qvar == q)
break;
464 for (n1 = 0; n1 < miq; n1++) {
465 if (s_var[n1] == 1) {
467 for (n2 = 0; n2 < miq; n2++) {
468 if (s_var[n2] == 1) {
469 mi1.
ac(nv1, nv2) = mi.
ac(n1, n2);
void copy_DynArr(const DynArr< T > &s, DynArr< X > &d)
DoubleAc fabs(const DoubleAc &f)
DoubleAc find_min(const DoubleAc &a, const DoubleAc &b)
#define check_econd11(a, signb, stream)
#define check_econd12(a, sign, b, stream)
X abstract_determinant(M &mi, long q, X)
double left_limit(void) const
void assignAll(const T &val)
const DynLinArr< long > & get_qel(void) const
void inverse_DynArr_prot(const DynArr< DoubleAc > &mi, DynArr< DoubleAc > &mr, int &szero, int &serr, int s_stop)
void inverse_DynArr(const DynArr< double > &mi, DynArr< double > &mr, int &serr)
DoubleAc determinant_DynArr(const DynArr< DoubleAc > &mi, long q)