20 Ifile <<
"DynLinArr<int>:";
22 file <<
" q=" << q <<
'\n';
27 for (
long i = 0; i < q; i++) {
31 Ifile << std::setw(4) << i <<
' ' << f[i] <<
'\n';
38 Ifile <<
"DynLinArr<long>:";
40 file <<
" q=" << q <<
'\n';
46 for (i = 0; i < q; i++) {
50 Ifile << std::setw(4) << i <<
' ' << f[i] <<
'\n';
58 Ifile <<
"DynLinArr<float>:";
60 file <<
" q=" << q <<
'\n';
66 for (i = 0; i < q; i++) {
70 Ifile << std::setw(4) << i <<
' ' << f[i] <<
'\n';
78 Ifile <<
"DynLinArr<double>:";
80 file <<
" q=" << q <<
'\n';
86 for (i = 0; i < q; i++) {
90 Ifile << std::setw(4) << i <<
' ' << f[i] <<
'\n';
99 Ifile <<
"Two arrays DynLinArr<double>:";
103 if (q_max > q2) q_max = q2;
104 file <<
" q1=" << q1 <<
" q2=" << q2 <<
'\n';
107 if (q_max <= 0)
return;
111 Ifile <<
"index array1 array2\n";
113 for (i = 0; i < q_max; i++) {
114 Ifile << std::setw(4) << i <<
' ';
116 file << std::setw(18) << f1[i] <<
' ';
120 file << std::setw(18) << f2[i] <<
'\n';
127 for (i = 0; i < q1; i++) {
128 file << std::setw(18) << f1[i] <<
' ';
132 for (i = 0; i < q2; i++) {
133 file << std::setw(18) << f2[i] <<
' ';
143 Ifile <<
"One DynLinArr<int> array and one DynLinArr<double>:\n";
147 if (q_max < qdar) q_max = qdar;
150 Ifile <<
" qiar=" << qiar <<
" qdar=" << qdar <<
'\n';
157 Ifile <<
"index int array double array\n";
159 for (i = 0; i < q_max; i++) {
160 Ifile << std::setw(4) << i <<
' ';
162 file << std::setw(8) << iar[i] <<
' ';
166 file << std::setw(18) << dar[i] <<
' ';
178 Ifile <<
"One DynLinArr<int> array and three arrays DynLinArr<double>:\n";
184 if (q_max < qdar1) q_max = qdar1;
185 if (q_max < qdar2) q_max = qdar2;
186 if (q_max < qdar3) q_max = qdar3;
189 Ifile <<
"qiar=" << qiar <<
" qdar1=" << qdar1 <<
" qdar2=" << qdar2
190 <<
" qdar3=" << qdar3 <<
'\n';
199 Ifile <<
"index int array double array1 double array2 double "
202 for (i = 0; i < q_max; i++) {
203 Ifile << std::setw(4) << i <<
' ';
205 file << std::setw(8) << iar[i] <<
' ';
209 file << std::setw(18) << dar1[i] <<
' ';
213 file << std::setw(18) << dar2[i] <<
' ';
217 file << std::setw(18) << dar3[i] <<
'\n';
227 "void print_DynArr_int_w(ostream& file, const DynArr<int>& f, int w)");
229 Ifile <<
"DynArr<int>:";
231 file <<
" qdim=" << qdim <<
" sizes:";
235 for (n = 0; n < qdim; n++) {
236 file <<
' ' << qe[n];
244 if (
indn.
n + 3 + q * (w + 1) <= 80) {
247 for (i = 0; i < q; i++) {
248 file <<
' ' << std::setw(w) << f.
ac(i);
254 for (i = 0; i < q; i++) {
255 Ifile << std::setw(4) << i <<
' ' << f.
ac(i) <<
'\n';
258 }
else if (qdim == 2) {
261 if (qr <= 0 && qc <= 0)
return;
263 if (
indn.
n + 3 + qc * (w + 1) <= 80) {
264 Ifile <<
"first index - columns, second index - lines\n";
265 Ifile <<
"first index\n";
267 for (ir = 0; ir < qr; ir++) {
268 Ifile << std::setw(3) << ir;
269 for (ic = 0; ic < qc; ic++) {
270 Ifile <<
' ' << std::setw(w) << f.
ac(ir, ic);
274 }
else if (
indn.
n + 3 + qr * (w + 1) <= 80) {
275 Imcout <<
"first index - lines, second index - columns\n";
276 Imcout <<
"second index\n";
278 for (ic = 0; ic < qc; ic++) {
279 Ifile << std::setw(3) << ic;
280 for (ir = 0; ir < qr; ir++) {
281 Ifile <<
' ' << std::setw(w) << f.
ac(ir, ic);
286 Ifile <<
" row col value of element\n";
288 for (ir = 0; ir < qr; ir++) {
289 for (ic = 0; ic < qc; ic++) {
290 Ifile << std::setw(4) << ir <<
' ' << std::setw(4) << ic <<
' ' << f.
ac(ir, ic)
298 while ((at = iter_f.
more()) != NULL) {
316 mfunname(
"void print_DynArr_double(ostream& file, const DynArr<double>& f)");
318 Ifile <<
"DynArr<double>:";
320 file <<
" qdim=" << qdim <<
" sizes:";
324 for (n = 0; n < qdim; n++) {
325 file <<
' ' << qe[n];
334 for (i = 0; i < q; i++) {
336 file << f.
ac(i) <<
' ';
338 Ifile << std::setw(4) << i <<
' ' << f.
ac(i) <<
'\n';
342 }
else if (qdim == 2) {
345 if (qr <= 0 && qc <= 0)
return;
349 for (ir = 0; ir < qr; ir++) {
351 for (ic = 0; ic < qc; ic++) {
353 file << f.
ac(ir, ic) <<
' ';
355 Ifile << std::setw(4) << ir <<
' ' << std::setw(4) << ic <<
' ' << f.
ac(ir, ic)
368 mfunname(
"void print_DynArr_float(ostream& file, const DynArr<float>& f)");
370 Ifile <<
"DynArr<float>:";
372 file <<
" qdim=" << qdim <<
" sizes:";
375 for (
long n = 0; n < qdim; n++) {
376 file <<
' ' << qe[n];
385 for (i = 0; i < q; i++) {
387 file << f.
ac(i) <<
' ';
389 Ifile << std::setw(4) << i <<
' ' << f.
ac(i) <<
'\n';
393 }
else if (qdim == 2) {
396 if (qr <= 0 && qc <= 0)
return;
400 for (ir = 0; ir < qr; ir++) {
402 for (ic = 0; ic < qc; ic++) {
404 file << f.
ac(ir, ic) <<
' ';
406 Ifile << std::setw(4) << ir <<
' ' << std::setw(4) << ic <<
' ' << f.
ac(ir, ic)
420 mcerr <<
"gconfirm_ind(...): "
421 <<
"qel.get_qel()!= ind.get_qel()\n"
422 <<
"qel.get_qel()=" << qel.
get_qel()
423 <<
"ind.get_qel()=" << ind.
get_qel() <<
'\n';
429 for (n = 0; n < qd; n++)
430 if (ind[n] < 0 || ind[n] >= qel[n])
return 0;
435 mcerr <<
"gconfirm_ind_ext(...): "
436 <<
"qel.get_qel()> ind.get_qel()\n"
437 <<
"qel.get_qel()=" << qel.
get_qel()
438 <<
" ind.get_qel()=" << ind.
get_qel() <<
'\n';
443 for (n = 0; n < qd; n++)
444 if (ind[n] < 0 || ind[n] >= qel[n])
return 0;
445 for (n = qd; n < ind.
get_qel(); n++)
446 if (ind[n] != 0)
return 0;
453 if (qdim <= 0)
return 0;
454 if (qdim != f.
get_qel())
return 0;
456 for (n = qdim - 1; n >= 0; n--) {
457 if (f[n] < qel[n] - 1) {
465 for (n = 0; n < qdim - 1; n++) f[n] = qel[n] - 1;
466 f[qdim - 1] = qel[qdim - 1];
468 for (n = qdim - 1; n >= 0; n--) {
469 if (f.
acu(n) < qel.
acu(n) - 1) {
477 for (n = 0; n < qdim - 1; n++) f.
acu(n) = qel.
acu(n) - 1;
478 f.
acu(qdim - 1) = qel.
acu(qdim - 1);
486 if (qdim <= 0)
return 0;
487 if (qdim != f.
get_qel())
return 0;
488 for (n = qdim - 1; n >= 0; n--) {
489 if (f[n] < qel[n] - 1) {
492 for (n1 = n + 1; n1 < qdim; n1++) f[n1] = f[n];
496 for (n = 0; n < qdim - 1; n++) f[n] = qel[n] - 1;
497 f[qdim - 1] = qel[qdim - 1];
504 if (qdim <= 0)
return 0;
505 if (qdim != f.
get_qel())
return 0;
506 for (n = qdim - 1; n >= 0; n--) {
514 for (n = 0; n < qdim - 1; n++) f[n] = 0;
const DynLinArr< long > & get_qel(void) const
long get_qdim(void) const
const DynLinArr< long > & get_ncur(void) const
void print_DynArr_double(std::ostream &file, const DynArr< double > &f)
std::ostream & noindent(std::ostream &f)
void print_DynArr_float(std::ostream &file, const DynArr< float > &f)
void print_DynLinArr_int_double3(std::ostream &file, const DynLinArr< int > &iar, const DynLinArr< double > &dar1, const DynLinArr< double > &dar2, const DynLinArr< double > &dar3)
const int pq_arrelem_in_line
void print_DynLinArr_long(std::ostream &file, const DynLinArr< long > &f)
void print_DynLinArr_int_double(std::ostream &file, const DynLinArr< int > &iar, const DynLinArr< double > &dar)
int find_prev_comb(const DynLinArr< long > &qel, DynLinArr< long > &f)
void print_DynLinArr_double2(std::ostream &file, const DynLinArr< double > &f1, const DynLinArr< double > &f2)
int gconfirm_ind_ext(const DynLinArr< long > &qel, const DynLinArr< long > &ind)
void print_DynLinArr_float(std::ostream &file, const DynLinArr< float > &f)
int gconfirm_ind(const DynLinArr< long > &qel, const DynLinArr< long > &ind)
void print_DynLinArr_double(std::ostream &file, const DynLinArr< double > &f)
void print_DynArr_int_w(std::ostream &file, const DynArr< int > &f, int w)
int find_next_comb(const DynLinArr< long > &qel, DynLinArr< long > &f)
int find_next_comb_not_less(const DynLinArr< long > &qel, DynLinArr< long > &f)
void print_DynLinArr_int(std::ostream &file, const DynLinArr< int > &f)
std::ostream & yesindent(std::ostream &f)
DynLinArr< long > qel_communicat