18 int& szero,
int& serr,
int s_stop) {
20 "void inverse_DynArr_prot(const DynArr<DoubleAc>& mi, "
21 "DynArr<DoubleAc>& mr, int& s_zero, int& serr, int s_stop)");
32 if (mi.
ac(0, 0).get() == 0.0) {
37 mr.
ac(0, 0) = 1.0 / mi.
ac(0, 0);
45 for (
long n = 0; n < q; n++) mr.
ac(n, n) =
DoubleAc(1.0);
47 for (
long nr = 0; nr < q; nr++) {
51 for (
long nr1 = nr; nr1 < q; nr1++) {
52 if (
fabs(mii.
ac(nr1, nr)) > d) {
66 if (s_stop == 1)
return;
69 for (
long nc = nr; nc < q; nc++) {
71 mii.
ac(nr, nc) = mii.
ac(nmax, nc);
74 for (
long nc = 0; nc < q; nc++) {
76 mr.
ac(nr, nc) = mr.
ac(nmax, nc);
81 for (
long nr1 = 0; nr1 < q; nr1++) {
86 for (
long nc = nr; nc < q; nc++) {
87 mii.
ac(nr1, nc) -= k * mii.
ac(nr, nc);
89 for (
long nc = 0; nc < q; nc++) {
90 mr.
ac(nr1, nc) -= k * mr.
ac(nr, nc);
94 for (
long nc = nr; nc < q; nc++) mii.
ac(nr, nc) /= t;
95 for (
long nc = 0; nc < q; nc++) mr.
ac(nr, nc) /= t;
101 "void inverse_DynArr(const DynArr<double>& mi, DynArr<double>& mr, "
111 if (mi.
ac(0, 0) == 0.0) {
115 mr.
ac(0, 0) = 1.0 / mi.
ac(0, 0);
122 for (
long n = 0; n < miqel[0]; n++) mrr.
ac(n, n) = 1.0;
131 "void inverse_DynArr(const DynArr<DoubleAc>& mi, DynArr<DoubleAc>& "
132 "mr1, int& szero, int& serr1, DynArr<DoubleAc>& mr2, int& serr2)");
142 if (mi.
ac(0, 0).get() == 0.0) {
148 mr1.
ac(0, 0) = 1.0 / mi.
ac(0, 0).get();
155 for (
long n1 = 0; n1 < q; n1++) {
156 for (
long n2 = 0; n2 < q; n2++) {
157 mii.
ac(n1, n2) = double(mi.
ac(n1, n2));
162 for (
long n = 0; n < q; n++) mrr.
ac(n, n) = 1.0;
165 if (szero != 0)
return;
168 for (
long n = 0; n < q; n++) mrr.
ac(n, n) =
DoubleAc(1.0);
178 "void inverse_DynArr(const DynArr<double>& mi, const "
179 "DynLinArr<long>& s_var, DynArr<double>& mr, int& serr)");
189 for (
long n = 0; n < q; n++) {
202 for (
int n1 = 0; n1 < q; n1++) {
203 if (s_var[n1] != 1)
continue;
205 for (
int n2 = 0; n2 < q; n2++) {
206 if (s_var[n2] == 1) {
207 mi1.
ac(nv1, nv2) = mi.
ac(n1, n2);
218 for (
int n1 = 0; n1 < q; n1++) {
219 if (s_var[n1] != 1)
continue;
221 for (
int n2 = 0; n2 < q; n2++) {
222 if (s_var[n2] == 1) {
223 mr.
ac(n1, n2) = mr1.
ac(nv1, nv2);
236 "void inverse_DynArr_prot(const DynArr<DoubleAc>& mi, const "
237 "DynLinArr<long>& s_var, DynArr<DoubleAc>& mr, int& szero, int& "
238 "serr, int s_stop=1)");
249 for (
long n = 0; n < q; n++) {
262 for (
int n1 = 0; n1 < q; n1++) {
263 if (s_var[n1] != 1)
continue;
265 for (
int n2 = 0; n2 < q; n2++) {
266 if (s_var[n2] == 1) {
267 mi1.
ac(nv1, nv2) = mi.
ac(n1, n2);
278 for (
int n1 = 0; n1 < q; n1++) {
279 if (s_var[n1] != 1)
continue;
281 for (
int n2 = 0; n2 < q; n2++) {
282 if (s_var[n2] == 1) {
283 mr.
ac(n1, n2) = mr1.
ac(nv1, nv2);
296 "void inverse_DynArr(const DynArr<DoubleAc>& mi, const "
297 "DynLinArr<long>& s_var, DynArr<DoubleAc>& mr1, int& szero, int& "
298 "serr1, DynArr<DoubleAc>& mr2, int& serr2 )");
308 for (
long n = 0; n < q; n++) {
321 for (
int n1 = 0; n1 < q; n1++) {
322 if (s_var[n1] != 1)
continue;
324 for (
int n2 = 0; n2 < q; n2++) {
325 if (s_var[n2] == 1) {
326 mi1.
ac(nv1, nv2) = mi.
ac(n1, n2);
341 for (
int n1 = 0; n1 < q; n1++) {
342 if (s_var[n1] == 1) {
344 for (
int n2 = 0; n2 < q; n2++) {
345 if (s_var[n2] == 1) {
346 mr1.
ac(n1, n2) = mrr1.
ac(nv1, nv2);
348 mr2.
ac(n1, n2) = mrr2.
ac(nv1, nv2);
359 mfunname(
"DoubleAc determinant_DynArr(const DynArr<DoubleAc>& mi, long q)");
372#ifndef ALWAYS_USE_TEMPLATE_PAR_AS_FUN_PAR
373 return abstract_determinant<DynArr<DoubleAc>,
DoubleAc>(mii, q);
383 mfunname(
"DoubleAc determinant_DynArr(...)");
396 long miq = std::min(miqel[0], miqel[1]);
399 for (
long n = 0; n < s_var.
get_qel(); n++) {
404 if (qvar == q)
break;
413 for (
int n1 = 0; n1 < miq; n1++) {
414 if (s_var[n1] != 1)
continue;
416 for (
int n2 = 0; n2 < miq; n2++) {
417 if (s_var[n2] == 1) {
418 mi1.
ac(nv1, nv2) = mi.
ac(n1, n2);
#define check_econd11(a, signb, stream)
#define check_econd12(a, sign, b, stream)
double left_limit(void) const
void assignAll(const T &val)
const DynLinArr< long > & get_qel(void) const
DoubleAc determinant_DynArr(const DynArr< DoubleAc > &mi, long q)
X abstract_determinant(M &mi, long q, X)
void inverse_DynArr_prot(const DynArr< DoubleAc > &mi, DynArr< DoubleAc > &mr, int &szero, int &serr, int s_stop)
DoubleAc fabs(const DoubleAc &f)
void inverse_DynArr(const DynArr< double > &mi, DynArr< double > &mr, int &serr)
void copy_DynArr(const DynArr< T > &s, DynArr< X > &d)